Bug 23258 - Batch tool for placing and cancelling holds
Summary: Batch tool for placing and cancelling holds
Status: Failed QA
Alias: None
Product: Koha
Classification: Unclassified
Component: Tools (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement with 50 votes (vote)
Assignee: Matthias Meusburger
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-07-03 14:59 UTC by Matthias Meusburger
Modified: 2024-02-08 17:51 UTC (History)
9 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 23258: Batch holding (13.25 KB, patch)
2019-07-03 15:00 UTC, Matthias Meusburger
Details | Diff | Splinter Review
Bug 23258: Batch holding (13.24 KB, patch)
2020-06-19 08:46 UTC, Matthias Meusburger
Details | Diff | Splinter Review
Bug 23258: Batch holding (13.25 KB, patch)
2020-06-19 12:31 UTC, Matthias Meusburger
Details | Diff | Splinter Review
Bug 23258: Batch holding (13.41 KB, patch)
2020-06-19 13:16 UTC, Matthias Meusburger
Details | Diff | Splinter Review
Bug 23258: (follow-up) Batch holds template followup (22.30 KB, patch)
2020-07-06 16:07 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 23258: (follow-up) QA fixes (9.94 KB, patch)
2020-07-27 09:45 UTC, Matthias Meusburger
Details | Diff | Splinter Review
Bug 23258: (follow-up) QA fixes: perltidy the script (8.77 KB, patch)
2020-08-18 12:59 UTC, Matthias Meusburger
Details | Diff | Splinter Review
Bug 23258: Batch holding (22.73 KB, patch)
2020-08-18 13:36 UTC, Matthias Meusburger
Details | Diff | Splinter Review
cancelling (59.56 KB, image/png)
2020-08-19 13:22 UTC, Kelly McElligott
Details
link to a blank record (105.20 KB, image/png)
2020-08-19 13:23 UTC, Kelly McElligott
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matthias Meusburger 2019-07-03 14:59:21 UTC
Add a "batch holding" tool (just like batch item modification, batch patron deletion...)

This tool would allow to place or cancel holds in batch.
Comment 1 Matthias Meusburger 2019-07-03 15:00:23 UTC Comment hidden (obsolete)
Comment 2 Owen Leonard 2019-07-03 16:36:11 UTC
I can't seem to get this to work... Every time I submit a set of barcodes it tells me none of them can be placed on hold. I can place an item-level hold for the same patron using the regular method, so I assume it's not a problem with my circulation rules.
Comment 3 Owen Leonard 2019-07-03 16:38:37 UTC
This needs some follow-up work to fix QA tool warnings too.
Comment 4 Matthias Meusburger 2020-06-19 08:46:29 UTC Comment hidden (obsolete)
Comment 5 Matthias Meusburger 2020-06-19 12:31:25 UTC Comment hidden (obsolete)
Comment 6 Matthias Meusburger 2020-06-19 13:16:02 UTC
Created attachment 106091 [details] [review]
Bug 23258: Batch holding

This patch allows to batch place or cancel holds.

Test plan:

 1) Apply the patch
 2) Go to Circulation -> Batch holding
 3) Check that you can either upload a barcode file or use the textarea
 4) Check that you can place holds on items
 5) Check that you can cancel holds on items
Comment 7 Matthias Meusburger 2020-06-19 13:24:48 UTC
Thanks for the feedback Owen.

The patch has been rebased and fixed to work again on master.

All QA fails have been corrected, except for this one:

forbidden pattern: Script permissions is authnotrequired => 0, it could be correct for an OPAC script if it is was you really want error (bug 24663)

...which cannot be fixed until Bug 24663 is pushed.
Comment 8 Didier Gautheron 2020-07-03 07:03:49 UTC
Hi

should be
my $op           = $input->param('op') // '';

remove an 'op is undefined' warning in plack.
Comment 9 Owen Leonard 2020-07-06 16:07:34 UTC
Created attachment 106598 [details] [review]
Bug 23258: (follow-up) Batch holds template followup

This patch revises the batch holds template to bring it up to date with
current guidelines including corrected indentation, Bootstrap grid,
terminology fixes ("hold" instead of "reserve") and JavaScript in the
footer.

Also changed:
- Add specificity to page title and breadcrumbs
- Add "Select all" and "Clear all" links to confirmation page
- Add jQuery validation of the form, enforcing barcode and patron entry
- Swith from "Batch holding" to "Batch place and cancel holds."
- Made suggested change to avoid errors in the log:
  my $op  = $input->param('op') // '';
- Fixed some other QA tool errors

To test, apply the patch and test the process of placing and cancelling
holds in batches:

 - By uploading a file of barcodes
 - By submitting barcodes in the textarea
 - Confirm that holds are placed and cancelled

 At each step of the process confirm that everything looks good and
 works properly.
Comment 10 Owen Leonard 2020-07-06 16:16:59 UTC
This looks like it's working pretty well but I'd like to see a couple of improvements to the information provided to the user during the process.

