It would be really helpful if there was a ‘Save and run’ button when you are editing a report. It would save one click compared to the current ‘Save’ then ‘Run’. If you are developing a report iteratively it adds up...
This would be very helpful when writing reports! Lisette
This would be a useful feature and I'd like to have it available too!
I would like to see this, too. Saving one click does not seem like a lot, but it adds up over time, especially when writing and testing new queries.
Created attachment 137764 [details] [review] Bug 23824: Add a Save and Run button to reports Added a setting within the Guided SQL Reports create and edit report interfaces. This allows admins to bypass the need to go to the Edit SQL page to run reports and run a report after saving. To test: 1. Navigate to the reports screen in Koha admin, and create a SQL report 2. Create a report with "Run report after saving" switched to "Yes", save the report (Easy query for testing: "SELECT NOW();") 3. Notice that the report runs after saving 4. Navigate to the edit page for the report, edit the query, set "Run report after saving" to yes and update SQL 5. Notice that the report runs after updating in the Edit SQL page 6. Create a new report with "Run report after saving" set to "No", and save 7. Notice that you are redirected to the Edit SQL page 8. Edit the query with "Run report after saving" set to "No" and update SQL 9. Notice that the SQL updates and does not run
I feel like this might be overthinking the issue a bit. The new field on top reqires you to set it every time you open and edit a report, which means extra clicks. It also looks like a field that would be stored in the database - but it isn't. So we might create a wrong impression there. What if we added another button next to 'Update SQL' that is 'Update SQL and run'? Or we could turn the button into a split button with the current behaviour pre-selected.
Created attachment 149080 [details] [review] Bug 23824: Add a "Save and run" button to reports [alternative] This will save one click every time you want to save and then run a report. To test: - Apply this patch - Create a new report - Click the new "Update and run SQL" button - Verify the report was saved and the results are displayed
I have taken the liberty of making a patch more in line with Katrin's suggestions.
(In reply to Magnus Enger from comment #7) > I have taken the liberty of making a patch more in line with Katrin's > suggestions. Patch did not apply. CONFLICT (content): Merge conflict in reports/guided_reports.pl Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt error: Failed to merge in the changes. Patch failed at 0001 Bug 23824: Add a Save and Run button to exports [33mhint: Use 'git am --show-current-patch=diff' to see the failed patch[m
(In reply to Laura Escamilla from comment #8) > (In reply to Magnus Enger from comment #7) > > I have taken the liberty of making a patch more in line with Katrin's > > suggestions. > > Patch did not apply. > > CONFLICT (content): Merge conflict in reports/guided_reports.pl > Auto-merging > koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt > error: Failed to merge in the changes. > Patch failed at 0001 Bug 23824: Add a Save and Run button to exports > [33mhint: Use 'git am --show-current-patch=diff' to see the failed patch[m Hm, it looks like there could be a problem because there were two patches. I have taken the liberty of obsoleting the first patch to test. Could you please try again now?
Created attachment 149433 [details] [review] Bug 23824: Add a "Save and run" button to reports [alternative] This will save one click every time you want to save and then run a report. To test: - Apply this patch - Create a new report - Click the new "Update and run SQL" button - Verify the report was saved and the results are displayed Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
Created attachment 149724 [details] [review] Bug 23824: Add a "Save and run" button to reports This will save one click every time you want to save and then run a report. To test: - Apply this patch - Create a new report - Click the new "Update and run SQL" button - Verify the report was saved and the results are displayed Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment on attachment 149433 [details] [review] Bug 23824: Add a "Save and run" button to reports [alternative] Please obsolete patches that are not needed. This is confusing.
It was my fault - I removed the [alternative] - git bz doesn't pick up on that automatically.
Pushed to master for 23.05. Nice work everyone, thanks!
Enhancement - not backporting to 22.11.x Nice work everyone!
IMPORTANT: You can not save this form in non-English interfaces anymore. I.e. this breaks how "Update" (saving form) works: in non-English Koha button's text gets translated, what is desired, and because of that also there was hidden: <input type="hidden" name="phase" value="Update SQL" /> which wasn't translated (excluded from translations). And, if the button's content is translated, so in reports/guided_reports.pl contents of the "phase" parameter compared with hardcoded "Update SQL", which is not anymore English.
Gah! I knew there was a catch here... So, what is the best thing to do? Add an "op" parameter that does not get translated, like we do in lots of other places?
Please report new bugs linked to the original one once the bug has been released. Otherwise it's too easy to miss these and we will always need a new bug anyway. Confirmed :( and reported as: Bug 33966 - "Update and run SQL" for non-English templates