Bug 26698 - Hold can show as waiting and in transit at the same time
Summary: Hold can show as waiting and in transit at the same time
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Hold requests (show other bugs)
Version: 20.05
Hardware: All All
: P5 - low normal
Assignee: Nick Clemens (kidclamp)
QA Contact: Testopia
URL:
Keywords:
: 26105 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-10-15 19:11 UTC by Nick Clemens (kidclamp)
Modified: 2021-12-13 21:08 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
20.05.08
Circulation function:


Attachments
Bug 26698: Use is_at_destination to determine if hold is at destination (2.06 KB, patch)
2020-10-15 19:28 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 26698: Use is_at_destination to determine if hold is at destination (2.12 KB, patch)
2020-12-17 17:49 UTC, Victor Grousset/tuxayo
Details | Diff | Splinter Review
Bug 26698: Use is_at_destination to determine if hold is at destination (2.18 KB, patch)
2021-01-11 12:37 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Clemens (kidclamp) 2020-10-15 19:11:00 UTC
If a hold is requested, checked in at another branch, set to transit, then checked in but ignored at the receiving branch it can appear incorrectly on request.pl as the code checks:
1 - That there are no transfers
2 - That the items holding branch is the same as the request branch
Comment 1 Nick Clemens (kidclamp) 2020-10-15 19:28:15 UTC
Created attachment 111789 [details] [review]
Bug 26698: Use is_at_destination to determine if hold is at destination

This copies code from bug 12556 and uses a Koha::Hold method rather than
code in script

TO test:
1 - Place a hold for item from library B for delivery at library A
2 - Check the item in at library B, confirm and transfer
3 - Check item in at Library A but ignore the hold
4 - View the Holds tab of the details page:
    http://localhost:8081/cgi-bin/koha/reserve/request.pl?biblionumber=6
5 - Priority = "In transit"  Pickup Library = "Item waiting at"
6 - Apply patch
7 - Restart all the thigns
8 - Reload the page
9 - Priority="In transit" and Pickup library="Item being transferred"
Comment 2 Andrew Fuerste-Henry 2020-10-19 15:51:32 UTC
*** Bug 26105 has been marked as a duplicate of this bug. ***
Comment 3 Victor Grousset/tuxayo 2020-12-12 15:57:14 UTC
Tried twice the test plan and at step 5 didn't got the issue. But got «Priority="In transit" and Pickup library="Item being transferred"»

Does the issue still happens?
Comment 4 Nick Clemens (kidclamp) 2020-12-15 13:48:30 UTC
(In reply to Victor Grousset/tuxayo from comment #3)
> Tried twice the test plan and at step 5 didn't got the issue. But got
> «Priority="In transit" and Pickup library="Item being transferred"»
> 
> Does the issue still happens?

Are you testing on 20.05?
Comment 5 Victor Grousset/tuxayo 2020-12-17 13:46:23 UTC
:o
I missed that, thanks.
Comment 6 Victor Grousset/tuxayo 2020-12-17 17:49:20 UTC
Created attachment 114486 [details] [review]
Bug 26698: Use is_at_destination to determine if hold is at destination

This copies code from bug 12556 and uses a Koha::Hold method rather than
code in script

TO test:
1 - Place a hold for item from library B for delivery at library A
2 - Check the item in at library B, confirm and transfer
3 - Check item in at Library A but ignore the hold
4 - View the Holds tab of the details page:
    http://localhost:8081/cgi-bin/koha/reserve/request.pl?biblionumber=6
5 - Priority = "In transit"  Pickup Library = "Item waiting at"
6 - Apply patch
7 - Restart all the thigns
8 - Reload the page
9 - Priority="In transit" and Pickup library="Item being transferred"

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Comment 7 Victor Grousset/tuxayo 2020-12-17 17:49:40 UTC
It works! :)
Comment 8 Martin Renvoize (ashimema) 2021-01-11 12:37:55 UTC
Created attachment 115019 [details] [review]
Bug 26698: Use is_at_destination to determine if hold is at destination

This copies code from bug 12556 and uses a Koha::Hold method rather than
code in script

TO test:
1 - Place a hold for item from library B for delivery at library A
2 - Check the item in at library B, confirm and transfer
3 - Check item in at Library A but ignore the hold
4 - View the Holds tab of the details page:
    http://localhost:8081/cgi-bin/koha/reserve/request.pl?biblionumber=6
5 - Priority = "In transit"  Pickup Library = "Item waiting at"
6 - Apply patch
7 - Restart all the thigns
8 - Reload the page
9 - Priority="In transit" and Pickup library="Item being transferred"

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 9 Martin Renvoize (ashimema) 2021-01-11 12:38:15 UTC
Trivial fix, works as expected.. Passing QA
Comment 10 Jonathan Druart 2021-01-12 10:19:10 UTC
Sending to RM 20.05 queue.
Comment 11 Andrew Fuerste-Henry 2021-01-13 21:54:45 UTC
Pushed to 20.05.x for 20.05.08
Comment 12 Victor Grousset/tuxayo 2021-01-21 20:05:27 UTC
Not backported to oldoldstable (19.11.x). Feel free to ask if it's needed.