When item is in transfer and it is checked in in a library where it could float, a notification/pop-up about transport will appear on the screen. User must end the transfer by clicking “Cancel transfer”-button. Only then will the item end the transport and start floating in the holding library. Even if the item is in transfer somewhere else (and there are no holds waiting) and it is checked in in a floating library, it should not give the pop-up: “Wrong transfer detected, please return item to…” . Instead it should just start floating without having to click the canceling-button. Koha asks for transfer cancelation even if we have saved in the AutomaticItemReturn-preference “Don’t automatically transfer items to their home library when they are checked in.”
Created attachment 180757 [details] [review] Bug 36957: Add new syspref CancelTransitWhenItemFloats and branchtransfers.cancelation_reason ItemArrivedToFloatBranch When item is in transfer and it is checked in in a library where it could float, a notification/pop-up about transport will appear on the screen. User must end the transfer by clicking “Cancel transfer”-button. Only then will the item end the transport and start floating in the holding library. This patch adds new system preference "CancelTransitWhenItemFloats". If it's enabled and item is checked in in a library where it can float Koha no longer asks user to cancel transfer. Instead transfer is automatically cancelled and column branchtransfers.cancelation_reason is filled with a new value "ItemArrivedToFloatBranch". To test: 1. Create a new floating group and add libraries A and B to it. 2. Find an item which is in transit to branch A. 3. Change your library as library B. 4. Attempt to check in item you found. => Wrong transfer notification is displayed. 5. Apply this patch, run perl installer/data/mysql/updatedatabase.pl and restart services. 6. Enable new systempreference "CancelTransitWhenItemFloats". 7. Check in same item you found (or find new one to check in). => Notification isn't displayed. => Check your database and confirm that trasfer was cancelled with cancelation_reason as "ItemArrivedToFloatBranch" by running following query in your database: select * from branchtransfers where itemnumber = (select itemnumber from items where barcode = "[barcode of checked in item]"); 8. Change your library as library C (that isn't in the same float group as A and B). 9. Attempt to check in an item in transit to branch A. => Wrong transfer notification is displayed. 10 Disable systempreference "CancelTransitWhenItemFloats". 11. Change your libary as library B and attempt to check in an item in transit to library A. => Wrong transfer notification is displayed. Also prove t/db_dependent/Circulation.t Sponsored-by: Koha-Suomi Oy
Emmi, I ran into issues following your test plan, but realized I was making some assumptions about circ rules and system preferences. How do you have Return Policy and CircControlReturnsBranch set as you're testing?