To recreate: - create a report or edit an existing one - on the edit screen (/cgi-bin/koha/reports/guided_reports.pl?id=XXX&op=edit_form), click "Update and run SQL" - On the resulting page, where you see both your results and the edit form, click Edit and then Delete - Nothing happens. The delete confirm modal doesn't appear, so the deletion doesn't move forward. The url on that results + edit screen is just "/cgi-bin/koha/reports/guided_reports.pl" -- I don't know if that's part of the issue? The report can still be deleted from other pages.
It also seems that the Rows Per Page button doesn't work after clicking Update and Run SQL. Same as what Andrew describes above, after Update and Run, click on Rows Per Page and select a different number of rows--nothing happens. Though if I rerun the report (with the Run Report button at the top), the Rows Per Page button does work as normal.
Created attachment 170872 [details] [review] Bug 37328: Cannot delete report after using Update and Run SQL button Fixes the ability to delete a report from the report toolbar menu after running the report. To test: 1) Login to staff client 2) Navigate to Reports -> Create from SQL 3) Create a short report (SELECT * FROM items), name it and SAVE it. 4) On the resulting "Edit SQL report' page, click 'Update and run SQL' 5) On the toolbar, click Edit -> Delete Nothing happens 6) Apply patch 7) Return to Reports -> Saved Reports and Edit the report you created. 8) On "Edit SQL report' page, click 'Update and run SQL' 9) On the toolbar, click Edit -> Delete The report is now deleted. Sponsored-by: Westlake Porter Public Library
Created attachment 170874 [details] [review] Bug 37328: Cannot delete report after using Update and Run SQL button Fixes the ability to delete a report from the report toolbar menu after running the report, including displaying the delete confirm modal. To test: 1) Login to staff client 2) Navigate to Reports -> Create from SQL 3) Create a short report (SELECT * FROM items), name it and SAVE it. 4) On the resulting "Edit SQL report' page, click 'Update and run SQL' 5) On the toolbar, click Edit -> Delete Nothing happens 6) Apply patch 7) Return to Reports -> Saved Reports and Edit the report you created. 8) On "Edit SQL report' page, click 'Update and run SQL' 9) On the toolbar, click Edit -> Delete 10) Confirm the delete modal. The report is now deleted. Sponsored-by: Westlake Porter Public Library
It appears that the Rows per page issue has a resolution incoming over on bug_37745
Also, I tried applying this patch on 24.05.03, but it would not work. Turns out, in 24.05, the delete button issue is related to the issue on bug 37763, and that patch fixes the delete button after Update and run SQL. Main also had issues with the delete button, for a completely separate reason, which this patch fixed.
Created attachment 171167 [details] [review] Bug 37328: Cannot delete report after using Update and Run SQL button Fixes the ability to delete a report from the report toolbar menu after running the report, including displaying the delete confirm modal. To test: 1) Login to staff client 2) Navigate to Reports -> Create from SQL 3) Create a short report (SELECT * FROM items), name it and SAVE it. 4) On the resulting "Edit SQL report' page, click 'Update and run SQL' 5) On the toolbar, click Edit -> Delete Nothing happens 6) Apply patch 7) Return to Reports -> Saved Reports and Edit the report you created. 8) On "Edit SQL report' page, click 'Update and run SQL' 9) On the toolbar, click Edit -> Delete 10) Confirm the delete modal. The report is now deleted. Sponsored-by: Westlake Porter Public Library Signed-off-by: David Nind <david@davidnind.com>
Created attachment 171715 [details] [review] Bug 37328: Cannot delete report after using Update and Run SQL button Fixes the ability to delete a report from the report toolbar menu after running the report, including displaying the delete confirm modal. To test: 1) Login to staff client 2) Navigate to Reports -> Create from SQL 3) Create a short report (SELECT * FROM items), name it and SAVE it. 4) On the resulting "Edit SQL report' page, click 'Update and run SQL' 5) On the toolbar, click Edit -> Delete Nothing happens 6) Apply patch 7) Return to Reports -> Saved Reports and Edit the report you created. 8) On "Edit SQL report' page, click 'Update and run SQL' 9) On the toolbar, click Edit -> Delete 10) Confirm the delete modal. The report is now deleted. Sponsored-by: Westlake Porter Public Library Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi>
I think this still needs a minor fix on UI. After applying the patch the "Delete" option on dropdown menus isn't applied neatly to the element. It doesn't have enough margin around it and if I hover to the right side of the menu, I'm unable to select it. I have to move my mouse exactly above the text.
(In reply to Emmi Takkinen from comment #8) > I think this still needs a minor fix on UI. After applying the patch the > "Delete" option on dropdown menus isn't applied neatly to the element. It > doesn't have enough margin around it and if I hover to the right side of the > menu, I'm unable to select it. I have to move my mouse exactly above the > text. Forget this, it was a problem with my UI. I didn't remember to run yarn build on my other test environment. On current master this works as expected and UI looks clean.
Created attachment 171838 [details] [review] Bug 37328: Cannot delete report after using Update and Run SQL button Fixes the ability to delete a report from the report toolbar menu after running the report, including displaying the delete confirm modal. To test: 1) Login to staff client 2) Navigate to Reports -> Create from SQL 3) Create a short report (SELECT * FROM items), name it and SAVE it. 4) On the resulting "Edit SQL report' page, click 'Update and run SQL' 5) On the toolbar, click Edit -> Delete Nothing happens 6) Apply patch 7) Return to Reports -> Saved Reports and Edit the report you created. 8) On "Edit SQL report' page, click 'Update and run SQL' 9) On the toolbar, click Edit -> Delete 10) Confirm the delete modal. The report is now deleted. Sponsored-by: Westlake Porter Public Library Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Thanks for all the hard work! Pushed to main for the next 24.11.00 release as RM Assistant
Doesn't apply clean to 24.05.x, please rebase if needed.