Bug 33174 - Have better indication when one is cancelling multiple holds on a record
Summary: Have better indication when one is cancelling multiple holds on a record
Status: Signed Off
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Lucas Gass
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-03-08 19:34 UTC by Lucas Gass
Modified: 2023-12-12 08:46 UTC (History)
5 users (show)

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


Attachments
Bug 33174: Add warning about how many holds are being cancelled (3.78 KB, patch)
2023-03-08 21:16 UTC, Lucas Gass
Details | Diff | Splinter Review
Bug 33174: Add warning about how many holds are being cancelled (3.84 KB, patch)
2023-03-09 09:42 UTC, ByWater Sandboxes
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Lucas Gass 2023-03-08 19:34:16 UTC
To recreate:

1. Have a record with many holds
2. From request.pl select all the holds and press Cancel seleected(x)
3. A modal popup now appears that says "Are you sure you want to cancel this hold?"
4. It would be nice if this modal more clearly indicated that you are about to cancel many holds.
Comment 1 Lucas Gass 2023-03-08 21:16:24 UTC Comment hidden (obsolete)
Comment 2 ByWater Sandboxes 2023-03-09 09:42:41 UTC
Created attachment 147989 [details] [review]
Bug 33174: Add warning about how many holds are being cancelled

To test:
1. Apply patch
2. Find or make a record with many holds on it.
3. Go to the Holds tab ( request.pl ).
4. Select some hodls to cancel and press "Cancel selected"
5. A modal popup will appear. Notice the warning telling you exactly how many holds you are about to cancel. Confirm the count is accurate.
6. Try using the select all button and make sure the warning is accurate.
7. Make sure you can cancel the holds.

7. Make sure you can cancel the holds.

7. Make sure you can cancel the holds.

7. Make sure you can cancel the holds.

7. Make sure you can cancel the holds.

7. Make sure you can cancel the holds.

7. Make sure you can cancel the holds.

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Comment 3 Sally 2023-03-09 09:43:42 UTC
Works as described, thanks for the patch.
Comment 4 Katrin Fischer 2023-03-09 21:21:45 UTC
I like this, but I am not sure if we couldn't do a little better accounting for singular/plural forms and translations here.

At the moment we have:

----------

Are you sure you want to cancel this hold?

This action will cancel <span class='badge'>%s</span> hold(s)

----------

I wonder if we could use something like below with JavaScript too?

https://wiki.koha-community.org/wiki/Internationalization,_plural_forms,_context,_and_more_RFC

[% tnpx('bibliographic record', 'there is {count} item', 'there are {count} items', items.count, { count = items.count }) %]

Failed for feedback.
Comment 5 Lucas Gass 2023-11-01 20:33:42 UTC
Cait, 

The biggest problem I am encountering here is that we do not retrieve the count for # of holds one is about to cancel until we 'cancel_selected_holds'.

So if we can use tnpx() in this capacity I am not sure how it will be implemented. 

Any advice is appreciated.