commit 58cda28f6a42fc4b312b49fe436811d57f768cce Author: Jonathan Druart Date: Mon Sep 7 10:09:08 2026 +0200 Bug 41996: Fix kohastructure.sql Signed-off-by: Pedro Amorim commit 3594c6f60cef4a21bc26f3be43194a5361597832 Author: Jonathan Druart Date: Mon Sep 7 10:08:10 2026 +0200 Bug 16631: Fix kohastructure.sql Signed-off-by: Pedro Amorim commit f612fda1e9a2c49dfa85225d14c35e474ab89c7a Author: Jonathan Druart Date: Fri Jul 24 10:28:09 2026 +0200 Bug 41995: Add nonce Signed-off-by: Owen Leonard Signed-off-by: Lisette Scheer Signed-off-by: Pedro Amorim commit 76504e598afb47a3c8ecc6d26fe3e5d71fe512db Author: Jonathan Druart Date: Fri Jul 24 10:27:03 2026 +0200 Bug 41995: Remove extra JS code Signed-off-by: Owen Leonard Signed-off-by: Lisette Scheer Signed-off-by: Pedro Amorim commit dd536cae2ee98cdde938061f144d0f93bb43cb66 Author: Jonathan Druart Date: Fri Jul 24 10:26:45 2026 +0200 Bug 41995: Fix conflict with bug 37762 Signed-off-by: Owen Leonard Signed-off-by: Lisette Scheer Signed-off-by: Pedro Amorim commit 061cc915ad28d0e3aca77c656e4da0e47d9166bd Author: Jonathan Druart Date: Thu Mar 5 14:03:15 2026 +0100 Bug 41995: Add autocomplete on the admin home page Signed-off-by: Anneli Österman Signed-off-by: Owen Leonard Signed-off-by: Lisette Scheer Signed-off-by: Pedro Amorim commit c9cfa985b6d4d2ff34c62ebb2f448b8270ff43b1 Author: Jonathan Druart Date: Thu Feb 12 14:24:15 2026 +0100 Bug 41995: Autocomplete for syspref search This patch adds autocompletion to the syspref search in the header. Test plan: 1. Go to the admin home page - /cgi-bin/koha/admin/admin-home.pl 2. In the header start typing the name of a syspref and notice that there is now autocompletion (you need at least 3 chars) 3. Select an entry and confirm that you are correctly redirected to the correct search result Signed-off-by: Anneli Österman Signed-off-by: Owen Leonard Signed-off-by: Lisette Scheer Signed-off-by: Pedro Amorim commit 52e6e3ad530073f5d8f31073c9ff1e0f45f3449a Author: Pedro Amorim Date: Thu Sep 3 15:31:08 2026 +0100 Bug 41728: (RM follow-up): Add AddReturn marks ISO18626 request as LoanCompleted Regression test from the RM's QA review (attachment 204865, comment 104/105 on the bug): drives a real ISO18626 request through AddReturn and confirms it gets marked LoanCompleted and receives a supplyingAgencyMessage, rather than only checking that the $messages hashref no longer contains a stray NotIssued key. This closes the gap the "Remove leftover duplicate data-consistency block" follow-up left - that fix restored the $iso18626_request assignment, but nothing previously exercised the ISO18626 progress-reporting path end to end. Signed-off-by: Pedro Amorim Test plan: 1. prove t/db_dependent/Circulation.t => SUCCESS: 91 tests pass. Signed-off-by: Martin Renvoize Signed-off-by: Pedro Amorim commit e0d32e073abdf4f7705f310ff0eeac52cfbc1721 Author: Martin Renvoize Date: Thu Sep 3 13:24:41 2026 +0100 Bug 41728: (QA follow-up) Add coverage for the Wrongbranch blocker No test in the suite asserted on $messages->{Wrongbranch} content despite this being one of the blockers AddReturn's rewired availability check produces (AllowReturnToBranch enforcement, moved into Koha::Item->can_be_returned_at / Koha::Item::Availability::Checkin by this bug). Add coverage for it. Test plan: 1. prove t/db_dependent/Circulation.t => SUCCESS: 88 tests pass. Signed-off-by: Martin Renvoize Signed-off-by: Pedro Amorim commit 8bcd634fb96333fca04acf4c98b5ad252d5f9031 Author: Martin Renvoize Date: Thu Sep 3 12:59:26 2026 +0100 Bug 41728: (QA follow-up) Remove leftover duplicate data-consistency block d43945e7279 moved the issued/patron data-consistency check earlier in AddReturn (before blocker handling), as its commit message describes, but only copied the block instead of deleting the original. The leftover block ran unconditionally afterwards: since $patron is already guaranteed set whenever $issue is true by that point, its "else" branch fired on every normal checkin of an already-issued item, incorrectly setting $messages->{NotIssued} and clearing item.onloan. This corrupted the not_issued message surfaced to circ/returns.pl, SIP, and the checkin audit record on every ordinary return. The same leftover block also buried $iso18626_request's assignment after a die (making it dead code), so ISO18626 progress-reporting on checkin was never triggered. Restore the assignment at the point $issue/$patron are extracted from the availability context, where it belongs. Test plan: 1. Return an item that is currently checked out. 2. Confirm the returned $messages hashref no longer contains a NotIssued key, and that item.onloan is only cleared for items that were genuinely not checked out. Signed-off-by: Martin Renvoize Signed-off-by: Pedro Amorim commit ce9ffcca52e5430e3dc626984b02069f1ad6b95c Author: Tomás Cohen Arazi Date: Mon Apr 20 16:59:34 2026 -0300 Bug 41728: (follow-up) Replace require with use for Availability::Checkin There is no circular dependency, so the runtime require can be replaced with a compile-time use statement. Signed-off-by: Tomás Cohen Arazi Signed-off-by: Martin Renvoize Signed-off-by: Pedro Amorim commit fbe7c7a60faf4418c5f5a2e7aa24bd1d58aeb011 Author: Martin Renvoize Date: Fri Apr 17 14:56:43 2026 +0100 Bug 41728: (QA follow-up) Move Item::Checkin::Availability to Item::Availability::Checkin Introduce a dedicated Koha::Item::Availability::* namespace for checkers that return a Koha::Result::Availability. Keeping these under the Item subject prefix keeps them co-located with the Item they describe, while the Availability sub-namespace gives future parallel checkers (Checkout, Hold, Book, ...) an obvious home rather than scattering them as single-file directories alongside Koha/Item/Transfer/ etc. The $item->checkin_availability convenience method on Koha::Item is preserved; only its internal delegation target changes. Renames: Koha::Item::Checkin::Availability -> Koha::Item::Availability::Checkin Koha/Item/Checkin/Availability.pm -> Koha/Item/Availability/Checkin.pm t/db_dependent/Koha/Item/Checkin/Availability.t -> t/db_dependent/Koha/Item/Availability/Checkin.t Test plan: prove t/db_dependent/Koha/Item/Availability/Checkin.t prove t/db_dependent/Circulation/Returns.t Signed-off-by: Tomás Cohen Arazi Signed-off-by: Martin Renvoize Signed-off-by: Pedro Amorim commit be74523028da2d1f931878c5c477daee4c405cfa Author: Martin Renvoize Date: Fri Apr 17 14:44:48 2026 +0100 Bug 41728: (QA follow-up) Move Availability::Result to Result::Availability Consolidate result base classes under the Koha::Result::* namespace alongside the existing Koha::Result::Boolean. This keeps return-value wrappers discoverable in one place and avoids a lone Koha::Availability:: namespace that would otherwise host a single base class. Renames: Koha::Availability::Result -> Koha::Result::Availability Koha/Availability/Result.pm -> Koha/Result/Availability.pm t/Koha/Availability/Result.t -> t/Koha/Result/Availability.t Call sites in Koha::Item, Koha::Item::Checkin::Availability, and the test files are updated accordingly. Test plan: prove t/Koha/Result/Availability.t prove t/db_dependent/Koha/Item/Checkin/Availability.t Signed-off-by: Martin Renvoize Signed-off-by: Tomás Cohen Arazi Signed-off-by: Martin Renvoize Signed-off-by: Pedro Amorim commit dece71cb3eebe0be96cad19f3dcccfda88d486ef Author: Tomás Cohen Arazi Date: Wed Apr 15 11:56:58 2026 -0300 Bug 41728: (follow-up) Add no_short_circuit option to checkin availability This follow-up replaces the unconditional removal of short-circuit logic with a caller-controlled no_short_circuit parameter, following the same pattern established by Koha::Patron->can_place_holds. By default, check() short-circuits on the first blocker. This is the correct behavior for AddReturn, which processes blockers sequentially and only acts on the first one it finds (BlockedWithdrawn => early return, Wrongbranch => early return, BlockedLost => sets doreturn=0). Running all policy checks only to discard the results is wasteful, specially when some of them (e.g. can_be_returned_at) hit the database. When no_short_circuit => 1 is passed, all checks run and all blockers are collected. This is the behavior API consumers will need: present the full set of issues in a single response instead of requiring fix-one-recheck cycles. Test plan: 1. Apply patch 2. Run: $ ktd --shell k$ prove t/db_dependent/Koha/Item/Checkin/Availability.t => SUCCESS: Tests pass! k$ prove t/db_dependent/Circul* => SUCCESS: Tests pass! 3. Sign off :-D Signed-off-by: Tomás Cohen Arazi Signed-off-by: Martin Renvoize Signed-off-by: Pedro Amorim commit 84bcca727af617292f821c6cfc925e261bf8db45 Author: Martin Renvoize Date: Tue Apr 14 18:32:28 2026 +0100 Bug 41728: (QA follow-up) Collect all blockers instead of short-circuiting Remove early returns from Koha::Item::Checkin::Availability::check() so that all blockers, confirmations, and warnings are collected in a single pass. Previously, the first blocker triggered an early return, meaning callers could only discover one problem at a time. This is particularly useful for API consumers who want to present the full set of issues to the user in a single response rather than requiring fix-one-recheck cycles. The change is safe for AddReturn because it already handles blocker priority through its sequential if/return structure: 1. BlockedWithdrawn → early return before status updates 2. Wrongbranch → early return after status updates 3. BlockedLost → sets doreturn=0 Even when multiple blockers are present, AddReturn processes them in the correct priority order. Also makes existing tests deterministic by explicitly setting withdrawn and itemlost values on test items, preventing random TestBuilder values from triggering unrelated blockers now that all checks always run. Signed-off-by: Tomás Cohen Arazi Signed-off-by: Martin Renvoize Signed-off-by: Pedro Amorim commit 8391917bab4d26cbbc892e4869149678396e204c Author: Martin Renvoize Date: Tue Apr 14 18:10:10 2026 +0100 Bug 41728: (QA follow-up) Restore withdrawn warning and use from availability Restore the withdrawn warning in Koha::Item::Checkin::Availability that was incorrectly removed. This warning is set when an item is withdrawn but BlockReturnOfWithdrawnItems is off, making it useful for API consumers in subsequent work. Update AddReturn to read the withdrawn state from the availability result's warnings rather than re-checking $item->withdrawn directly, avoiding duplication of logic. Add test for the withdrawn warning (non-blocked) path. Signed-off-by: Tomás Cohen Arazi Signed-off-by: Martin Renvoize Signed-off-by: Pedro Amorim commit 24854abf30049ba261752735ae922f9ad2cf51e9 Author: Martin Renvoize Date: Tue Apr 14 17:09:55 2026 +0100 Bug 41728: (QA follow-up) Move return policy logic to Koha::Item Move the AllowReturnToBranch and branch transfer limit checks from both C4::Circulation::CanBookBeReturned and Koha::Item::Checkin::Availability::_check_return_policy into a single authoritative method on Koha::Item: can_be_returned_at(). This eliminates the duplicate implementations and follows the Koha convention of placing item-related logic on the Koha::Item object. Changes: - Add Koha::Item->can_be_returned_at() with AllowReturnToBranch policy and transfer limit checks - Make CanBookBeReturned a thin wrapper delegating to the new method - Update Checkin::Availability to call $item->can_be_returned_at() - Remove _check_return_policy and unused withdrawn warning from the Availability class Signed-off-by: Tomás Cohen Arazi Signed-off-by: Martin Renvoize Signed-off-by: Pedro Amorim commit b689dd07cc46d695909a4b99c6fb08a0ae4adc41 Author: Martin Renvoize Date: Tue Apr 14 17:04:27 2026 +0100 Bug 41728: (QA follow-up) Restore original execution order for Wrongbranch The refactoring changed the relative order of the Wrongbranch early return and several status-update operations. In the original AddReturn, the execution order was: 1. checkout/patron lookup 2. not-issued handling + RecordLocalUseOnReturn 3. withdrawn check (early return) 4. location_update_trigger 5. UpdateNotForLoanStatusOnCheckin 6. CanBookBeReturned / Wrongbranch check (early return) 7. BlockReturnOfLostItems After the refactoring, the Wrongbranch blocker returned early before steps 2, 4 and 5, causing three regressions: - RecordLocalUseOnReturn was not recorded for non-issued items scanned at the wrong branch - location_update_trigger was skipped for Wrongbranch returns - UpdateNotForLoanStatusOnCheckin was skipped for Wrongbranch returns Fix by splitting blocker handling into two phases: 1. BlockedWithdrawn: earliest early return, before status updates (matches original withdrawn check position) 2. Wrongbranch and BlockedLost: after RecordLocalUseOnReturn, location_update_trigger, and UpdateNotForLoanStatusOnCheckin (matches original CanBookBeReturned position) Signed-off-by: Tomás Cohen Arazi Signed-off-by: Martin Renvoize Signed-off-by: Pedro Amorim commit d46b0c110653c55f9ccc3f284c3c0b1899bad133 Author: Martin Renvoize Date: Tue Apr 14 17:03:26 2026 +0100 Bug 41728: (QA follow-up) Move data consistency check before blocker handling The data inconsistency die (checkout exists but patron does not) was placed after the blocker handling block. This meant that if an item had corrupt data AND triggered a blocker (e.g. withdrawn+blocked), the blocker handler would return early with patron as undef instead of dying on the inconsistency, silently masking database corruption. Move the check to immediately after extracting context from the availability result, before any blocker handling, matching the original AddReturn behavior where the die fired during checkout lookup. Signed-off-by: Tomás Cohen Arazi Signed-off-by: Martin Renvoize Signed-off-by: Pedro Amorim commit 2e4459ea69f9db2baf7258d0e410ca5871c3e180 Author: Kyle M Hall Date: Tue Apr 7 14:49:33 2026 -0400 Bug 41728: (QA follow-up) Declare issue and patron variables together There seems to be no reason to declare $patron near the start of the sub while $issue is declared where they are both populated. Signed-off-by: Kyle M Hall Signed-off-by: Martin Renvoize Signed-off-by: Tomás Cohen Arazi Signed-off-by: Martin Renvoize Signed-off-by: Pedro Amorim commit dad9fd4a3005ed7e35bbb9ace0b9214642ab605b Author: Kyle M Hall Date: Tue Apr 7 14:33:03 2026 -0400 Bug 41728: (QA follow-up) Fix test accessing wrong key for checkout The test was checking $result->{issue} which doesn't exist on the Result object. The correct accessor is $result->context->{checkout}, so the assertion was always trivially true. Signed-off-by: Kyle M Hall Signed-off-by: Martin Renvoize Signed-off-by: Tomás Cohen Arazi Signed-off-by: Martin Renvoize Signed-off-by: Pedro Amorim commit 402b6559f8c39bb7a25cf5acac4aea9b0135e90f Author: Kyle M Hall Date: Tue Apr 7 14:32:42 2026 -0400 Bug 41728: (QA follow-up) Match original blocker priority order Reorder blocker checks to match the original AddReturn priority: Withdrawn > Wrongbranch > Lost. Previously Lost was checked before Wrongbranch, which changed behavior for items that were both lost and at the wrong branch. QA note: There are other checks in-between these, but I don't think their order betwixt these blockers matters for retaining existing behavior. Signed-off-by: Kyle M Hall Signed-off-by: Martin Renvoize Signed-off-by: Tomás Cohen Arazi Signed-off-by: Martin Renvoize Signed-off-by: Pedro Amorim commit e82266031191be938c76f40aa79b289840400c90 Author: Kyle M Hall Date: Tue Apr 7 14:28:29 2026 -0400 Bug 41728: (QA follow-up) Populate checkout context before blocker checks The availability check is returning early on blockers (BlockedWithdrawn, BlockedLost, Wrongbranch) before checking if the item had an active checkout. This causes AddReturn to lose checkout/patron context for checked-out items that hit a blocker, resulting in incorrect NotIssued messages, unintended onloan clearing, and incorrect local use recording. Move the checkout check to run first so context is always populated regardless of blockers. Signed-off-by: Kyle M Hall Signed-off-by: Martin Renvoize Signed-off-by: Tomás Cohen Arazi Signed-off-by: Martin Renvoize Signed-off-by: Pedro Amorim commit cb3deeadcce548cb84bae0d6db686786528e2928 Author: Tomás Cohen Arazi Date: Wed Mar 25 14:03:24 2026 +0100 Bug 41728: (follow-up) Add transfer limit check and clean param names - Rename params: branch => library, add to_library for destination - Move $returnbranch computation before the availability check in AddReturn so it can be passed as to_library - Add transfer limit check (bug 7376) to the Availability class - Rename internal _can_book_be_returned to _check_return_policy - Remove duplicate $returnbranch block and standalone transfer limit check from AddReturn - Update tests for new param names Signed-off-by: Kyle M Hall Signed-off-by: Martin Renvoize Signed-off-by: Tomás Cohen Arazi Signed-off-by: Martin Renvoize Signed-off-by: Pedro Amorim commit 4b277a6e4a2c3b44a30217ca262d9a8de7f13433 Author: Tomás Cohen Arazi Date: Wed Jan 28 15:34:27 2026 -0300 Bug 41728: Make AddReturn use Koha::Item::Checkin::Availability This patch refactors AddReturn to use the new Koha::Item::Checkin::Availability class for validation logic, eliminating code duplication and centralizing check-in validation. Changes: - Add use statement for Koha::Item::Checkin::Availability - Look up item first, return BadBarcode if not found - Call $item->checkin_availability() for validation - Use Result object methods (available(), blockers, context) - Replace inline withdrawn/lost/branch validation with blocker handling - Remove duplicate CanBookBeReturned() call (now in Availability class) - Preserve all existing behavior and error messages - Maintain backward compatibility The refactoring extracts ~40 lines of validation logic while maintaining identical functionality. All validation results are obtained from a single availability check that returns a Result object. Note: The withdrawn message is set in two places depending on context: - When BlockReturnOfWithdrawnItems is ON: set in blocker handler before early return - When BlockReturnOfWithdrawnItems is OFF: set by existing check later in the flow This preserves the original behavior where withdrawn items always get the message, but are only blocked when the syspref is enabled. Test plan: 1. Apply patch 2. Run: $ ktd --shell k$ prove t/db_dependent/Koha/Item/Checkin/Availability.t => SUCCESS: Tests pass! k$ prove t/db_dependent/Circul* => SUCCESS: Tests pass! 3. Verify check-in operations work correctly: - Items not found return BadBarcode - Withdrawn items blocked when syspref enabled - Lost items blocked when syspref enabled - Wrong branch returns blocked per AllowReturnToBranch - Not issued items handled correctly - Normal check-ins complete successfully 4. Sign off :-D Signed-off-by: Kyle M Hall Signed-off-by: Martin Renvoize Signed-off-by: Tomás Cohen Arazi Signed-off-by: Martin Renvoize Signed-off-by: Pedro Amorim commit 9b8328c3f5152354c3884b1283478b35ebdd4206 Author: Tomás Cohen Arazi Date: Wed Mar 25 10:48:20 2026 +0100 Bug 41728: Add Koha::Item::Checkin::Availability class Signed-off-by: Kyle M Hall Signed-off-by: Martin Renvoize Signed-off-by: Tomás Cohen Arazi Signed-off-by: Martin Renvoize Signed-off-by: Pedro Amorim commit b5041ae36119828fd3da4f47d28d2b927c533a58 Author: Tomás Cohen Arazi Date: Wed Jan 28 15:33:54 2026 -0300 Bug 41728: Add Koha::Availability::Result base class This patch introduces a standardized result class for availability checks, providing a clean API with proper methods instead of raw hashrefs. The Koha::Availability::Result class provides: - add_blocker() - Add conditions that prevent the action - add_confirmation() - Add conditions requiring user confirmation - add_warning() - Add informational messages - set_context() - Store related objects (item, checkout, patron, etc.) - available() - Check if action can proceed (no blockers) - needs_confirmation() - Check if confirmations are required - Accessor methods for all categories - to_hashref() for backward compatibility This design: - Provides a consistent interface across all availability checks - Makes the API more discoverable and self-documenting - Enables future enhancements without breaking changes - Follows OO principles with proper encapsulation - Can be used as base for checkout, hold, renewal availability Test plan: 1. Apply patch 2. Run: $ ktd --shell k$ prove t/Koha/Availability/Result.t => SUCCESS: Tests pass! 3. Verify all methods work correctly 4. Sign off :-D Signed-off-by: Kyle M Hall Signed-off-by: Martin Renvoize Signed-off-by: Tomás Cohen Arazi Signed-off-by: Martin Renvoize Signed-off-by: Pedro Amorim commit 78906e00da53ab02d26c5b448ce567d1b0ee7e97 Author: Tomás Cohen Arazi Date: Thu Sep 3 11:52:04 2026 -0300 Bug 42443: (QA follow-up) Use POST /transfers/{transfer_id}/cancellation Cancelling a transfer is a state change on the resource, not a deletion of it, so it should be modelled as an action sub-resource rather than a DELETE on the transfer itself. This aligns the endpoint with the API coding guidelines (REST2: non-CRUD actions use action sub-resources; REST3.2: conflicts return 409) and with the design used in bug 43454. Changes: - Replace DELETE /transfers/{transfer_id} with POST /transfers/{transfer_id}/cancellation - Rename the controller method delete() to cancel(), look the transfer up with objects->find_rs, and return 200 with the updated resource representation instead of 204 with an empty body - Make cancellation_reason optional, defaulting to 'Manual', matching the legacy returns.pl behaviour - Return 409 with a structured error_code ('already_arrived', 'already_cancelled') when the transfer cannot be cancelled, instead of a bare 400 - Update the transfers to receive page to POST to the new endpoint and to treat 404/409 as "already gone, refresh the table" - Adapt the tests accordingly, including coverage for the default reason - The *_date API attribute names introduced by this bug are kept, as they are the guideline-compliant form (REST1.3.4.1: *_date, not date_*) Test plan: 1. Apply patch 2. Run the tests: $ ktd --shell k$ prove t/db_dependent/api/v1/transfers.t => SUCCESS: Tests pass! 3. Rebuild and validate the API spec: k$ yarn api:bundle k$ prove xt/api.t => SUCCESS: Tests pass! 4. In the staff interface, go to Circulation -> Transfers to receive, click "Cancel transfer" on a row => SUCCESS: The transfer is cancelled and the row drops off the table 5. Cancel the same transfer again from a second tab => SUCCESS: The API returns 409 (already_cancelled) and the row is treated as already gone 6. Sign off :-D Assisted-by: Sonnet 4.6 (Anthropic) Signed-off-by: Tomás Cohen Arazi Signed-off-by: Pedro Amorim commit d7a87e2cbd25d55c2e6a47e030f14ecaa4e47ae0 Author: Martin Renvoize Date: Thu Jun 11 18:14:39 2026 +0100 Bug 42443: (QA follow-up) Use library selects for Sent from and Home library filters Replace the free-text filter inputs for the "Sent from" and "Home library" columns with select dropdowns populated from the full library list, consistent with other DataTables pages such as the pending bookings page. The "Sent from" column is made visible again (it was previously hidden since rowGroup provides the visual grouping); showing it also allows its filter cell to render. The "On hold for" column intentionally has no filter: it is computed from two different embedded sub-objects (item.first_hold.patron or item.recall.patron) and has no single API field to filter against server-side. Signed-off-by: Martin Renvoize Signed-off-by: Tomás Cohen Arazi Signed-off-by: Pedro Amorim commit dcb423b76651105e6360f40501d8422dd71ce5c3 Author: Martin Renvoize Date: Thu Jun 11 18:00:33 2026 +0100 Bug 42443: (QA follow-up) Add DBIC relationship aliases on Branchtransfer The REST framework resolves _order_by parameters and embed prefetches by walking prefetch_whitelist, which is built from DBIC relationship names. The auto-generated relationships use the FK column names (itemnumber, frombranch, tobranch), but the API exposes them as item, from_library, and to_library. Sorting by item.biblio.title etc. threw a 500 because those names were not in the whitelist. Adding belongs_to aliases below the DO NOT MODIFY line bridges the API names to the DBIC names, matching the convention used by other Koha schema result classes (e.g. Koha::Schema::Result::Item). Also updates the relation methods in Koha::Item::Transfer to use the new aliases consistently, so the accessor names line up across both layers. Signed-off-by: Martin Renvoize Signed-off-by: Tomás Cohen Arazi Signed-off-by: Pedro Amorim commit ebb77c8fa99ec910ab95f834d057fc5bc53a27a4 Author: Martin Renvoize Date: Thu Jun 11 17:42:42 2026 +0100 Bug 42443: (QA follow-up) Group transfers by sending library using rowGroup Signed-off-by: Martin Renvoize Signed-off-by: Tomás Cohen Arazi Signed-off-by: Pedro Amorim commit e5a07ccd25bad8d6ae035eaec874b51675615761 Author: Martin Renvoize Date: Thu Jun 11 17:24:43 2026 +0100 Bug 42443: (QA follow-up) Test from_library_id query filter The OpenAPI spec documents from_library_id as a supported filter parameter but the test suite only exercised to_library_id. Add a test to verify filtering by source library returns the correct transfer. Signed-off-by: Martin Renvoize Signed-off-by: Tomás Cohen Arazi Signed-off-by: Pedro Amorim commit 02a02c72090d632d8e24239f556c1bde9a620bb5 Author: Martin Renvoize Date: Thu Jun 11 17:24:30 2026 +0100 Bug 42443: (QA follow-up) Test UseRecalls integration in transfer cancel The delete() controller reverts any in-transit recall tied to the item when UseRecalls is enabled. Add a subtest to verify the recall status is set back to 'requested' after the transfer is cancelled. Signed-off-by: Martin Renvoize Signed-off-by: Tomás Cohen Arazi Signed-off-by: Pedro Amorim commit 19d1db91d241250f42af75c3c7eacea26da13228 Author: Martin Renvoize Date: Thu Jun 11 17:23:58 2026 +0100 Bug 42443: (QA follow-up) Fix escaping of branchcode in JS context Using | html to embed a TT value inside a JS string literal is incorrect: it produces HTML entities rather than JS-safe characters. Store the branchcode in a data attribute (where | html is correct) and read it from there in JavaScript. Signed-off-by: Martin Renvoize Signed-off-by: Tomás Cohen Arazi Signed-off-by: Pedro Amorim commit 16b2ac663e015c8497e478c196d0aa328452b180 Author: Martin Renvoize Date: Thu Jun 11 17:23:46 2026 +0100 Bug 42443: (QA follow-up) Guard nullable embed access in JS renderers from_library and home_library can be null if a transfer references an orphaned branch row. Accessing .name on null throws a TypeError and crashes the DataTable renderer; guard both accesses. Signed-off-by: Martin Renvoize Signed-off-by: Tomás Cohen Arazi Signed-off-by: Pedro Amorim commit f80b59933279096a63b451217eecc168784af019 Author: Martin Renvoize Date: Thu Jun 11 17:23:16 2026 +0100 Bug 42443: (QA follow-up) Add to_library to embed enum Koha::Item::Transfer exposes a to_library() method and the definition already listed to_library as a valid property, but the x-koha-embed enum was missing the entry. Add it so consumers can embed it. Signed-off-by: Martin Renvoize Signed-off-by: Tomás Cohen Arazi Signed-off-by: Pedro Amorim commit f8d59a7b501ab200b8af659eec79c4c6cecc6dc3 Author: Martin Renvoize Date: Thu Jun 11 17:23:11 2026 +0100 Bug 42443: (QA follow-up) Prevent cancelling completed transfers The delete endpoint was passing force => 1 to cancel() with no state guards, allowing already-received and already-cancelled transfers to be re-cancelled, corrupting datearrived/datecancelled audit fields. Add explicit 400 responses for both cases and tests to cover them. Signed-off-by: Martin Renvoize Signed-off-by: Tomás Cohen Arazi Signed-off-by: Pedro Amorim commit c813fb2574d439b2be2ee204310537575fc0dd11 Author: Kyle M Hall Date: Tue Jun 2 14:55:54 2026 -0400 Bug 42443: Add ability to cancel a transfer via the REST API This patch adds a DELETE /transfers/{transfer_id} route that cancels the given transfer by id and reverts an in transit recall for the item the same way as returns.pl does. The cancellation reason is passed in the request body so this api endpoint could be used in other places we can cancel transfers. Signed-off-by: Alex Carver [Acerock7] Signed-off-by: Martin Renvoize Signed-off-by: Tomás Cohen Arazi Signed-off-by: Pedro Amorim commit 560d7b7ff759185c706f37b6645cfc2af8ccb7cc Author: Kyle M Hall Date: Tue Jun 2 14:55:37 2026 -0400 Bug 42443: Convert transfers to receive page to ajax datatable Updates circ/transferstoreceive.pl to use the new REST API with an ajax DataTable to display transfer to receive. Test Plan: 1) Apply this patch 2) Restart all the things! 3) Set an item in transit to your logged in library ( check it in at another branch so it is sent home, or place a hold to trigger a transfer ) 4) Place a hold on a second transferred item, and a recall on a third 5) Browse to /cgi-bin/koha/circ/transferstoreceive.pl 6) Note the "On hold for" column shows the hold patron, the recall patron or "None" 7) Set TransfersMaxDaysWarning low and note the "days late" badge appears 8) Click "Cancel transfer" and note the transfer is cancelled 9) A library with no incoming transfers will get "No transfers to receive" Signed-off-by: Alex Carver [Acerock7] Signed-off-by: Martin Renvoize Signed-off-by: Tomás Cohen Arazi Signed-off-by: Pedro Amorim commit 4fc561761554311c30837af5fbd40f74cd45645a Author: Kyle M Hall Date: Tue Jun 2 14:55:37 2026 -0400 Bug 42443: Add unit tests Signed-off-by: Alex Carver [Acerock7] Signed-off-by: Martin Renvoize Signed-off-by: Tomás Cohen Arazi Signed-off-by: Pedro Amorim commit 9dac6290d7ac1699053acc7dcffa9678b639f550 Author: Kyle M Hall Date: Tue Jun 2 14:55:37 2026 -0400 Bug 42443: Add REST API for item transfers Signed-off-by: Alex Carver [Acerock7] Signed-off-by: Martin Renvoize Signed-off-by: Tomás Cohen Arazi Signed-off-by: Pedro Amorim commit 2aa2cc0e7f5c386c513b6d82c6d3c0628b2b19ea Author: Lisette Scheer Date: Wed Jul 22 18:10:50 2026 +0000 Bug 42330: (QA follow-up) Fix file permissions on new test and tidy This patch - Fixes the file permissions on the new test - Removes a variable declaration from the new test that's unused - Removes a new line from the end of staff-global.scss Signed-off-by: Lisette Scheer Signed-off-by: Pedro Amorim commit 6cb0f5161cedee3c412b60bab5499dbd0b45cd2d Author: Jonathan Druart Date: Tue Jun 16 15:30:46 2026 +0200 Bug 42330: Auto-tidy Signed-off-by: Lisette Scheer Signed-off-by: Pedro Amorim commit fc32990f4990e23c1dd903e8839f9fe8c9f15cc2 Author: Jonathan Druart Date: Tue Jun 16 15:29:32 2026 +0200 Bug 42330: Add new template tools/restore-records.tt Signed-off-by: Lisette Scheer Signed-off-by: Pedro Amorim commit 210aa964f0874ecaf35cc556f7bcffcaca024394 Author: Jonathan Druart Date: Tue Jun 16 15:41:59 2026 +0200 Bug 42330: Add an xt test to prevent new occurrences of
in staff templates Signed-off-by: Lisette Scheer Signed-off-by: Pedro Amorim commit 248c0fe224b97bee7d0b7f0566bd72a313259d75 Author: Owen Leonard Date: Wed Apr 15 08:54:13 2026 -0400 Bug 42330: (follow-up) Some corrections to sidebars - The structure of the search facets, advanced MARC editor, and HTML customiztions sidebars need to be corrected in order for the collapse button to work correctly. - The "toggle_sidebar" click handler should be inside a "$(document).ready()" in order to work correctly on pages where the JS is in the header. Signed-off-by: Lisette Scheer Signed-off-by: Pedro Amorim commit ad694a3411e677fcea96f315758793fd1fe0f203 Author: Jonathan Druart Date: Mon Apr 13 12:11:47 2026 +0200 Bug 42330: Tidy Signed-off-by: Owen Leonard Signed-off-by: Lisette Scheer Signed-off-by: Pedro Amorim commit b02ca1270d6eeb38a5a967dee62dcef174f2833a Author: Jonathan Druart Date: Mon Apr 13 11:12:11 2026 +0200 Bug 42330: Use main-container from all our templates This goal here is to uniformize the structure of our templates. Using main-container.inc will also introduce the sidebar collapse (from bug 42322) where it was missing Signed-off-by: Owen Leonard Signed-off-by: Lisette Scheer Signed-off-by: Pedro Amorim commit 0acaa7fd5582c200d18901d111579064f36f8cb3 Author: David Cook Date: Wed Jul 29 23:58:04 2026 +0000 Bug 43202: Make it easier to find ERM system preferences This patch makes key ERM system preferences contain the words ERM, e-resource, and electronic resource to improve discoverability when searching system preferences. Test plan: 0. Don't apply the patch yet 1. Go to Administration and type "electronic" into "Search system preferences" and search 2. Note you get the message "No system preferences matched your search for: electronic" 3. Apply the patch 4. Search for "electronic" in the system preferences again 5. Note that "ERMModule" and "ERMProviders" appear Signed-off-by: Owen Leonard Signed-off-by: David Nind Signed-off-by: Pedro Amorim commit 37e6568a9bcb083175cd6a49afe059fda15d7b80 Author: Aleisha Amohia Date: Fri Mar 6 00:09:31 2026 +0000 Bug 32419: Show item availability on lists view To test: 1. Create or use a biblio record with multiple items, for example biblionumber 235. 2. Check out an item attached to the record to a patron, i.e. check out barcode 39999000010190 to your logged in user 3. Go to the Detail view for this record. 4. Edit another item attached to the record and give it a not for loan status, i.e. edit barcode 39999000010213 and set it to Not for loan 5. Click the Add to list button above the record. Add the record to an existing list, or create a new one and Save. 6. Go to the Lists module in the staff interface and view the contents of the list you just added your record to. 7. Confirm you see accurate Availability information in the list results within the callnumber column. Sponsored-by: Pymble Ladies' College Signed-off-by: Hayley Cheng Signed-off-by: Emily Lamancusa Signed-off-by: Pedro Amorim