Bugzilla – Attachment 149433 Details for
Bug 23824
Add a 'Save and run' button to reports
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23824: Add a "Save and run" button to reports [alternative]
Bug-23824-Add-a-Save-and-run-button-to-reports-alt.patch (text/plain), 2.92 KB, created by
ByWater Sandboxes
on 2023-04-11 10:56:43 UTC
(
hide
)
Description:
Bug 23824: Add a "Save and run" button to reports [alternative]
Filename:
MIME Type:
Creator:
ByWater Sandboxes
Created:
2023-04-11 10:56:43 UTC
Size:
2.92 KB
patch
obsolete
>From ddc3c21b986677ffaecb61c3fb19f7ca9786e7d3 Mon Sep 17 00:00:00 2001 >From: Magnus Enger <magnus@libriotech.no> >Date: Sat, 1 Apr 2023 11:27:26 +0200 >Subject: [PATCH] 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> >--- > .../prog/en/modules/reports/guided_reports_start.tt | 4 ++-- > reports/guided_reports.pl | 5 ++++- > 2 files changed, 6 insertions(+), 3 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt >index 3e30bc27d2..167712364f 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt >@@ -1323,7 +1323,6 @@ > > [% IF ( editsql ) %] > <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post" id="sql_report_form"> >- <input type="hidden" name="phase" value="Update SQL" /> > <input type="hidden" name="id" value="[% id | html %]"/> > <fieldset class="rows"> > <legend><h1>Edit SQL report</h1></legend> >@@ -1381,7 +1380,8 @@ > </fieldset> > > <fieldset class="action"> >- <input type="submit" name="submit" class="btn btn-primary" value="Update SQL" /> >+ <input type="submit" name="phase" class="btn btn-primary" value="Update SQL" /> >+ <input type="submit" name="phase" class="btn btn-primary" value="Update and run SQL" /> > <a href="/cgi-bin/koha/reports/guided_reports.pl?phase=Use%20saved" class="cancel">Cancel</a> > </fieldset> > </form> >diff --git a/reports/guided_reports.pl b/reports/guided_reports.pl >index f4ed6cfdfc..8f7bdb0940 100755 >--- a/reports/guided_reports.pl >+++ b/reports/guided_reports.pl >@@ -209,7 +209,7 @@ elsif ( $phase eq 'Edit SQL'){ > ); > } > >-elsif ( $phase eq 'Update SQL'){ >+elsif ( $phase eq 'Update SQL' || $phase eq 'Update and run SQL' ){ > my $id = $input->param('id'); > my $sql = $input->param('sql'); > my $reportname = $input->param('reportname'); >@@ -301,6 +301,9 @@ elsif ( $phase eq 'Update SQL'){ > cache_expiry_units => $cache_expiry_units, > ); > } >+ if ( $phase eq 'Update and run SQL' ) { >+ print $input->redirect("/cgi-bin/koha/reports/guided_reports.pl?reports=$id&phase=Run%20this%20report"); >+ } > } > } > >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 23824
:
137764
|
149080
|
149433
|
149724