Bugzilla – Attachment 88992 Details for
Bug 22357
Every run of runreport.pl with --store-results creates a new row in saved reports
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22357: Do not duplicate report rows if several reports exist
Bug-22357-Do-not-duplicate-report-rows-if-several-.patch (text/plain), 1.71 KB, created by
Jonathan Druart
on 2019-04-29 01:41:46 UTC
(
hide
)
Description:
Bug 22357: Do not duplicate report rows if several reports exist
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2019-04-29 01:41:46 UTC
Size:
1.71 KB
patch
obsolete
>From 7c3089464ea329e4fa41d1f9853e62551d518ba5 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Sun, 28 Apr 2019 21:40:21 -0400 >Subject: [PATCH] Bug 22357: Do not duplicate report rows if several reports > exist > >At the moment every time you run runreport.pl with the --store-results >option another line will appear for your report in the saved >reports table. This is not a data, but a display problem as the >report is still only stored once. > >1) Create a report and note the report number >2) Run from command line (replace X by report number) : > misc/cronjobs/runreport.pl X --format=csv --csv-header --store-results >3) Go to saved reports table >4) Look at the table, each run of the cronjob will create a new row > in the table instead of just updating the saved results column. >5) Apply patch >6) Veriy the table displays correctly again and there are no regressions > >QA: Run t/db_dependent/Reports/Guided.t >--- > C4/Reports/Guided.pm | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > >diff --git a/C4/Reports/Guided.pm b/C4/Reports/Guided.pm >index eff3a7c9e6..08c554f55d 100644 >--- a/C4/Reports/Guided.pm >+++ b/C4/Reports/Guided.pm >@@ -692,8 +692,9 @@ sub get_saved_reports { > } > } > $query .= " WHERE ".join( " AND ", map "($_)", @cond ) if @cond; >+ $query .= " GROUP BY s.id, s.borrowernumber, s.date_created, s.last_modified, s.savedsql, s.last_run, s.report_name, s.type, s.notes, s.cache_expiry, s.public, s.report_area, s.report_group, s.report_subgroup, s.mana_id, av_g.lib, av_sg.lib, b.firstname, b.surname"; > $query .= " ORDER by date_created"; >- >+ > my $result = $dbh->selectall_arrayref($query, {Slice => {}}, @args); > > return $result; >-- >2.11.0
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 22357
:
87598
|
88992
|
89036
|
89055