Bug 39820 - Items with hold cancellation requests should have the hold cancelled when checked in via SIP
Summary: Items with hold cancellation requests should have the hold cancelled when che...
Status: Failed QA
Alias: None
Product: Koha
Classification: Unclassified
Component: SIP2 (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Lucas Gass (lukeg)
QA Contact: Martin Renvoize (ashimema)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-05-02 16:19 UTC by Lucas Gass (lukeg)
Modified: 2025-05-12 13:51 UTC (History)
2 users (show)

See Also:
GIT URL:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
This fixes checking in items using SIP, and there is a hold cancellation request - the hold is now cancelled. Before this, it did not cancel the hold and it was still listed under "Holds with cancellation requests" (Circulation > Holds > Holds awaiting pickup).
Version(s) released in:
Circulation function:


Attachments
Bug 39820: Cancel holds with cancellation requests via SIP (1.45 KB, patch)
2025-05-06 21:23 UTC, Lucas Gass (lukeg)
Details | Diff | Splinter Review
Bug 39820: Cancel holds with cancellation requests via SIP (1.50 KB, patch)
2025-05-08 17:27 UTC, David Nind
Details | Diff | Splinter Review
Bug 39820: Cancel holds with cancellation requests via SIP (1.56 KB, patch)
2025-05-12 13:50 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39820: (QA follow-up) Unit tests (3.43 KB, patch)
2025-05-12 13:50 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 Lucas Gass (lukeg) 2025-05-02 16:19:41 UTC
To recreate:
1. In circ rules set a Default waiting hold cancellation policy to allow hold cancellation requests. 
2. Add a hold for a patron and create a hold cancellation request.
3. Check the item in via SIP, I used the SIP emulator:

kohadevbox/koha/misc/sip_cli_emulator.pl -a localhost -p 6001 -l MPL -su term1 -sp term1 -m checkin --patron 23529000035676 --item 39999000001310

4. The hold remains.

In the staff client if I check in an item with a hold cancellation request the hold is cancelled
Comment 1 Lucas Gass (lukeg) 2025-05-06 21:23:36 UTC
Created attachment 181999 [details] [review]
Bug 39820: Cancel holds with cancellation requests via SIP

To test:
1. In circ rules set a Default waiting hold cancellation policy to allow hold cancellation requests.
2. Add a hold for a patron and create a hold cancellation request.
3. Check the item in via SIP, I used the SIP emulator:

kohadevbox/koha/misc/sip_cli_emulator.pl -a localhost -p 6001 -l MPL -su term1 -sp term1 -m checkin --patron 23529000035676 --item 39999000001310

4. The hold remains.
5. APPLY PATCH, restart_all
6. Try 2 - 4 again, the hold should be cancelled
Comment 2 David Nind 2025-05-08 17:27:28 UTC
Created attachment 182105 [details] [review]
Bug 39820: Cancel holds with cancellation requests via SIP

To test:
1. In circ rules set a Default waiting hold cancellation policy to allow hold cancellation requests.
2. Add a hold for a patron and create a hold cancellation request.
3. Check the item in via SIP, I used the SIP emulator:

kohadevbox/koha/misc/sip_cli_emulator.pl -a localhost -p 6001 -l MPL -su term1 -sp term1 -m checkin --patron 23529000035676 --item 39999000001310

4. The hold remains.
5. APPLY PATCH, restart_all
6. Try 2 - 4 again, the hold should be cancelled

Signed-off-by: David Nind <david@davidnind.com>
Comment 3 David Nind 2025-05-08 18:06:32 UTC
Testing notes (using KTD):
1. For step 2, check the item in so that the hold is waiting for pickup.
2. For step 3, change the command to reflect your library, patron, and item (I used Mary Burton + Perl programming - 39999000011418):
   - MPL --> CPL
   - --patron 23529000035676 --> --patron 23529000651225
   - --item 39999000001310 --> --item 39999000011418
Comment 4 Martin Renvoize (ashimema) 2025-05-12 13:50:25 UTC
Created attachment 182276 [details] [review]
Bug 39820: Cancel holds with cancellation requests via SIP

To test:
1. In circ rules set a Default waiting hold cancellation policy to allow hold cancellation requests.
2. Add a hold for a patron and create a hold cancellation request.
3. Check the item in via SIP, I used the SIP emulator:

kohadevbox/koha/misc/sip_cli_emulator.pl -a localhost -p 6001 -l MPL -su term1 -sp term1 -m checkin --patron 23529000035676 --item 39999000001310

4. The hold remains.
5. APPLY PATCH, restart_all
6. Try 2 - 4 again, the hold should be cancelled

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Comment 5 Martin Renvoize (ashimema) 2025-05-12 13:50:28 UTC
Created attachment 182277 [details] [review]
Bug 39820: (QA follow-up) Unit tests

This patch adds unit tests.. but it also adds some FIXME and QUESTION
statements to those tests
Comment 6 Martin Renvoize (ashimema) 2025-05-12 13:51:55 UTC
Afraid whilst writing unit tests for this I had questions...

1) Should we be passing anything to the cancel call (cancellation reason for example)
2) Should we be cleaning up the cancellation requests?

Failing QA whilst we get answers to those questions.