https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42383
--- Comment #40 from Tomás Cohen Arazi (tcohen) <[email protected]> --- Created attachment 209573 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=209573&action=edit Bug 42383: (QA follow-up) Ask to transfer when AutomaticItemReturn is disabled When an item checked in needs to go back to another library and AutomaticItemReturn is disabled, AddReturn does not create a transfer and only reports NeedsTransfer. The legacy page asked "Transfer now?" and created the transfer on "Yes". The new page showed no modal at all, so there was no way to start the transfer from the check-in page. This patch: - Makes Koha::Checkin->confirm_transfer accept to_library_id and reason. If the checkin has no transfer yet, it requests one to that library (reason defaults to Manual) and sets it in transit. - Makes POST /checkins/{checkin_id}/transfer_confirmation accept an optional body with to_library_id and reason. It returns 400 if there is no transfer and no valid library, and 409 if the transfer is not allowed by the branch transfer limits or one is already pending. - Makes the check-in page show the transfer modal for needs_transfer, with "Transfer now?" and a "No, don't transfer" button. "Yes" requests the transfer using the destination and reason the checkin reported. Test plan: 1. Set AutomaticItemReturn to "Don't automatically transfer" 2. Check out an item whose home library is not your logged in library 3. Go to Circulation > Check in and check the item in => FAIL: No modal is shown, the transfer cannot be started 4. Apply this patch, rebuild and restart: $ ktd --shell k$ yarn api:bundle && yarn js:build && restart_all 5. Repeat steps 2 and 3 => SUCCESS: The modal asks "Transfer now?" 6. Click "Yes, transfer" => SUCCESS: The row shows the transfer, the item is in transit to its home library (check the item details page) 7. Repeat steps 2 and 3, click "No, don't transfer" => SUCCESS: No transfer is created, the row shows no transfer 8. Run: k$ prove t/db_dependent/Koha/Checkin.t \ t/db_dependent/api/v1/checkins.t \ xt/api.t => SUCCESS: Tests pass! 9. Sign off :-D Assisted-by: Opus 5.5 (Anthropic) Signed-off-by: Brendan Lawlor <[email protected]> -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list -- [email protected] To unsubscribe send an email to [email protected] website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
