[Bug 37270] New: Deleting a report from the actions menu on a list of saved reports does not work
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37270 Bug ID: 37270 Summary: Deleting a report from the actions menu on a list of saved reports does not work Change sponsored?: --- Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: major Priority: P5 - low Component: Reports Assignee: koha-bugs@lists.koha-community.org Reporter: phil@chetcolibrary.org QA Contact: testopia@bugs.koha-community.org Depends on: 36192 You need at least one saved report to see this. Reports - Use saved - for any listed report in the Actions column click the up-arrow next to Run and choose Delete. Confirm that you want to delete, then nothing happens. Our JS thinks that the DOM is <form> </form> <a href="#" class="delete" title="Delete this saved report"><i class="fa fa-trash-can"></i> Delete</a> And attaches a click handler to .delete at https://git.koha-community.org/Koha-community/Koha/src/commit/10853d1edc9c31... which does `return $(this).siblings('form').submit()`. That fails because there's already a form open above that form, and you can't nest forms, so the form we want to submit doesn't exist because the browser has ignored that tag. Now that we have form-submit.js, we should just use it instead. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36192 [Bug 36192] [OMNIBUS] CSRF Protection for Koha -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37270 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |oleonard@myacpl.org |ity.org | Status|NEW |ASSIGNED -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37270 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37270 --- Comment #1 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 168653 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=168653&action=edit Bug 37270: Fix deletion of saved reports This patch fixes deletion of saved reports in two instances which were broken by the CSRF changes: From the dropdown menu in the table of saved reports, and in the modal window which appears if you click the "Preview" dropdown menu in the table of saved reports. The patch also makes a minor change to form-submit.js so that the event handler will attach to dynamically-generated elements (as is the case with the preview modal). To test, apply the patch and go to Reports -> Use saved. - Add one or more reports if necessary. - In the table of reports, click the secondary dropdown link in the "Run" button. - Click "Delete." You should be asked to confirm, and confirming should correctly delete the report. - Now test the "Preview SQL" link in the menu. - A modal window should appear showing you the SQL of the report. - In the footer of the modal, test the "Delete" button. Sponsored-by: Athens County Public Libraries -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37270 --- Comment #2 from Owen Leonard <oleonard@myacpl.org> --- "FAIL koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt FAIL forbidden patterns forbidden pattern: simple-quote string (line 2461)" I think this isn't correct in this situation. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37270 --- Comment #3 from Phil Ringnalda <phil@chetcolibrary.org> --- That failure made me look at what that code was trying to do (since it's certainly obscure that the start of that single quote is 15 lines above), which made me discover that SQL preview actually has actions and is thus what I want to do first when I can't remember whether a forgotten report named 'tempfoo' is actually junk, so correct or not it was certainly useful to me :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37270 Phil Ringnalda <phil@chetcolibrary.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=37270 Phil Ringnalda <phil@chetcolibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #168653|0 |1 is obsolete| | --- Comment #4 from Phil Ringnalda <phil@chetcolibrary.org> --- Created attachment 168667 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=168667&action=edit Bug 37270: Fix deletion of saved reports This patch fixes deletion of saved reports in two instances which were broken by the CSRF changes: From the dropdown menu in the table of saved reports, and in the modal window which appears if you click the "Preview" dropdown menu in the table of saved reports. The patch also makes a minor change to form-submit.js so that the event handler will attach to dynamically-generated elements (as is the case with the preview modal). To test, apply the patch and go to Reports -> Use saved. - Add one or more reports if necessary. - In the table of reports, click the secondary dropdown link in the "Run" button. - Click "Delete." You should be asked to confirm, and confirming should correctly delete the report. - Now test the "Preview SQL" link in the menu. - A modal window should appear showing you the SQL of the report. - In the footer of the modal, test the "Delete" button. Sponsored-by: Athens County Public Libraries Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37270 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #168667|0 |1 is obsolete| | --- Comment #5 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 169091 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=169091&action=edit Bug 37270: Fix deletion of saved reports This patch fixes deletion of saved reports in two instances which were broken by the CSRF changes: From the dropdown menu in the table of saved reports, and in the modal window which appears if you click the "Preview" dropdown menu in the table of saved reports. The patch also makes a minor change to form-submit.js so that the event handler will attach to dynamically-generated elements (as is the case with the preview modal). To test, apply the patch and go to Reports -> Use saved. - Add one or more reports if necessary. - In the table of reports, click the secondary dropdown link in the "Run" button. - Click "Delete." You should be asked to confirm, and confirming should correctly delete the report. - Now test the "Preview SQL" link in the menu. - A modal window should appear showing you the SQL of the report. - In the footer of the modal, test the "Delete" button. Sponsored-by: Athens County Public Libraries Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37270 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com Status|Signed Off |Passed QA --- Comment #6 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Nice bit of cleanup alongside the fix here. Passing QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37270 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |martin.renvoize@ptfs-europe |y.org |.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37270 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |additional_work_needed --- Comment #7 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Can you please fix this QA script complaint: FAIL koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt FAIL forbidden patterns forbidden pattern: simple-quote string (line 2461) It's in a big block of JS so switching the quotes is quite confusing. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37270 --- Comment #8 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- This actually breaks the test, so waiting for the follow-up before pushing it. # Looks like you failed 1 test of 1. xt/single_quotes.t ............... Dubious, test returned 1 (wstat 256, 0x100) Failed 1/1 subtests xt/tt_valid.t ..... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37270 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Failed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37270 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|additional_work_needed | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37270 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37270 --- Comment #9 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 169155 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=169155&action=edit Bug 37270: (follow-up) Fix mixed quotes in preview modal JS -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37270 --- Comment #10 from Owen Leonard <oleonard@myacpl.org> --- I was not able to get the translation tool to run, so I don't know if this really works in translated templates. If you can, please try it! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37270 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to main Version(s)| |24.11.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37270 --- Comment #11 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Thanks for all the hard work! Pushed to main for the next 24.11.00 release as RM Assistant -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37270 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC|martin.renvoize@ptfs-europe | |.com | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37270 Phil Ringnalda <phil@chetcolibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |rel_24_05_candidate -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37270 Katie Bliss <kebliss@dmpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kebliss@dmpl.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37270 Phil Ringnalda <phil@chetcolibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |eric@bywatersolutions.com --- Comment #12 from Phil Ringnalda <phil@chetcolibrary.org> --- *** Bug 38160 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37270 --- Comment #13 from Eric Swenson <eric@bywatersolutions.com> --- Would this be able to be backported? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37270 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to main |Pushed to stable CC| |lucas@bywatersolutions.com Version(s)|24.11.00 |24.11.00,24.05.05 released in| | --- Comment #14 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Backported to 24.05.x for upcoming 24.05.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37270 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|rel_24_05_candidate | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37270 CJ Lynce <cj.lynce@westlakelibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |cj.lynce@westlakelibrary.or | |g --- Comment #15 from CJ Lynce <cj.lynce@westlakelibrary.org> --- Lucas, it appears backporting this patch on 24.05.x caused a regression, breaking the Delete button in the toolbar drop-down menu when running or editing reports. It looks like removal of lines 2252-2258 in guided_reports_start.tt (in the first patch) broke the drop-down delete option. This only affects the 24.05.x branch, not main. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37270 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |Needs documenting CC| |fridolin.somers@biblibre.co | |m --- Comment #16 from Fridolin Somers <fridolin.somers@biblibre.com> --- Depends on Bug 36192 not in 23.11.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37270 Bug 37270 depends on bug 36192, which changed state. Bug 36192 Summary: [OMNIBUS] CSRF Protection for Koha https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36192 What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37270 Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |caroline.cyr-la-rose@inlibr | |o.com Status|Needs documenting |RESOLVED Resolution|--- |FIXED --- Comment #17 from Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> --- Bug fix, nothing to add/edit in the manual. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org