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: Pushed to main
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Lucas Gass
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks: 36701
  Show dependency treegraph
 
Reported: 2023-03-08 19:34 UTC by Lucas Gass
Modified: 2024-04-25 18:57 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:
24.05.00


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
Bug 33174: Add warning about how many holds are being cancelled (2.99 KB, patch)
2024-03-08 14:58 UTC, Kyle M Hall
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.
Comment 6 Kyle M Hall 2024-03-08 14:58:01 UTC
Created attachment 162968 [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.

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 7 Katrin Fischer 2024-04-19 17:55:43 UTC
Pushed for 24.05!

Well done everyone, thank you!