Summary: | Fix single cancel recall button in recalls tab in staff interface and correctly handle cancellations with branch transfers | ||
---|---|---|---|
Product: | Koha | Reporter: | David Nind <david> |
Component: | Circulation | Assignee: | Aleisha Amohia <aleisha> |
Status: | CLOSED FIXED | QA Contact: | Katrin Fischer <katrin.fischer> |
Severity: | major | ||
Priority: | P5 - low | CC: | aleisha, arthur.suzuki, gmcharlt, jonathan.druart, kyle.m.hall, lucas |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30924 | ||
Change sponsored?: | --- | Patch complexity: | Small patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: |
This fixes the 'cancel' recall button in several places so that it now works as expected (including the recalls tab in a patron's details section, the recalls section for a record, and the circulation recalls queue and recalls to pull pages). It also ensures a correct cancellation reason is logged when cancelling a recall in transit.
|
Version(s) released in: |
22.11.00, 22.05.08
|
Circulation function: | |||
Bug Depends on: | |||
Bug Blocks: | 29734 | ||
Attachments: |
Bug 30944: Fix cancelling selected recalls from biblio recalls tab
Bug 30944: Fix cancel recalls actions Bug 30944: Fix cancel recalls actions Bug 30944: Fix cancel recalls actions Bug 30944: Undo change to ILS-DI documentation |
Description
David Nind
2022-06-10 16:22:25 UTC
(In reply to David Nind from comment #0) > c. In addition, after you press "Cancel...": > - the URL changes to > http://127.0.0.1:8081/cgi-bin/koha/recalls/request.pl > - clicking on normal (or any other tab gives you the message "The > record you requested does not exist ()." > - URL is > http://127.0.0.1:8081/cgi-bin/koha/catalogue/detail.pl?biblionumber= Can be fixed with: diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/recalls/request.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/recalls/request.tt index 2f4a573cf8d..3fcc9d8ea9e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/recalls/request.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/recalls/request.tt @@ -29,6 +29,7 @@ [% IF recalls.count %] <form method="post" action="/cgi-bin/koha/recalls/request.pl"> <input type="hidden" name="op" value="cancel_multiple_recalls"> + <input type="hidden" name="biblionumber" value="[% biblio.biblionumber | html %]"> <input type="checkbox" id="select_all"> <span id="select_all_text">Select all</span> [% INCLUDE 'recalls.inc' %] <fieldset class="action"> > 3. Once a recall is made, and checked in: > . From Circulation > Recalls > Recalls to pull: select "Cancel recall and > return to: Centerville: generates this error: > > DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st > execute failed: Data truncated for column 'reason' at row 1 at > /kohadevbox/koha/Koha/Object.pm line 170 > at /usr/share/perl5/DBIx/Class/Exception.pm line 77 > ..... branchtransfers.cancellation_reason does not contain 'RecallCancellation' (but 'CancelRecall') Aleisha, can you have a look at this bug please? See the previous comment. Taking a look now! Created attachment 139012 [details] [review] Bug 30944: Fix cancelling selected recalls from biblio recalls tab This is a WIP Created attachment 139034 [details] [review] Bug 30944: Fix cancel recalls actions This patch fixes the 'cancel selected recalls' button on the biblio details Recalls page, and ensures a correct cancellation reason is logged when cancelling a recall in transit. To test: 1) Ensure UseRecalls is enabled and relevant recalls circulation rules are set 2) Check out Item A to Patron B 3) Log into OPAC as Patron A 4) Search for Item A and place a recall 5) Go back to the staff interface and search for Item A. When viewing the biblio record, go to the recalls tab. 6) Check the checkbox for your recall, and click the button to cancel selected recalls. 7) Confirm your recall is successfully removed and you're redirected to the correct recalls page for this biblio. 8) Go back to the OPAC and place a recall again. This time set the pickup location to a different library, one that you're not logged in at 9) Back in the staff interface, check in Item A and confirm the recall and transfer 10) Go to Circulation -> Recalls to pull. Your recall should show here. Click the button to cancel the recall and revert the transfer 11) Confirm the recall has been cancelled 12) Go to Reports and create a new SQL report with the following SQL: select * from branchtransfers b join items i on b.itemnumber=i.itemnumber where i.barcode = <<barcode>> 13) Run the report and paste the barcode of Item A in the field 14) Confirm there are two rows returned - the transfer triggered when the recall was confirmed, with a reason of 'Recall' and a cancellation reason of 'RecallCancellation, and the transfer sending the item back home when the recall was cancelled, with a reason of 'RecallCancellation'. Sponsored-by: Catalyst IT Created attachment 140411 [details] [review] Bug 30944: Fix cancel recalls actions This patch fixes the 'cancel selected recalls' button on the biblio details Recalls page, and ensures a correct cancellation reason is logged when cancelling a recall in transit. To test: 1) Ensure UseRecalls is enabled and relevant recalls circulation rules are set 2) Check out Item A to Patron B 3) Log into OPAC as Patron A 4) Search for Item A and place a recall 5) Go back to the staff interface and search for Item A. When viewing the biblio record, go to the recalls tab. 6) Check the checkbox for your recall, and click the button to cancel selected recalls. 7) Confirm your recall is successfully removed and you're redirected to the correct recalls page for this biblio. 8) Go back to the OPAC and place a recall again. This time set the pickup location to a different library, one that you're not logged in at 9) Back in the staff interface, check in Item A and confirm the recall and transfer 10) Go to Circulation -> Recalls to pull. Your recall should show here. Click the button to cancel the recall and revert the transfer 11) Confirm the recall has been cancelled 12) Go to Reports and create a new SQL report with the following SQL: select * from branchtransfers b join items i on b.itemnumber=i.itemnumber where i.barcode = <<barcode>> 13) Run the report and paste the barcode of Item A in the field 14) Confirm there are two rows returned - the transfer triggered when the recall was confirmed, with a reason of 'Recall' and a cancellation reason of 'RecallCancellation, and the transfer sending the item back home when the recall was cancelled, with a reason of 'RecallCancellation'. Sponsored-by: Catalyst IT Signed-off-by: David Nind <david@davidnind.com> Testing notes (using koha-testing-docker): - Setup recalls and replicate the issue as described in comment #1. - Apply the patch and update the database (updatedatabase). - Follow the test plan. Ok, took a while to work through this, but now I think I got it: * Bug 30924 added RecallCancellation to the branchtransfers.reason, but now we are also adding it to cancellation_reason. Makes sense. * The changes to the ilsdi files are not correct. The listings refer to the service defined in the ILS-DI documentation. It is called CancelRecall and should remain like that. See: https://old.diglib.org/architectures/ilsdi/DLF_ILS_Discovery_1.0.pdf. I am providing a follow-up for this. * I've run through the test plan without the change and didn't manage to create an entry to branchtransfers with CancelRecall so no more clean-up should be needed (it looked like the entries were not created properly at all) Created attachment 141207 [details] [review] Bug 30944: Fix cancel recalls actions This patch fixes the 'cancel selected recalls' button on the biblio details Recalls page, and ensures a correct cancellation reason is logged when cancelling a recall in transit. To test: 1) Ensure UseRecalls is enabled and relevant recalls circulation rules are set 2) Check out Item A to Patron B 3) Log into OPAC as Patron A 4) Search for Item A and place a recall 5) Go back to the staff interface and search for Item A. When viewing the biblio record, go to the recalls tab. 6) Check the checkbox for your recall, and click the button to cancel selected recalls. 7) Confirm your recall is successfully removed and you're redirected to the correct recalls page for this biblio. 8) Go back to the OPAC and place a recall again. This time set the pickup location to a different library, one that you're not logged in at 9) Back in the staff interface, check in Item A and confirm the recall and transfer 10) Go to Circulation -> Recalls to pull. Your recall should show here. Click the button to cancel the recall and revert the transfer 11) Confirm the recall has been cancelled 12) Go to Reports and create a new SQL report with the following SQL: select * from branchtransfers b join items i on b.itemnumber=i.itemnumber where i.barcode = <<barcode>> 13) Run the report and paste the barcode of Item A in the field 14) Confirm there are two rows returned - the transfer triggered when the recall was confirmed, with a reason of 'Recall' and a cancellation reason of 'RecallCancellation, and the transfer sending the item back home when the recall was cancelled, with a reason of 'RecallCancellation'. Sponsored-by: Catalyst IT Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Created attachment 141208 [details] [review] Bug 30944: Undo change to ILS-DI documentation The service not implemented by Koha is CancelRecall as specified in: https://old.diglib.org/architectures/ilsdi/DLF_ILS_Discovery_1.0.pdf Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Pushed to master for 22.11. Nice work everyone, thanks! Backported to 22.05.x for upcoming 22.05.08 release depends on recalls feature not present in 21.11. won't backport |