[Bug 38302] New: Inconsistent Delete Confirmation Dialog for "Delete List" Buttons
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38302 Bug ID: 38302 Summary: Inconsistent Delete Confirmation Dialog for "Delete List" Buttons Change sponsored?: --- Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Lists Assignee: koha-bugs@lists.koha-community.org Reporter: yanjun.li@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org CC: m.de.rooy@rijksmuseum.nl In the staff interface, there're two ways to delete a list: 1) "Delete" button in "Your lists" table 2) "Delete List" button in "Edit" dropdown Option 2) has a confirmation dialog "Are you sure you want to delete this list?" but option 1) does not. To recreate: 1. Create a list in the staff interface 2. Go to lists 3. See "Your lists" tab and find "Delete" button in "Actions" col, click "delete", no confirmation dialog pop up 4. Create another list 5. Go to lists and view the list detail 6. See "Edit" dropdown and click "Delete Lists" button, see confirmation dialog pop up -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38302 Yanjun Li <yanjun.li@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |yanjun.li@bywatersolutions. |ity.org |com -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38302 Yanjun Li <yanjun.li@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38302 --- Comment #1 from Yanjun Li <yanjun.li@bywatersolutions.com> --- Created attachment 173953 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=173953&action=edit Bug 38302: Add delete confirmation dialog To test: 1. Create a list in the staff interface 2. Go to lists 3. See "Your lists" tab and find "Delete" button in "Actions" col, click "delete", no confirmation dialog pop up 4. Create another list 5. Go to lists and view the list detail 6. See "Edit" dropdown and click "Delete Lists" button, see confirmation dialog pop up 7. Apply patch 8. Try step 1 through 3 again 9. "Delete" button in "actions" column has the same confirmation dialog, and delete function works -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38302 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |String patch CC| |lucas@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38302 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38302 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #173953|0 |1 is obsolete| | --- Comment #2 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Created attachment 174052 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=174052&action=edit Bug 38302: Add delete confirmation dialog To test: 1. Create a list in the staff interface 2. Go to lists 3. See "Your lists" tab and find "Delete" button in "Actions" col, click "delete", no confirmation dialog pop up 4. Create another list 5. Go to lists and view the list detail 6. See "Edit" dropdown and click "Delete Lists" button, see confirmation dialog pop up 7. Apply patch 8. Try step 1 through 3 again 9. "Delete" button in "actions" column has the same confirmation dialog, and delete function works Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38302 Brendan Lawlor <blawlor@clamsnet.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA CC| |blawlor@clamsnet.org --- Comment #3 from Brendan Lawlor <blawlor@clamsnet.org> --- This works, but I think the code block in the patch is partly unnecessary. It looks like the code block directly above this patch is really supposed to be the click handler for this alert with the MSG_CONFIRM_DELETE_LIST, but the class on the button is different so it never runs. The class 'deleteshelf' is used on the opac side, but in shelves_results.tt the delete button has the class named 'delete-list' instead. Before the patch if you git grep -n 'delete-list' you can see that it only appears in the class on the button in shelves_results.tt I don't think the name of the class really matters, but we shouldn't have a duplicate click handler that does nothing. Thanks for finding and fixing this bug. If you resubmit a patch without the duplicate click handler I will pass QA. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38302 Brendan Lawlor <blawlor@clamsnet.org> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |blawlor@clamsnet.org |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38302 Yanjun Li <yanjun.li@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38302 Yanjun Li <yanjun.li@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #174052|0 |1 is obsolete| | --- Comment #4 from Yanjun Li <yanjun.li@bywatersolutions.com> --- Created attachment 174639 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=174639&action=edit Bug 38302: Add delete confirmation dialog To test: 1. Create a list in the staff interface 2. Go to lists 3. See "Your lists" tab and find "Delete" button in "Actions" col, click "delete", no confirmation dialog pop up 4. Create another list 5. Go to lists and view the list detail 6. See "Edit" dropdown and click "Delete Lists" button, see confirmation dialog pop up 7. Apply patch 8. Try step 1 through 3 again 9. "Delete" button in "actions" column has the same confirmation dialog, and delete function works Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38302 --- Comment #5 from Yanjun Li <yanjun.li@bywatersolutions.com> --- Created attachment 174640 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=174640&action=edit Bug 38302: (follow-up) Remove duplicate click handler and modify button class This follow-up patch removes the unnecessarily added click handler, and modifies the delete button class. The confirmation dialog and delete function work. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38302 --- Comment #6 from Yanjun Li <yanjun.li@bywatersolutions.com> --- (In reply to Brendan Lawlor from comment #3)
This works, but I think the code block in the patch is partly unnecessary.
It looks like the code block directly above this patch is really supposed to be the click handler for this alert with the MSG_CONFIRM_DELETE_LIST, but the class on the button is different so it never runs.
The class 'deleteshelf' is used on the opac side, but in shelves_results.tt the delete button has the class named 'delete-list' instead.
Before the patch if you git grep -n 'delete-list' you can see that it only appears in the class on the button in shelves_results.tt
I don't think the name of the class really matters, but we shouldn't have a duplicate click handler that does nothing.
Thanks for finding and fixing this bug. If you resubmit a patch without the duplicate click handler I will pass QA.
Hi Brendan, thank you so much for the explanation. I already deleted the duplicate click handler, and I will pay more attention next time to avoid writing duplicate code. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38302 Brendan Lawlor <blawlor@clamsnet.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38302 Brendan Lawlor <blawlor@clamsnet.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #174639|0 |1 is obsolete| | Attachment #174640|0 |1 is obsolete| | --- Comment #7 from Brendan Lawlor <blawlor@clamsnet.org> --- Created attachment 174719 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=174719&action=edit Bug 38302: Add delete confirmation dialog To test: 1. Create a list in the staff interface 2. Go to lists 3. See "Your lists" tab and find "Delete" button in "Actions" col, click "delete", no confirmation dialog pop up 4. Create another list 5. Go to lists and view the list detail 6. See "Edit" dropdown and click "Delete Lists" button, see confirmation dialog pop up 7. Apply patch 8. Try step 1 through 3 again 9. "Delete" button in "actions" column has the same confirmation dialog, and delete function works Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38302 --- Comment #8 from Brendan Lawlor <blawlor@clamsnet.org> --- Created attachment 174720 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=174720&action=edit Bug 38302: (follow-up) Remove duplicate click handler and modify button class This follow-up patch removes the unnecessarily added click handler, and modifies the delete button class. The confirmation dialog and delete function work. Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38302 Brendan Lawlor <blawlor@clamsnet.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA --- Comment #9 from Brendan Lawlor <blawlor@clamsnet.org> --- Trivial change, works, makes sense, qa scripts happy. Passing QA. Thanks Yanjun! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38302 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Inconsistent Delete |Inconsistent delete |Confirmation Dialog for |confirmation dialog for |"Delete List" Buttons |"Delete list" buttons Keywords| |rel_25_05_candidate --- Comment #10 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Thanks Yanjun! As we are in feature freeze, this will have to wait until after the release, but will go into 25.05 early on! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38302 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Failed QA Keywords|rel_25_05_candidate |Academy --- Comment #11 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I am sorry, but this makes the "Delte" on the button untranslatable: - [%~ action_block = action_block _ '<button type="submit" class="delete-list btn btn-default btn-xs"><i class="fa fa-trash-can"></i> ' _ t("Delete") _ '</button>' ~%] + [%~ action_block = action_block _ '<button type="submit" class="deleteshelf btn btn-default btn-xs"><i class="fa fa-trash-can"></i> Delete</button>' ~%] The t() is needed for the translation. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38302 Yanjun Li <yanjun.li@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38302 --- Comment #12 from Yanjun Li <yanjun.li@bywatersolutions.com> --- Created attachment 175951 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=175951&action=edit Bug 38302: (follow-up) Add t() to make sure delete button is translatable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38302 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off --- Comment #13 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Treating the small change as a follow-up. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38302 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38302 --- Comment #14 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- As the change is rather small I have squashed the patches before pushing. Thanks for your perseverance! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38302 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #174719|0 |1 is obsolete| | --- Comment #15 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 175955 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=175955&action=edit Bug 38302: Add delete confirmation dialog To test: 1. Create a list in the staff interface 2. Go to lists 3. See "Your lists" tab and find "Delete" button in "Actions" col, click "delete", no confirmation dialog pop up 4. Create another list 5. Go to lists and view the list detail 6. See "Edit" dropdown and click "Delete Lists" button, see confirmation dialog pop up 7. Apply patch 8. Try step 1 through 3 again 9. "Delete" button in "actions" column has the same confirmation dialog, and delete function works Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38302 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #174720|0 |1 is obsolete| | Attachment #175951|0 |1 is obsolete| | Attachment #175955|0 |1 is obsolete| | --- Comment #16 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 175956 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=175956&action=edit Bug 38302: Add delete confirmation dialog To test: 1. Create a list in the staff interface 2. Go to lists 3. See "Your lists" tab and find "Delete" button in "Actions" col, click "delete", no confirmation dialog pop up 4. Create another list 5. Go to lists and view the list detail 6. See "Edit" dropdown and click "Delete Lists" button, see confirmation dialog pop up 7. Apply patch 8. Try step 1 through 3 again 9. "Delete" button in "actions" column has the same confirmation dialog, and delete function works Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38302 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |25.05.00 released in| | Status|Passed QA |Pushed to main -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38302 --- Comment #17 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Pushed for 25.05! Well done everyone, thank you! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38302 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com Text to go in the| |This enhancement adds a release notes| |confirmation step when | |deleting a list from the | |"Your lists" and "Public | |lists" tabs in the staff | |interface. Previously, you | |were not asked to confirm | |the list deletion. This | |also makes it consistent | |with deleting a list from | |its contents page, where | |you are asked to confirm | |the list deletion. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38302 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to main |Pushed to stable Version(s)|25.05.00 |25.05.00,24.11.03 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38302 --- Comment #18 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Nice work everyone! Pushed to 24.11.x for 24.11.03 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38302 Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |wainuiwitikapark@catalyst.n | |et.nz --- Comment #19 from Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> --- Not backporting to 24.05.x unless requested -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38302 Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |Needs documenting --- Comment #20 from Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> --- Not backporting to 22.11.x as it wasn't backported to 24.05.x (or 23.XX) -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org