Bug 39569

Summary: When cancelling a hold waiting past expiration date triggers a transfer the libraries name is not in alert
Product: Koha Reporter: Brendan Lawlor <blawlor>
Component: CirculationAssignee: Brendan Lawlor <blawlor>
Status: Pushed to main --- QA Contact: Nick Clemens (kidclamp) <nick>
Severity: trivial    
Priority: P5 - low CC: gmcharlt, kyle.m.hall, nick
Version: Main   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: Trivial patch Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
25.05.00
Circulation function:
Attachments: Bug 39569: Fix branch name in alert when cancelling holds over x
Bug 39569: Fix branch name in alert when cancelling holds over x

Description Brendan Lawlor 2025-04-04 18:29:15 UTC
To recreate:
- Use a bib with a single item to make this easier
- Place two holds on a bib with pickup at one library
- Place some more holds for pickup at a different library
- Check the item in to the first library
- Set the expiration date back in time, using ktd --dbshell can help
  update reserves set expirationdate = DATE('2024-01-01') where branchcode='CPL';
- On Holds awaiting pickup > Holds waiting past their expiration date
  use the button in the actions tab to 'Cancel hold'
  the alert says: This item is on hold for pick-up at your library'
- click OK
- Check the item in again and set expiration date to expired again
- On Holds awaiting pickup > Holds waiting past their expiration date
  use the button in the actions tab to 'Cancel hold and transfer to: [libraryname]'
- Notice the alert says 'This item is on hold for pick-up at' with no library name
Comment 1 Brendan Lawlor 2025-04-04 18:51:16 UTC
Created attachment 180670 [details] [review]
Bug 39569: Fix branch name in alert when cancelling holds over x

To test:
1. On a bib with one item place a hold for pickup at library A and Library B
2. Check the item into library A
3. Set the first hold's expiration date to the past
4. On Holds awaiting pickup > Holds waiting past their expiration date
   In the actions column click the 'Cancel hold' button
5. Notice the alert says 'This item is on hold for pick-up at'
   with no library name
6. Apply patch and redo steps 1-4
7. Confirm the alert include's Library B's name
   This item is on hold for pick-up at Library B
Comment 2 Nick Clemens (kidclamp) 2025-04-25 11:11:02 UTC
Created attachment 181503 [details] [review]
Bug 39569: Fix branch name in alert when cancelling holds over x

To test:
1. On a bib with one item place a hold for pickup at library A and Library B
2. Check the item into library A
3. Set the first hold's expiration date to the past
4. On Holds awaiting pickup > Holds waiting past their expiration date
   In the actions column click the 'Cancel hold' button
5. Notice the alert says 'This item is on hold for pick-up at'
   with no library name
6. Apply patch and redo steps 1-4
7. Confirm the alert include's Library B's name
   This item is on hold for pick-up at Library B

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 3 Nick Clemens (kidclamp) 2025-04-25 11:11:17 UTC
Trivial fix, PQA
Comment 4 Katrin Fischer 2025-04-25 17:28:24 UTC
Pushed for 25.05!

Well done everyone, thank you!