https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40672 --- Comment #1 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Created attachment 185543 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=185543&action=edit Bug 40672: Reset desk_id when reverting waiting holds This patch adds desk_id reset functionality to the revert_found method, but only for waiting holds where desk_id is actually relevant. Changes: * Modified revert_found() to conditionally reset desk_id * Only resets desk_id for waiting holds (found=W) * Leaves desk_id unchanged for in transit (T) and in processing (P) holds * Added comprehensive test coverage for all scenarios * Updated POD documentation to explain desk_id behavior The logic is conservative and only clears desk_id when it makes sense: waiting holds have their desk assignment cleared since they are no longer waiting at a specific desk, while transit and processing holds remain unchanged as they do not use desk_id. To test: 1. Apply patch 2. Run tests: $ ktd --shell k$ cd /kohadevbox/koha k$ prove t/db_dependent/Koha/Hold.t => SUCCESS: All tests pass including new desk_id handling tests 3. Verify all hold test suites still pass: k$ prove t/db_dependent/Koha/Hold*.t => SUCCESS: All hold-related tests pass 4. Sign off :-D -- You are receiving this mail because: You are watching all bug changes.