Bug 23479 - Hold cancellation confirmation too generic
Summary: Hold cancellation confirmation too generic
Status: Failed QA
Alias: None
Product: Koha
Classification: Unclassified
Component: Hold requests (show other bugs)
Version: Main
Hardware: All All
: P1 - high enhancement
Assignee: Andrii Veremeienko
QA Contact: Testopia
URL:
Keywords:
: 23815 (view as bug list)
Depends on:
Blocks:
 
Reported: 2019-08-20 14:41 UTC by Christopher Brannon
Modified: 2021-11-01 14:17 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
This enhancement adds the title and patron details to the confirmation message when cancelling a hold. For example: "Are you sure you want to cancel hold of Intermediate Perl / for Mary Burton (23529000651225)?" (title and patron are in bold)
Version(s) released in:
Circulation function:


Attachments
Bug 23479: Hold cancellation confirmation too generic (4.58 KB, patch)
2021-10-09 11:34 UTC, Andrii Veremeienko
Details | Diff | Splinter Review
Bug 23479: Hold cancellation confirmation too generic (4.65 KB, patch)
2021-10-09 19:43 UTC, David Nind
Details | Diff | Splinter Review
Bug 23479: Hold cancellation confirmation too generic (4.82 KB, patch)
2021-10-27 12:35 UTC, Andrii Veremeienko
Details | Diff | Splinter Review
Title is missing from modal (56.12 KB, image/png)
2021-10-27 14:39 UTC, Barbara Johnson
Details
Title IS showing. (12.35 KB, image/png)
2021-10-27 14:54 UTC, Christopher Brannon
Details
Bug 23479: Hold cancellation confirmation too generic (4.88 KB, patch)
2021-10-27 14:56 UTC, PTFS Europe Sandboxes
Details | Diff | Splinter Review
Bug 23479: Hold cancellation confirmation too generic (4.88 KB, patch)
2021-10-27 14:57 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Christopher Brannon 2019-08-20 14:41:32 UTC
The cancellation confirmation should include the item title and the name of the person the hold was for.  It is too easy to click on the wrong cancel button, and there is no knowing if you clicked the right one.  We should not only be confirming the cancel action, but the data that is being cancelled.

This goes for all types of confirmations throughout Koha.
Comment 1 Owen Leonard 2021-08-05 16:01:43 UTC
*** Bug 23815 has been marked as a duplicate of this bug. ***
Comment 2 Andrii Veremeienko 2021-10-09 11:34:36 UTC Comment hidden (obsolete)
Comment 3 Christopher Brannon 2021-10-09 18:23:46 UTC
I would test, but there are not any sandboxes working any longer!
Comment 4 David Nind 2021-10-09 19:43:40 UTC
Created attachment 125993 [details] [review]
Bug 23479: Hold cancellation confirmation too generic

Solution was to specify patron's name in format "<patron.firstname> <patron.surname> (<patron.cardnumber>)"
and biblio's title in the hold cancellation message.

e.g.:
"Are you sure you want to cancel hold of Охрана окружающей среды в републике Беларусь for John Doe (12)?"

How to test:
1. Go to the item search;
2. Search for the book you want to place hold for;
3. Select existing patron to place hold for him;
4. Place hold;
5. Go to koha/reserve/request.pl;
6. Click on "Cancel hold" button for hold from the list (red X icon on the grid);
7. Observe that text displayed on cancellation modal window contains patron's name and biblio's title;

Signed-off-by: David Nind <david@davidnind.com>
Comment 5 David Nind 2021-10-09 19:50:05 UTC
Minor suggestion for the message - change "of" to "on".

Example: Are you sure you want to cancel hold on Intermediate Perl / for Mary Burton (23529000651225)?
Comment 6 Katrin Fischer 2021-10-10 13:20:36 UTC
I am sorry, but besides the small change David pointed out, there are a couple of smaller issues here:

$("#cancellation-text").html(`Are you sure you want to cancel hold of <b>${biblio_title}</b> for <b>${borrower_name}</b>?`);

At the moment, this message is not translatable. Please have a look at how to use _() to make sure that the strings are picked up for translation by our tools.

the <b> mark-up is also not recommended as this will break the strings into pieces and leaves you with a single "for" to translate. That is really hard to get right without further context (at least in German it is :) ). Better to not highlight single parts of sentences like this.

