Bug 35587 - Items lose their lost status when check-in triggers a transfer even though BlockReturnOfLostItems is enabled
Summary: Items lose their lost status when check-in triggers a transfer even though Bl...
Status: Pushed to oldstable
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Aleisha Amohia
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-12-17 21:49 UTC by Aleisha Amohia
Modified: 2024-01-12 22:28 UTC (History)
7 users (show)

See Also:
Change sponsored?: Sponsored
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
24.05.00,23.11.02,23.05.08


Attachments
Bug 35587: Do not trigger transfer if lost item returned and BlockReturnOfLostItems enabled (3.35 KB, patch)
2023-12-20 02:43 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 35587: Do not trigger transfer if lost item returned and BlockReturnOfLostItems enabled (3.40 KB, patch)
2023-12-21 18:30 UTC, ByWater Sandboxes
Details | Diff | Splinter Review
Bug 35587: Do not trigger transfer if lost item returned and BlockReturnOfLostItems enabled (3.28 KB, patch)
2023-12-27 03:40 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 35587: Do not trigger transfer if lost item returned and BlockReturnOfLostItems enabled (3.33 KB, patch)
2023-12-27 13:08 UTC, ByWater Sandboxes
Details | Diff | Splinter Review
Bug 35587: Do not trigger transfer if lost item returned and BlockReturnOfLostItems enabled (3.33 KB, patch)
2024-01-02 11:17 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 35587: (QA follow-up): QA script tidy (1.08 KB, patch)
2024-01-02 11:18 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 35587: Do not trigger transfer if lost item returned and BlockReturnOfLostItems enabled (3.38 KB, patch)
2024-01-02 11:18 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 35587: (QA follow-up): QA script tidy (1.14 KB, patch)
2024-01-02 11:18 UTC, Pedro Amorim
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Aleisha Amohia 2023-12-17 21:49:45 UTC
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
Comment 1 Katrin Fischer 2023-12-17 21:50:56 UTC
I believe it should also not trigger the transfer, it should deny checkin.
Comment 2 Aleisha Amohia 2023-12-17 21:51:53 UTC
Good (and speedy) catch! Agreed.
Comment 3 Aleisha Amohia 2023-12-20 02:43:23 UTC
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
Comment 4 ByWater Sandboxes 2023-12-21 18:30:14 UTC
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>
Comment 5 Pedro Amorim 2023-12-22 13:05:27 UTC
Test plan works as described, but this patch is causing
- prove t/db_dependent/Circulation/Branch.t
to fail.
Comment 6 Aleisha Amohia 2023-12-27 03:40:23 UTC
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>
Comment 7 Aleisha Amohia 2023-12-27 03:40:46 UTC
(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.
Comment 8 ByWater Sandboxes 2023-12-27 13:08:20 UTC
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>
Comment 9 Pedro Amorim 2024-01-02 11:17:57 UTC Comment hidden (obsolete)
Comment 10 Pedro Amorim 2024-01-02 11:18:00 UTC Comment hidden (obsolete)
Comment 11 Pedro Amorim 2024-01-02 11:18:44 UTC
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>
Comment 12 Pedro Amorim 2024-01-02 11:18:47 UTC
Created attachment 160399 [details] [review]
Bug 35587: (QA follow-up): QA script tidy

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Comment 13 Katrin Fischer 2024-01-05 13:08:10 UTC
Pushed for 24.05!

Well done everyone, thank you!
Comment 14 Fridolin Somers 2024-01-08 14:36:46 UTC
Pushed to 23.11.x for 23.11.02
Comment 15 Lucas Gass 2024-01-12 22:28:09 UTC
Backported to 23.05.x for upcoming 23.05.08