When editing SQL reports, using 'Update and run SQL' inappropriately includes the SQL editor at the bottom of the run report. Additionally, this issue causes the saved_sql.id to be appended repeated as described in bug_37307. Although there certainly could be some usefulness for SQL developers in having the editor appear under the report when testing, the SQL editing box does not function correctly (no auto population of tables, etc.). This is issues by the CSRF changes made in reports/guided_reports.pl that are causing to 'edit' screen to be appended to the 'run' screen. 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) See the report runs, but at the 'Edit SQL report' screen shows at the bottom (it should not)
Created attachment 170839 [details] [review] Bug 37763: SQL reports Update and run SQL inappropriately appends the editor screen after the ran report. This patch corrects an error where the SQL editor screen would appear after the report results when using 'Update and run SQL' when editing reports. This also corrects a related issue where the saved_sql.id of the report would be repeatedly appended to SQL code when using 'Update and run SQL'. 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) See the report runs, but at the 'Edit SQL report' screen shows at the bottom. 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) Verify that the report runs, but the 'Edit SQL report' section is gone. Sponsored-by: Westlake Porter Public Library
I tried Sign Off but the issue was not present on 24.06.00. I still have this issues on 24.05.02 (our test server). The Sandbox I was using doesn't allow to set specific versions (as far as I can tell).
Puzzling. I just re-verified the issue exists on the latest main in my KTD, as well as in ByWater's sandbox. In the event my steps are ambiguous, I have to first "Edit" a report (after creating), and use the "Update and run SQL" button for the behavior.
Created attachment 171039 [details] [review] Bug 37763: SQL reports Update and run SQL inappropriately appends the editor screen after the ran report. This patch corrects an error where the SQL editor screen would appear after the report results when using 'Update and run SQL' when editing reports. This also corrects a related issue where the saved_sql.id of the report would be repeatedly appended to SQL code when using 'Update and run SQL'. 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) See the report runs, but at the 'Edit SQL report' screen shows at the bottom. 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) Verify that the report runs, but the 'Edit SQL report' section is gone. Sponsored-by: Westlake Porter Public Library Signed-off-by: Sam Sowanick <sam.sowanick@corvallisoregon.gov>
I found the error in my ways, thanks for the clarification. Signed off. Sam.
Created attachment 171130 [details] [review] Bug 37763: Do not show SQL report editor after 'Update and run' This patch corrects an error where the SQL editor screen would appear after the report results when using 'Update and run SQL' when editing reports. This also corrects a related issue where the saved_sql.id of the report would be repeatedly appended to SQL code when using 'Update and run SQL'. 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) See the report runs, but at the 'Edit SQL report' screen shows at the bottom. 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) Verify that the report runs, but the 'Edit SQL report' section is gone. Sponsored-by: Westlake Porter Public Library Signed-off-by: Sam Sowanick <sam.sowanick@corvallisoregon.gov> Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Created attachment 171131 [details] [review] Bug 37763 (QA follow-up): Tidy Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Added a tidy follow-up and reworded the first commit message so that it tells what the patch does instead of what the bug is.
Follow-up failed QA script for the commit message. Fixed before pushing.
Pushed for 24.11! Well done everyone, thank you!
Backported to 24.05.x for upcoming 24.05.04
*** Bug 37307 has been marked as a duplicate of this bug. ***
CUD not in 23.11.x
*** Bug 38245 has been marked as a duplicate of this bug. ***