[Bug 22357] New: Every run of runreport.pl with --store-results creates a new row in saved reports
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22357 Bug ID: 22357 Summary: Every run of runreport.pl with --store-results creates a new row in saved reports Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Reports Assignee: koha-bugs@lists.koha-community.org Reporter: katrin.fischer@bsz-bw.de QA Contact: testopia@bugs.koha-community.org Target Milestone: --- While testing bug 22323 I noticed an issue with the reports table in combination with stored results. Stealing a part of the test plan: 1) Create a new item with itemnotes 'accentué' 2) Create a report and note the report number ... 5) Run from command line (replace X by report number) : misc/cronjobs/runreport.pl X --format=csv --csv-header --store-results ... 7) Go to saved reports table 8) 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. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22357 --- Comment #1 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I suspect a problem with the group by somewhere. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22357 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|normal |major --- Comment #2 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- This gets out of hand pretty fast. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22357 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22357 --- Comment #3 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 87598 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=87598&action=edit Bug 22357: Fix saved reports table when runreport.pl with --store-results is used 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 -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22357 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |katrin.fischer@bsz-bw.de |ity.org | --- Comment #4 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I think I found a fix and couldn't find any regressions. But I have to admit I am not sure why the line removed from the SQL was there in the first place... please test thoroughly. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22357 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |17535 CC| |josef.moravec@gmail.com Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17535 [Bug 17535] Regression: Search for reports by keywords -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22357 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA --- Comment #5 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- This patch breaks keyword searching again - as Josef pointed out the line I removed was added by bug 17535. It looks like we want to search on the stored results with the keyword search, but in that case I am not sure how to fix the display issue. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22357 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|katrin.fischer@bsz-bw.de |koha-bugs@lists.koha-commun | |ity.org -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22357 Liz Rea <wizzyrea@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |wizzyrea@gmail.com --- Comment #6 from Liz Rea <wizzyrea@gmail.com> --- So am I to understand that we can have many saved results for one report, and that the interface isn't currently supporting that well? -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22357 --- Comment #7 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Each 'line' in the saved reports table shows all dates in the saved results column. So the entries for one report are identical and complete... there are just too many. But when we want to search in the saved results, we can't change the SQL used for search... but still don't want to show them duplicated. I am stuck on how to do this. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22357 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22357 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #87598|0 |1 is obsolete| | --- Comment #8 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 88992 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=88992&action=edit 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 -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22357 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org Assignee|koha-bugs@lists.koha-commun |jonathan.druart@bugs.koha-c |ity.org |ommunity.org --- Comment #9 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- This could be a fix (yes, ugly). We could also remove the s.* from the fields selection, but this will need to know which one is used (how, without making sure we will not introduce regressions?) Or we could have 1 query to fetch the reports, then 1 query per report to fetch the results (O(n), bad) -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22357 Liz Rea <wizzyrea@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22357 Liz Rea <wizzyrea@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #88992|0 |1 is obsolete| | --- Comment #10 from Liz Rea <wizzyrea@gmail.com> --- Created attachment 89036 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=89036&action=edit 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 Signed-off-by: Liz Rea <wizzyrea@gmail.com> I didn't assess this for "code ugliness" but the functionality does seem good, and fixes the issue. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22357 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22357 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #89036|0 |1 is obsolete| | --- Comment #11 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 89055 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=89055&action=edit 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 Signed-off-by: Liz Rea <wizzyrea@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22357 --- Comment #12 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Works for me, no regressions found (keyword search still works too!). Thx for the fix! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22357 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |nick@bywatersolutions.com --- Comment #13 from Nick Clemens <nick@bywatersolutions.com> --- Awesome work all! Pushed to master for 19.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22357 --- Comment #14 from Nick Clemens <nick@bywatersolutions.com> --- (In reply to Jonathan Druart from comment #9)
Or we could have 1 query to fetch the reports, then 1 query per report to fetch the results (O(n), bad)
I think this is not such a bad idea, but we would move the listing of saved reports to the specific report page (instead of listing them for all the reports on the main page) If you are saving a report regularly it will be taking a lot of screen eventually -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22357 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com Status|Pushed to Master |Pushed to Stable Version(s)| |19.05.00, 18.11.06 released in| | --- Comment #15 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Pushed to 18.11.x for 18.11.06 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22357 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |17047 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17047 [Bug 17047] Mana Knowledge Base : share data -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22357 --- Comment #16 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Depends on bug 17047 only in so much as it adds the mana_id field to the group by clause. RMaint note: I removed that field to get my tests to pass again as mana is not in the 18.11.x series. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22357 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com --- Comment #17 from Lucas Gass <lucas@bywatersolutions.com> --- missing dependencies, wont backport to 18.05.x -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org