BlockReturnOfLostItems when enabled should mean lost status are retained when an item is checked in. If the check-in triggers a transfer to another library, the lost status is removed. --> BUG
I believe it should also not trigger the transfer, it should deny checkin.
Good (and speedy) catch! Agreed.
Created attachment 160093 [details] [review] Bug 35587: Do not trigger transfer if lost item returned and BlockReturnOfLostItems enabled This fixes current buggy behaviour - when BlockReturnOfLostItems is enabled, no transfer should be triggered and the lost status should be retained. To test: 1. Go to Koha Administration -> Global system preferences 2. Set the BlockReturnOfLostItems system preference to Block 3. Enable the AutomaticItemReturn system preference (this is simply to make testing a bit faster) 4. Take note of your logged in library 5. Search for an item where the home library is NOT the same as your logged in library 6. Edit this item and give it a lost status 7. Check in the item 8. Notice the item is returned and a transfer is automatically triggered 9. If you go to the item record page, the lost status has been remove 10. Apply the patch and restart services 11. Edit the item again and give it a lost status. This will also cancel the transfer 12. Check in the item 13. Confirm the transfer is NOT triggered and the lost status is retained as expected. 14. Go back to system preferences and disable the BlockReturnOfLostItems system preference (set to "Don't block") 15. Check in the item 16. Confirm the transfer is triggered and lost status is removed 17. Confirm tests pass prove t/db_dependent/Circulation/Returns.t Sponsored-by: Pymble Ladies' College
Created attachment 160215 [details] [review] Bug 35587: Do not trigger transfer if lost item returned and BlockReturnOfLostItems enabled This fixes current buggy behaviour - when BlockReturnOfLostItems is enabled, no transfer should be triggered and the lost status should be retained. To test: 1. Go to Koha Administration -> Global system preferences 2. Set the BlockReturnOfLostItems system preference to Block 3. Enable the AutomaticItemReturn system preference (this is simply to make testing a bit faster) 4. Take note of your logged in library 5. Search for an item where the home library is NOT the same as your logged in library 6. Edit this item and give it a lost status 7. Check in the item 8. Notice the item is returned and a transfer is automatically triggered 9. If you go to the item record page, the lost status has been remove 10. Apply the patch and restart services 11. Edit the item again and give it a lost status. This will also cancel the transfer 12. Check in the item 13. Confirm the transfer is NOT triggered and the lost status is retained as expected. 14. Go back to system preferences and disable the BlockReturnOfLostItems system preference (set to "Don't block") 15. Check in the item 16. Confirm the transfer is triggered and lost status is removed 17. Confirm tests pass prove t/db_dependent/Circulation/Returns.t Sponsored-by: Pymble Ladies' College Signed-off-by: Esther <esther@bywatersolutions.com>
Test plan works as described, but this patch is causing - prove t/db_dependent/Circulation/Branch.t to fail.
Created attachment 160305 [details] [review] Bug 35587: Do not trigger transfer if lost item returned and BlockReturnOfLostItems enabled This fixes current buggy behaviour - when BlockReturnOfLostItems is enabled, no transfer should be triggered and the lost status should be retained. To test: 1. Go to Koha Administration -> Global system preferences 2. Set the BlockReturnOfLostItems system preference to Block 3. Enable the AutomaticItemReturn system preference (this is simply to make testing a bit faster) 4. Take note of your logged in library 5. Search for an item where the home library is NOT the same as your logged in library 6. Edit this item and give it a lost status 7. Check in the item 8. Notice the item is returned and a transfer is automatically triggered 9. If you go to the item record page, the lost status has been remove 10. Apply the patch and restart services 11. Edit the item again and give it a lost status. This will also cancel the transfer 12. Check in the item 13. Confirm the transfer is NOT triggered and the lost status is retained as expected. 14. Go back to system preferences and disable the BlockReturnOfLostItems system preference (set to "Don't block") 15. Check in the item 16. Confirm the transfer is triggered and lost status is removed 17. Confirm tests pass prove t/db_dependent/Circulation/Returns.t prove t/db_dependent/Circulation/Branch.t Sponsored-by: Pymble Ladies' College Signed-off-by: Esther <esther@bywatersolutions.com>
(In reply to Pedro Amorim from comment #5) > Test plan works as described, but this patch is causing > - prove t/db_dependent/Circulation/Branch.t > to fail. Thank you for testing, great catch. I've updated the patch.
Created attachment 160323 [details] [review] Bug 35587: Do not trigger transfer if lost item returned and BlockReturnOfLostItems enabled This fixes current buggy behaviour - when BlockReturnOfLostItems is enabled, no transfer should be triggered and the lost status should be retained. To test: 1. Go to Koha Administration -> Global system preferences 2. Set the BlockReturnOfLostItems system preference to Block 3. Enable the AutomaticItemReturn system preference (this is simply to make testing a bit faster) 4. Take note of your logged in library 5. Search for an item where the home library is NOT the same as your logged in library 6. Edit this item and give it a lost status 7. Check in the item 8. Notice the item is returned and a transfer is automatically triggered 9. If you go to the item record page, the lost status has been remove 10. Apply the patch and restart services 11. Edit the item again and give it a lost status. This will also cancel the transfer 12. Check in the item 13. Confirm the transfer is NOT triggered and the lost status is retained as expected. 14. Go back to system preferences and disable the BlockReturnOfLostItems system preference (set to "Don't block") 15. Check in the item 16. Confirm the transfer is triggered and lost status is removed 17. Confirm tests pass prove t/db_dependent/Circulation/Returns.t prove t/db_dependent/Circulation/Branch.t Sponsored-by: Pymble Ladies' College Signed-off-by: Esther <esther@bywatersolutions.com> Signed-off-by: Kelly <kelly@bywatersolutions.com>
Created attachment 160396 [details] [review] Bug 35587: Do not trigger transfer if lost item returned and BlockReturnOfLostItems enabled This fixes current buggy behaviour - when BlockReturnOfLostItems is enabled, no transfer should be triggered and the lost status should be retained. To test: 1. Go to Koha Administration -> Global system preferences 2. Set the BlockReturnOfLostItems system preference to Block 3. Enable the AutomaticItemReturn system preference (this is simply to make testing a bit faster) 4. Take note of your logged in library 5. Search for an item where the home library is NOT the same as your logged in library 6. Edit this item and give it a lost status 7. Check in the item 8. Notice the item is returned and a transfer is automatically triggered 9. If you go to the item record page, the lost status has been remove 10. Apply the patch and restart services 11. Edit the item again and give it a lost status. This will also cancel the transfer 12. Check in the item 13. Confirm the transfer is NOT triggered and the lost status is retained as expected. 14. Go back to system preferences and disable the BlockReturnOfLostItems system preference (set to "Don't block") 15. Check in the item 16. Confirm the transfer is triggered and lost status is removed 17. Confirm tests pass prove t/db_dependent/Circulation/Returns.t prove t/db_dependent/Circulation/Branch.t Sponsored-by: Pymble Ladies' College Signed-off-by: Esther <esther@bywatersolutions.com> Signed-off-by: Kelly <kelly@bywatersolutions.com>
Created attachment 160397 [details] [review] Bug 35587: (QA follow-up): QA script tidy
Created attachment 160398 [details] [review] Bug 35587: Do not trigger transfer if lost item returned and BlockReturnOfLostItems enabled This fixes current buggy behaviour - when BlockReturnOfLostItems is enabled, no transfer should be triggered and the lost status should be retained. To test: 1. Go to Koha Administration -> Global system preferences 2. Set the BlockReturnOfLostItems system preference to Block 3. Enable the AutomaticItemReturn system preference (this is simply to make testing a bit faster) 4. Take note of your logged in library 5. Search for an item where the home library is NOT the same as your logged in library 6. Edit this item and give it a lost status 7. Check in the item 8. Notice the item is returned and a transfer is automatically triggered 9. If you go to the item record page, the lost status has been remove 10. Apply the patch and restart services 11. Edit the item again and give it a lost status. This will also cancel the transfer 12. Check in the item 13. Confirm the transfer is NOT triggered and the lost status is retained as expected. 14. Go back to system preferences and disable the BlockReturnOfLostItems system preference (set to "Don't block") 15. Check in the item 16. Confirm the transfer is triggered and lost status is removed 17. Confirm tests pass prove t/db_dependent/Circulation/Returns.t prove t/db_dependent/Circulation/Branch.t Sponsored-by: Pymble Ladies' College Signed-off-by: Esther <esther@bywatersolutions.com> Signed-off-by: Kelly <kelly@bywatersolutions.com> Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Created attachment 160399 [details] [review] Bug 35587: (QA follow-up): QA script tidy Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Pushed for 24.05! Well done everyone, thank you!
Pushed to 23.11.x for 23.11.02
Backported to 23.05.x for upcoming 23.05.08