[Bug 15711] New: Deleting patroncard images has unexpected behaviour and is broken
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15711 Bug ID: 15711 Summary: Deleting patroncard images has unexpected behaviour and is broken Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Label/patron card printing Assignee: cnighswonger@foundations.edu Reporter: aleishaamohia@hotmail.com QA Contact: testopia@bugs.koha-community.org To reproduce: 1) Go to Tools -> Patron Card Creator -> Manage Images. Upload an image if you do not already have something uploaded 2) Without checking any boxes, click the 'Delete selected' box 3) A box will pop up saying 'Please select image(s) to delete', as expected. Click 'OK' 4) Another pop-up saying 'Are you sure you want to delete image(s): undefined?' This is unexpected and shouldn't be showing up if nothing has been selected. 5) Click 'OK' - This also doesn't work (image isn't deleted) and gives an error 'WARNING: An error has occurred. Please ask your system administrator to check the error log for more details.' 6) Check the box next to an image and click 'Delete selected', then 'OK'. You get the WARNING error again and the image isn't deleted. This is broken. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15711 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|unspecified |master CC| |veron@veron.ch Severity|enhancement |minor --- Comment #1 from Marc Véron <veron@veron.ch> --- Confirmed. I could delete an image using the button "Delete" in the same row. Selecting the image and using the button "Delete selected" results the warning as mentioned by Aleisha. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15711 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=16747 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15711 Aleisha Amohia <aleishaamohia@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15711 --- Comment #2 from Aleisha Amohia <aleishaamohia@hotmail.com> --- Created attachment 54801 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=54801&action=edit Bug 15711: Fixing the 'Delete selected' button on patroncard images To test: 1) Go to Tools -> Patron Card Creator -> Manage images 2) Upload an image if you haven't already 3) Click Delete selected without selecting any images 4) Notice broken behaviour as described in Description 5) Apply patch, refresh page 6) Click Delete selected without selecting any images 7) Notice alert. Click OK 8) Select one image or more, click Delete selected 9) Notice confirm delete message. Sponsored-by: Catalyst IT -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15711 Aleisha Amohia <aleishaamohia@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Change sponsored?|--- |Sponsored Assignee|cnighswonger@foundations.ed |aleishaamohia@hotmail.com |u | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15711 Owen Leonard <oleonard@myacpl.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=15711 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #54801|0 |1 is obsolete| | --- Comment #3 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 54879 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=54879&action=edit [SIGNED-OFF] Bug 15711: Fixing the 'Delete selected' button on patroncard images To test: 1) Go to Tools -> Patron Card Creator -> Manage images 2) Upload an image if you haven't already 3) Click Delete selected without selecting any images 4) Notice broken behaviour as described in Description 5) Apply patch, refresh page 6) Click Delete selected without selecting any images 7) Notice alert. Click OK 8) Select one image or more, click Delete selected 9) Notice confirm delete message. Sponsored-by: Catalyst IT Signed-off-by: Owen Leonard <oleonard@myacpl.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15711 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org Status|Signed Off |Failed QA --- Comment #4 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Aleisha, I get the exact same behavior with and without the patch: I get the first "Please select images to delete.", then "Are you sure you want to delete image(s): undefined?" -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15711 --- Comment #5 from Aleisha Amohia <aleishaamohia@hotmail.com> --- (In reply to Jonathan Druart from comment #4)
Aleisha, I get the exact same behavior with and without the patch: I get the first "Please select images to delete.", then "Are you sure you want to delete image(s): undefined?"
Hi Jonathan, are you sure the patch applied correctly? I just applied and tested it again and it worked fine for me. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15711 --- Comment #6 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- I still get the same behavior. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15711 --- Comment #7 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Jonathan Druart from comment #6)
I still get the same behavior.
6 function DeleteConfirm() { 7 var results = selected_images("delete"); 8 if (results.images != 0) { It seems that selected_images returns -1, and so the if is evaluated true (results.images is undefined which is != 0) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15711 Aleisha Amohia <aleishaamohia@hotmail.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=15711 Aleisha Amohia <aleishaamohia@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #54879|0 |1 is obsolete| | --- Comment #8 from Aleisha Amohia <aleishaamohia@hotmail.com> --- Created attachment 57877 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=57877&action=edit Bug 15711: Fixing the 'Delete selected' button on patroncard images To test: 1) Go to Tools -> Patron Card Creator -> Manage images 2) Upload an image if you haven't already 3) Click Delete selected without selecting any images 4) Notice broken behaviour as described in Description 5) Apply patch, refresh page 6) Click Delete selected without selecting any images 7) Notice alert. Click OK 8) Select one image or more, click Delete selected 9) Notice confirm delete message. Sponsored-by: Catalyst IT Signed-off-by: Owen Leonard <oleonard@myacpl.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15711 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #57877|0 |1 is obsolete| | --- Comment #9 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 57944 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=57944&action=edit [SIGNED-OFF] Bug 15711: Fixing the 'Delete selected' button on patroncard images To test: 1) Go to Tools -> Patron Card Creator -> Manage images 2) Upload an image if you haven't already 3) Click Delete selected without selecting any images 4) Notice broken behaviour as described in Description 5) Apply patch, refresh page 6) Click Delete selected without selecting any images 7) Notice alert. Click OK 8) Select one image or more, click Delete selected 9) Notice confirm delete message. Sponsored-by: Catalyst IT Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Mark Tompsett <mtompset@hotmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15711 --- Comment #10 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 57945 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=57945&action=edit [SIGNED-OFF] Bug 15711: Follow up batch_id not used Changed batch_id to image_id in the template, as the multiparam would catch the array case. TEST PLAN --------- 1) attempt to delete a selected item, but get a warning. 2) apply this follow up 3) attempt to delete a selected item, it deletes. 4) run koha qa test tools Signed-off-by: Mark Tompsett <mtompset@hotmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15711 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mtompset@hotmail.com --- Comment #11 from M. Tompsett <mtompset@hotmail.com> --- Given that I wrote the follow up, I think another sign off is in order. Additionally, encountered valid_template error unrelated to any of the changes made. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15711 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #57944|0 |1 is obsolete| | --- Comment #12 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 58189 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=58189&action=edit [SIGNED-OFF] Bug 15711: Fixing the 'Delete selected' button on patroncard images To test: 1) Go to Tools -> Patron Card Creator -> Manage images 2) Upload an image if you haven't already 3) Click Delete selected without selecting any images 4) Notice broken behaviour as described in Description 5) Apply patch, refresh page 6) Click Delete selected without selecting any images 7) Notice alert. Click OK 8) Select one image or more, click Delete selected 9) Notice confirm delete message. Sponsored-by: Catalyst IT Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Owen Leonard <oleonard@myacpl.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15711 Owen Leonard <oleonard@myacpl.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=15711 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #57945|0 |1 is obsolete| | --- Comment #13 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 58190 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=58190&action=edit [SIGNED-OFF] Bug 15711: Follow up batch_id not used Changed batch_id to image_id in the template, as the multiparam would catch the array case. TEST PLAN --------- 1) attempt to delete a selected item, but get a warning. 2) apply this follow up 3) attempt to delete a selected item, it deletes. 4) run koha qa test tools Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Owen Leonard <oleonard@myacpl.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15711 Jonathan Druart <jonathan.druart@bugs.koha-community.org> 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=15711 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #58189|0 |1 is obsolete| | Attachment #58190|0 |1 is obsolete| | --- Comment #14 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 58444 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=58444&action=edit Bug 15711: Fixing the 'Delete selected' button on patroncard images To test: 1) Go to Tools -> Patron Card Creator -> Manage images 2) Upload an image if you haven't already 3) Click Delete selected without selecting any images 4) Notice broken behaviour as described in Description 5) Apply patch, refresh page 6) Click Delete selected without selecting any images 7) Notice alert. Click OK 8) Select one image or more, click Delete selected 9) Notice confirm delete message. Sponsored-by: Catalyst IT Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15711 --- Comment #15 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 58445 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=58445&action=edit Bug 15711: Follow up batch_id not used Changed batch_id to image_id in the template, as the multiparam would catch the array case. TEST PLAN --------- 1) attempt to delete a selected item, but get a warning. 2) apply this follow up 3) attempt to delete a selected item, it deletes. 4) run koha qa test tools Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15711 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |kyle@bywatersolutions.com --- Comment #16 from Kyle M Hall <kyle@bywatersolutions.com> --- Pushed to master for 17.05, thanks Aleisha, Mark! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15711 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable CC| |katrin.fischer@bsz-bw.de --- Comment #17 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- These patches have been pushed to 16.11.x and will be in 16.11.02. . -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15711 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |julian.maurice@biblibre.com --- Comment #18 from Julian Maurice <julian.maurice@biblibre.com> --- Pushed to 3.22.x for 3.22.15 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15711 Mason James <mtj@kohaaloha.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mtj@kohaaloha.com --- Comment #19 from Mason James <mtj@kohaaloha.com> --- Pushed to 16.05.x, for 16.05.08 release -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org