I believe we did have a rule about quotes... but I cannot find it :( The rule I remember was to use double quotes around JS, as languages like French need to be able to use single quotes in their translations and single quotes often broke things for them as for the translators it's not obvious when they are translating JS and need to escape.

Please let me know if we can help you making these adjustments!
Comment 7 Andrii Veremeienko 2021-10-27 12:35:05 UTC
Created attachment 126986 [details] [review]
Bug 23479: Hold cancellation confirmation too generic

Solution was to specify patron's name in format <patron.firstname> <patron.surname> (<patron.cardnumber>)"
and biblio's title in the hold cancellation message.

e.g.:
'Are you sure you want to cancel hold of "Охрана окружающей среды в републике Беларусь" for "John Doe (12)"?'

How to test:
1. Go to the item search;
2. Search for the book you want to place hold for;
3. Select existing patron to place hold for him;
4. Place hold;
5. Go to koha/reserve/request.pl;
6. Click on "Cancel hold" button for hold from the list (red X icon on the grid);
7. Observe that text displayed on cancellation modal window is very general and doesn't contains patron's name and biblio's title;
8. Apply patch;
9. Go through steps 1-6;
10. Observe that cancellation text contains patron's name and biblio's title;
Comment 8 Barbara Johnson 2021-10-27 14:39:18 UTC
Created attachment 127003 [details]
Title is missing from modal
Comment 9 Barbara Johnson 2021-10-27 14:40:28 UTC
The title is missing from the modal.  See screenshot.  Set to Failed QA.
Comment 10 Christopher Brannon 2021-10-27 14:54:02 UTC
Works!  I restarted services and refreshed schema after loading patch.
Comment 11 Christopher Brannon 2021-10-27 14:54:40 UTC
Created attachment 127004 [details]
Title IS showing.
Comment 12 PTFS Europe Sandboxes 2021-10-27 14:56:42 UTC
Created attachment 127005 [details] [review]
Bug 23479: Hold cancellation confirmation too generic

Solution was to specify patron's name in format <patron.firstname> <patron.surname> (<patron.cardnumber>)"
and biblio's title in the hold cancellation message.

e.g.:
'Are you sure you want to cancel hold of "Охрана окружающей среды в републике Беларусь" for "John Doe (12)"?'

How to test:
1. Go to the item search;
2. Search for the book you want to place hold for;
3. Select existing patron to place hold for him;
4. Place hold;
5. Go to koha/reserve/request.pl;
6. Click on "Cancel hold" button for hold from the list (red X icon on the grid);
7. Observe that text displayed on cancellation modal window is very general and doesn't contains patron's name and biblio's title;
8. Apply patch;
9. Go through steps 1-6;
10. Observe that cancellation text contains patron's name and biblio's title;

Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Comment 13 Kyle M Hall (khall) 2021-10-27 14:57:49 UTC
Created attachment 127006 [details] [review]
Bug 23479: Hold cancellation confirmation too generic

Solution was to specify patron's name in format <patron.firstname> <patron.surname> (<patron.cardnumber>)"
and biblio's title in the hold cancellation message.

e.g.:
'Are you sure you want to cancel hold of "Охрана окружающей среды в републике Беларусь" for "John Doe (12)"?'

How to test:
1. Go to the item search;
2. Search for the book you want to place hold for;
3. Select existing patron to place hold for him;
4. Place hold;
5. Go to koha/reserve/request.pl;
6. Click on "Cancel hold" button for hold from the list (red X icon on the grid);
7. Observe that text displayed on cancellation modal window is very general and doesn't contains patron's name and biblio's title;
8. Apply patch;
9. Go through steps 1-6;
10. Observe that cancellation text contains patron's name and biblio's title;

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Comment 14 Christopher Brannon 2021-10-27 14:58:23 UTC
Maybe consider having title and name bold or stylized like other alerts for consistancy.
Comment 15 Barbara Johnson 2021-10-27 15:00:46 UTC
Confirmed that title IS showing.  I like the idea of making title and name bold.
Comment 16 Katrin Fischer 2021-11-01 13:50:17 UTC
(In reply to Barbara Johnson from comment #15)
> Confirmed that title IS showing.  I like the idea of making title and name
> bold.

It's just really bad for translations because we end up with single words like "for" that can have a multiple of meanings/translations in other languages. Using styling on single words "breaks" sentences into pieces right now.

I am open for better solutions that keep things in context for translations while preserving the styling.
Comment 17 Katrin Fischer 2021-11-01 14:17:50 UTC
I am sorry, but there is a little issue here. Maybe some variables are not
reset?

- Place multiple holds for different patrons on a record
- Click on the X to cancel a single hold, verify the question has the correct
information and abort with cancel.
- Use the checkboxes to mark multiple holds for cancelling
- Use the "Cancel selected" button
- The confirmation will still ask about cancelling the hold for the perevious
user, although you are cancelling multiple for different users.