| Summary: | Items with hold cancellation requests should have the hold cancelled when checked in via SIP | ||
|---|---|---|---|
| Product: | Koha | Reporter: | Lucas Gass (lukeg) <lucas> |
| Component: | SIP2 | Assignee: | Lucas Gass (lukeg) <lucas> |
| Status: | Pushed to oldstable --- | QA Contact: | Marcel de Rooy <m.de.rooy> |
| Severity: | normal | ||
| Priority: | P5 - low | CC: | david, fridolin.somers, m.de.rooy, martin.renvoize |
| Version: | Main | ||
| Hardware: | All | ||
| OS: | All | ||
| GIT URL: | Initiative type: | --- | |
| Sponsorship status: | --- | Crowdfunding goal: | 0 |
| 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: |
25.11.00,25.05.04,24.11.10
|
Circulation function: | |
| Bug Depends on: | 22456 | ||
| Bug Blocks: | |||
| Attachments: |
Bug 39820: Cancel holds with cancellation requests via SIP
Bug 39820: Cancel holds with cancellation requests via SIP Bug 39820: Cancel holds with cancellation requests via SIP Bug 39820: (QA follow-up) Unit tests Bug 39820: Add cancellation reason and clean up cancellation request Bug 39820: Cancel holds with cancellation requests via SIP Bug 39820: (QA follow-up) Unit tests Bug 39820: Add cancellation reason and clean up cancellation request |
||
|
Description
Lucas Gass (lukeg)
2025-05-02 16:19:41 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 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> 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 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> 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 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. Created attachment 183776 [details] [review] Bug 39820: Add cancellation reason and clean up cancellation request Test tells me:
# Failed test 'The fine is displayed on checkin when show_outstanding_amount is enabled'
# at /usr/share/koha/t/db_dependent/SIP/Transaction.t line 706.
# got: 'You owe 12.00yqsA for this item.'
# expected: 'You owe $12.00 for this item.'
# Looks like you failed 1 test of 2.
Can we mock the currency?
(In reply to Marcel de Rooy from comment #8) > Test tells me: > > # Failed test 'The fine is displayed on checkin when > show_outstanding_amount is enabled' > # at /usr/share/koha/t/db_dependent/SIP/Transaction.t line 706. > # got: 'You owe 12.00yqsA for this item.' > # expected: 'You owe $12.00 for this item.' > # Looks like you failed 1 test of 2. > > Can we mock the currency? Can you tell me what steps I need to take to make this test fail? I cannot. (In reply to Lucas Gass (lukeg) from comment #9) > (In reply to Marcel de Rooy from comment #8) > > Test tells me: > > > > # Failed test 'The fine is displayed on checkin when > > show_outstanding_amount is enabled' > > # at /usr/share/koha/t/db_dependent/SIP/Transaction.t line 706. > > # got: 'You owe 12.00yqsA for this item.' > > # expected: 'You owe $12.00 for this item.' > > # Looks like you failed 1 test of 2. > > > > Can we mock the currency? > > Can you tell me what steps I need to take to make this test fail? I cannot. We now fixed this on another report. Back to SO Created attachment 186118 [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> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Created attachment 186119 [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 Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Created attachment 186120 [details] [review] Bug 39820: Add cancellation reason and clean up cancellation request Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Nice work everyone! Pushed to main for 25.11 Nice work everyone! Pushed to 25.05.x Pushed to 24.11.x for 24.11.10 |