Bug 23824 - Add a 'Save and run' button to reports
Summary: Add a 'Save and run' button to reports
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Reports (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low enhancement
Assignee: Magnus Enger
QA Contact: Katrin Fischer
URL:
Keywords:
Depends on:
Blocks: 35672 33966
  Show dependency treegraph
 
Reported: 2019-10-16 11:50 UTC by Magnus Enger
Modified: 2023-12-29 17:36 UTC (History)
10 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
23.05.00
Circulation function:


Attachments
Bug 23824: Add a Save and Run button to reports (6.25 KB, patch)
2022-07-15 14:24 UTC, Michal Urban
Details | Diff | Splinter Review
Bug 23824: Add a "Save and run" button to reports [alternative] (2.85 KB, patch)
2023-04-03 07:18 UTC, Magnus Enger
Details | Diff | Splinter Review
Bug 23824: Add a "Save and run" button to reports [alternative] (2.92 KB, patch)
2023-04-11 10:56 UTC, ByWater Sandboxes
Details | Diff | Splinter Review
Bug 23824: Add a "Save and run" button to reports (2.96 KB, patch)
2023-04-16 01:46 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Magnus Enger 2019-10-16 11:50:24 UTC
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...
Comment 1 Lisette Scheer 2019-10-16 16:38:07 UTC
This would be very helpful when writing reports!
Lisette
Comment 2 Rebecca Coert 2020-07-28 14:54:16 UTC
This would be a useful feature and I'd like to have it available too!
Comment 3 Jeff Gaines 2020-07-29 21:00:13 UTC
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.
Comment 4 Michal Urban 2022-07-15 14:24:06 UTC Comment hidden (obsolete)
Comment 5 Katrin Fischer 2022-07-15 15:06:00 UTC
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.
Comment 6 Magnus Enger 2023-04-03 07:18:37 UTC Comment hidden (obsolete)
Comment 7 Magnus Enger 2023-04-03 07:19:38 UTC
I have taken the liberty of making a patch more in line with Katrin's suggestions.
Comment 8 Laura Escamilla 2023-04-03 13:06:23 UTC
(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
Comment 9 Magnus Enger 2023-04-11 09:22:23 UTC
(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?
Comment 10 ByWater Sandboxes 2023-04-11 10:56:43 UTC Comment hidden (obsolete)
Comment 11 Katrin Fischer 2023-04-16 01:46:18 UTC
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 12 Tomás Cohen Arazi (tcohen) 2023-04-17 12:35:31 UTC
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.
Comment 13 Katrin Fischer 2023-04-17 12:42:10 UTC
It was my fault - I removed the [alternative] - git bz doesn't pick up on that automatically.
Comment 14 Tomás Cohen Arazi (tcohen) 2023-04-17 12:42:17 UTC
Pushed to master for 23.05.

Nice work everyone, thanks!
Comment 15 Matt Blenkinsop 2023-04-18 12:24:48 UTC
Enhancement - not backporting to 22.11.x

Nice work everyone!
Comment 16 Andrii Nugged 2023-06-06 09:19:23 UTC
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.
Comment 17 Magnus Enger 2023-06-06 12:33:46 UTC
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?
Comment 18 Katrin Fischer 2023-06-08 21:47:27 UTC
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