Bug 34901 - Item-level holds can show inaccurate transit status on the patron details page
Summary: Item-level holds can show inaccurate transit status on the patron details page
Status: Pushed to oldstable
Alias: None
Product: Koha
Classification: Unclassified
Component: Hold requests (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Emily Lamancusa
QA Contact: Katrin Fischer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-09-23 21:17 UTC by Emily Lamancusa
Modified: 2023-11-13 13:46 UTC (History)
3 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:
23.11.00,23.05.05,22.11.12


Attachments
Bug 34901: Display transit status on patron holds tab only if hold found value is "T" (2.65 KB, patch)
2023-09-27 17:03 UTC, Emily Lamancusa
Details | Diff | Splinter Review
Bug 34901: Display transit status on patron holds tab only if hold found value is "T" (2.71 KB, patch)
2023-10-13 11:22 UTC, ByWater Sandboxes
Details | Diff | Splinter Review
Bug 34901: Display transit status on patron holds tab only if hold found value is "T" (2.70 KB, patch)
2023-10-13 11:34 UTC, Biblibre Sandboxes
Details | Diff | Splinter Review
Bug 34901: Display transit status on patron holds tab only if hold found value is "T" (2.82 KB, patch)
2023-10-14 17:17 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Emily Lamancusa 2023-09-23 21:17:27 UTC
If a patron has an item-level hold, and that same item happens to be in transit or waiting for a different patron's hold, the patron details page will label the item-level hold as in transit. Since the item-level hold has not been found yet, it should have a blank status.

To reproduce:
1. Place a record-level hold for Patron A, for pickup at a library other than the logged-in library
2. Check in an item
--> Note that the item is now in transit for the hold
3. Place an item-level hold for Patron B on that same item
4. Go to the details page for Patron B, and click on their Holds tab
--> The status column now says the hold is in transit, although it is actually Patron A's hold that is in transit
5. Switch the logged in library to match the pickup location for Patron A's hold
6. Check the item in again
--> Note that Patron A's hold is now Waiting
7. Return to the details page for Patron B
--> The status column says the hold is "not yet transferred"
Comment 1 Emily Lamancusa 2023-09-27 17:03:41 UTC
Created attachment 156302 [details] [review]
Bug 34901: Display transit status on patron holds tab only if hold found value is "T"

Check the transit status of the *hold* in addition to the transit status
of the *item*, to avoid displaying a misleading transit status on
item-level holds when the item is actually in transit for a different
hold

To test:
1. Create a record-level hold for Patron A for pickup at a library other
   than the logged-in library
2. Check in an item to fill that hold
3. Put an item-level hold on that same item for Patron B at a different
   library other than the logged-in library
4. Open Patron A's and Patron B's account details pages in separate tabs
--> Note that the Holds tab on Patron A's account detail page correctly
    shows that their hold is in-transit
--> Note that the Holds tab on Patron B's account detail page incorrectly
    shows that their hold on the same item is also in-transit
4. Apply patch
5. Clear browser cache
6. Refresh both patrons' account details pages
--> Confirm that the holds tab on Patron A's account still correctly
    says their hold is in-transit
--> Confirm that the holds tab on Patron B's account now correctly shows
    a blank status for their hold
7. Cancel Patron A's hold
8. Check in the item again to put it in transit for Patron B's hold
9. Reload Patron B's account page
--> Confirm that the holds tab on Patron B's account now correctly says
    their hold is in-transit
Comment 2 ByWater Sandboxes 2023-10-13 11:22:44 UTC
Created attachment 157065 [details] [review]
Bug 34901: Display transit status on patron holds tab only if hold found value is "T"

Check the transit status of the *hold* in addition to the transit status
of the *item*, to avoid displaying a misleading transit status on
item-level holds when the item is actually in transit for a different
hold

To test:
1. Create a record-level hold for Patron A for pickup at a library other
   than the logged-in library
2. Check in an item to fill that hold
3. Put an item-level hold on that same item for Patron B at a different
   library other than the logged-in library
4. Open Patron A's and Patron B's account details pages in separate tabs
--> Note that the Holds tab on Patron A's account detail page correctly
    shows that their hold is in-transit
--> Note that the Holds tab on Patron B's account detail page incorrectly
    shows that their hold on the same item is also in-transit
4. Apply patch
5. Clear browser cache
6. Refresh both patrons' account details pages
--> Confirm that the holds tab on Patron A's account still correctly
    says their hold is in-transit
--> Confirm that the holds tab on Patron B's account now correctly shows
    a blank status for their hold
7. Cancel Patron A's hold
8. Check in the item again to put it in transit for Patron B's hold
9. Reload Patron B's account page
--> Confirm that the holds tab on Patron B's account now correctly says
    their hold is in-transit

Signed-off-by: Katariina Hanhisalo <katariina.hanhisalo@xamk.fi>
Comment 3 Katariina Hanhisalo 2023-10-13 11:25:11 UTC
Batch works as described. Just to notice, if you in the end also cancel Patron Bs hold and check in the book, it still wants to go to the palace where Patron B had the pick-up location. But this is another problem I think.
Comment 4 Biblibre Sandboxes 2023-10-13 11:34:18 UTC
Created attachment 157067 [details] [review]
Bug 34901: Display transit status on patron holds tab only if hold found value is "T"

Check the transit status of the *hold* in addition to the transit status
of the *item*, to avoid displaying a misleading transit status on
item-level holds when the item is actually in transit for a different
hold

To test:
1. Create a record-level hold for Patron A for pickup at a library other
   than the logged-in library
2. Check in an item to fill that hold
3. Put an item-level hold on that same item for Patron B at a different
   library other than the logged-in library
4. Open Patron A's and Patron B's account details pages in separate tabs
--> Note that the Holds tab on Patron A's account detail page correctly
    shows that their hold is in-transit
--> Note that the Holds tab on Patron B's account detail page incorrectly
    shows that their hold on the same item is also in-transit
4. Apply patch
5. Clear browser cache
6. Refresh both patrons' account details pages
--> Confirm that the holds tab on Patron A's account still correctly
    says their hold is in-transit
--> Confirm that the holds tab on Patron B's account now correctly shows
    a blank status for their hold
7. Cancel Patron A's hold
8. Check in the item again to put it in transit for Patron B's hold
9. Reload Patron B's account page
--> Confirm that the holds tab on Patron B's account now correctly says
    their hold is in-transit

Signed-off-by: Tuomas Kunttu <tuomas.kunttu@kouvola.fi>
Comment 5 Katrin Fischer 2023-10-14 17:17:40 UTC
Created attachment 157162 [details] [review]
Bug 34901: Display transit status on patron holds tab only if hold found value is "T"

Check the transit status of the *hold* in addition to the transit status
of the *item*, to avoid displaying a misleading transit status on
item-level holds when the item is actually in transit for a different
hold

To test:
1. Create a record-level hold for Patron A for pickup at a library other
   than the logged-in library
2. Check in an item to fill that hold
3. Put an item-level hold on that same item for Patron B at a different
   library other than the logged-in library
4. Open Patron A's and Patron B's account details pages in separate tabs
--> Note that the Holds tab on Patron A's account detail page correctly
    shows that their hold is in-transit
--> Note that the Holds tab on Patron B's account detail page incorrectly
    shows that their hold on the same item is also in-transit
4. Apply patch
5. Clear browser cache
6. Refresh both patrons' account details pages
--> Confirm that the holds tab on Patron A's account still correctly
    says their hold is in-transit
--> Confirm that the holds tab on Patron B's account now correctly shows
    a blank status for their hold
7. Cancel Patron A's hold
8. Check in the item again to put it in transit for Patron B's hold
9. Reload Patron B's account page
--> Confirm that the holds tab on Patron B's account now correctly says
    their hold is in-transit

Signed-off-by: Katariina Hanhisalo <katariina.hanhisalo@xamk.fi>
Signed-off-by: Tuomas Kunttu <tuomas.kunttu@kouvola.fi>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 6 Tomás Cohen Arazi 2023-10-18 13:23:19 UTC
Pushed to master for 23.11.

Nice work everyone, thanks!
Comment 7 Fridolin Somers 2023-10-25 07:21:14 UTC
Pushed to 23.05.x for 23.05.05
Comment 8 Matt Blenkinsop 2023-11-13 13:46:09 UTC
Nice work everyone!

Pushed to oldstable for 22.11.x