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.
*** Bug 23815 has been marked as a duplicate of this bug. ***
Created attachment 125991 [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;
I would test, but there are not any sandboxes working any longer!
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>
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)?
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!
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;
Created attachment 127003 [details] Title is missing from modal
The title is missing from the modal. See screenshot. Set to Failed QA.
Works! I restarted services and refreshed schema after loading patch.
Created attachment 127004 [details] Title IS showing.
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>
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>
Maybe consider having title and name bold or stylized like other alerts for consistancy.
Confirmed that title IS showing. I like the idea of making title and name bold.
(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.
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.