Can we add title information to the lists of submitted barcodes? Both on the screen with the checkboxes and on the confirmation page after submission. I think it would also be good to show the patron and pickup branch information on these screens. The final result screen should provide links to both the bibliographic record detail page and the holds page for that title.

At the very least the result screen needs to have more useful information. Right now it has something like:

The following items have been placed on hold:

    itemnumber 816, reserve_id 168

The itemnumber and reserve_id numbers are not useful to the librarian.


Not a QA problem but a suggestion: How hard would it be to offer the option of placing or cancelling title-level holds instead of item-level holds?
Comment 11 Matthias Meusburger 2020-07-17 14:49:49 UTC
Thank you for the feedback and improvements, Owen.

You're absolutely right, the result screen lacks relevant information.

I will provide a follow-up.
Comment 12 Matthias Meusburger 2020-07-27 09:45:51 UTC
Created attachment 107408 [details] [review]
Bug 23258: (follow-up) QA fixes

This patch adds relevant informations to the confirmation and results pages:

 - Patron name (with link)
 - Pickup location
 - Biblio title and item barcode (with link)
 - Link to the holds for the title on the result screen
Comment 13 Jonathan Druart 2020-07-28 06:52:27 UTC
Salut Matts, please perltidy the script :)
Comment 14 Matthias Meusburger 2020-08-18 12:59:29 UTC
Created attachment 108498 [details] [review]
Bug 23258: (follow-up) QA fixes: perltidy the script
Comment 15 Matthias Meusburger 2020-08-18 12:59:52 UTC
Salut Joubu, it's done :)
Comment 16 Jonathan Druart 2020-08-18 13:30:52 UTC
Nothing is signed off already, I'd suggest to squash everything :)
Comment 17 Matthias Meusburger 2020-08-18 13:36:04 UTC
Created attachment 108504 [details] [review]
Bug 23258: Batch holding

This patch allows to batch place or cancel holds.

Test plan:

 1) Apply the patch
 2) Go to Circulation -> Batch holding
 3) Check that you can either upload a barcode file or use the textarea
 4) Check that you can place holds on items
 5) Check that you can cancel holds on items
Comment 18 Matthias Meusburger 2020-08-18 13:36:50 UTC
Also done!
Comment 19 Kelly McElligott 2020-08-19 13:21:47 UTC
I was successful in adding a barcode file and entering barcodes in to the text box to add holds to a patron's account.  When I attempted to cancel the holds, the holds did cancel, however after confirming the cancel, the screen that showed the Cancelled holds.  In this matrix, the title and Item was blank, the holds column had clickable links that said "show holds".  These links brought up a hold screen for a title called "No Title).  The bib didn't exist.  See screenshots: 



http://staff-holds.sb1.sandboxes.bywatersolutions.com/cgi-bin/koha/circ/batch_holding.pl
Comment 20 Kelly McElligott 2020-08-19 13:22:15 UTC
Created attachment 108628 [details]
cancelling
Comment 21 Kelly McElligott 2020-08-19 13:23:23 UTC
Created attachment 108630 [details]
link to a blank record
Comment 22 Séverine Queune 2020-11-04 12:25:47 UTC
Sorry Matthias, I fail this patch for it doesn't respect the availability of the item (tested with notforloan !=0, itype without holds allowed).

I also agree with Kelly about the table displayed after the cancellation : biblio datas are missing, it could be useful to display them so it becomes possible to place an individual hold after cancelling (patrons can sometimes be hesitant...). Presence of the link "Show holds" makes me think it was the original purpose of this table, am I right ?

Some things I wonder about :
- when cancelling holds, don't know if a warning for an item with no hold for this patron could be useful or not
- when cancelling the action on 'Confirm selection' page, maybe we could return to 'Batch holding' page instead of 'Circulation home'

Several good points though ! :
- warning on unknown barcode
- warning when patron already has a hold on the item- good recalculation of priority if cancelled hold was not the last one
- respect of the hold limitation set in circulation rules (tested total, daily and per record)
Comment 23 Jessie Zairo 2023-04-20 18:47:43 UTC
Batch modifying the pickup location would be another good option to include in this tool. Often a patron will call and ask that all 10 holds be send to another location.
Comment 24 Katrin Fischer 2023-04-20 19:31:20 UTC
As holding can have a different meaning (stuff the library owns, items) I have updated the bug description a little bit.
Comment 25 Suzanne 2023-05-05 21:18:26 UTC
We would also like to have this available for batch changing a hold expiration date. Is there a way we could get a check box (and maybe a select all
option--with the ability to unclick as necessary) to be able to
elect multiple holds and batch change the expiration date all at
once? When a patron has a lot of holds and needs more time to pick them up, it is a bit cumbersome to have to do it individually.
Comment 26 Fridolin Somers 2024-01-16 11:01:12 UTC
Arf, uses circ/ysearch.pl that has been removed by Bug 30578
Comment 27 Fridolin Somers 2024-01-18 09:43:58 UTC
This needs a big rewrite.
Template is missing html filters and uses YUI classes.
Also perl file is missing permission reserveforothers.