[Bug 36585] New: Patrons with the most checkouts Report when outputting to csv doesn't have the total
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36585 Bug ID: 36585 Summary: Patrons with the most checkouts Report when outputting to csv doesn't have the total Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Reports Assignee: koha-bugs@lists.koha-community.org Reporter: michael.hafen@washk12.org QA Contact: testopia@bugs.koha-community.org I will submit a patch which: Adds the total to csv output. Changes screen output to only show the patrons name once, instead of with each group by column. Also show total checkout when output to screen. Changes item type group by from biblioitems.itemtype to items.itype. -- 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=36585 --- Comment #1 from Michael Hafen <michael.hafen@washk12.org> --- Created attachment 164782 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=164782&action=edit Improve bor_issues_top report -- 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=36585 Michael Hafen <michael.hafen@washk12.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff --- Comment #2 from Michael Hafen <michael.hafen@washk12.org> --- [ The test plan is in the patch, but I forgot to copy it here. ] Try the following with and without a group by, specifically item type. 1. Generate the report with output to screen with a group by. 2. Observe that the patron name is repeated for each column group. 3. Observe that there is no total column. 4. Generate the report with output to csv. 5. Observe that the total check outs is not in the csv. 6. Apply patch. restart Koha. 7. Generate the report to csv again. 8. Observe that the total checkouts is in the csv. 9. Generate the report to screen again. 10. Observe that there is a total column and the patron name is only in one column. -- 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=36585 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Patrons with the most |Patrons with the most |checkouts Report when |checkouts Report when |outputting to csv doesn't |outputting to CSV doesn't |have the total |have the total -- 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=36585 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |michael.hafen@washk12.org |ity.org | Status|Needs Signoff |Failed QA CC| |david@davidnind.com --- Comment #3 from David Nind <david@davidnind.com> --- Hi Michael. There doesn't seem to be a patch attached, as far as I can see. I've changed the assignee to yourself. David -- 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=36585 Michael Hafen <michael.hafen@washk12.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #164782|0 |1 is obsolete| | --- Comment #4 from Michael Hafen <michael.hafen@washk12.org> --- Created attachment 167248 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=167248&action=edit improve bor_issues_top report Try the following with and without a group by, specifically item type. 1. Generate the report with output to screen with a group by. 2. Observe that the patron name is repeated for each column group. 3. Observe that there is no total column. 4. Generate the report with output to csv. 5. Observe that the total check outs is not in the csv. 6. Apply patch. restart Koha. 7. Generate the report to csv again. 8. Observe that the total checkouts is in the csv. 9. Generate the report to screen again. 10. Observe that there is a total column and the patron name is only in one column. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36585 Michael Hafen <michael.hafen@washk12.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36585 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Needs Signoff --- Comment #5 from David Nind <david@davidnind.com> --- Changing status back to needs sign off. The commit message needs formatting according to the https://wiki.koha-community.org/wiki/Commit_messages I will update the commit message when I sign it off. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36585 David Nind <david@davidnind.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=36585 --- Comment #6 from David Nind <david@davidnind.com> --- Created attachment 167251 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=167251&action=edit Bug 36585: Improve 'Patrons with the most checkouts' report Update the 'Patrons with the most checkouts' report (bor_issues_top.pl) to: 1. Add the total to the CSV output. 2. Change the screen output to only show the patrons name once, instead of for each group by column. 3. Add total check out when output to screen. 4. Change item type group by from biblioitems.itemtype to items.itype. Note: This does not fix the SQL query so that it can run if the database is in strict mode. Test plan: 1. If using koha-testing-docker (KTD), set strict SQL mode for your database to 0 (that is, turn it off). (Edit <strict_sql_modes>0</strict_sql_modes> in /etc/koha/sites/kohadev/koha-conf.xml (and then flush_memcached and restart_all)) 2. Add some data so that a useful report can be generated: . Check out and return some items to different patrons in different libraries: ==> Minimum end result: . two items issued to a patron for one library, 1 item issued and returned for the same patron at another library . one item issued to another patron from another patron category for one of the libraries used previously 3. Generate the report with output to screen with a group by, for example: 'By' option set to Category code 4. Observe that the patron name is repeated for each column group. 5. Observe that there is no total column. 6. Generate the report with output to CSV. 7. Observe that the total checkouts is not in the CSV. 8. Apply the patch and restart Koha (restart_all). 9. Generate the CSV report again. 10. Observe that the total checkouts is in the CSV. 11. Generate the report to screen again. 12. Observe that there is a total column and the patron name is only shown in one column. Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36585 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #167248|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36585 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com --- Comment #7 from Lucas Gass <lucas@bywatersolutions.com> --- Why the following line? [% IF ( loopro.hilighted ) %]<td>[% ELSE %]<td>[% END %] -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36585 --- Comment #8 from Michael Hafen <michael.hafen@washk12.org> --- (In reply to Lucas Gass from comment #7)
Why the following line?
[% IF ( loopro.hilighted ) %]<td>[% ELSE %]<td>[% END %]
I don't know either, that line was there when I started. I'm guessing it's for table row zebra stripping. Yeah, digging through the history, that line used to toggle a 'hilighted' class, until 17 years ago in commit 1a90d0db7d. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36585 Lisette Scheer <lisette@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA QA Contact|testopia@bugs.koha-communit |lisette@bywatersolutions.co |y.org |m CC| |lisette@bywatersolutions.co | |m --- Comment #9 from Lisette Scheer <lisette@bywatersolutions.com> --- The page to run the report won't load and throws an error: CGI::Compile::ROOT::kohadevbox_koha_reports_bor_issues_top_2epl::calculate(): DBI Exception: DBD::mysql::st execute failed: 'koha_kohadev.borrowers.surname' isn't in GROUP BY at /kohadevbox/koha/reports/bor_issues_top.pl line 58 at /usr/share/perl5/DBIx/Class/Exception.pm line 77 Additionally it fails the qa tool for using the tab character instead of 4 spaces FAIL koha-tmpl/intranet-tmpl/prog/en/modules/reports/bor_issues_top.tt FAIL forbidden patterns forbidden pattern: tab char (line 90) forbidden pattern: tab char (line 91) forbidden pattern: tab char (line 93) forbidden pattern: tab char (line 105) forbidden pattern: tab char (line 106) forbidden pattern: tab char (line 107) forbidden pattern: tab char (line 108) forbidden pattern: tab char (line 109) FAIL reports/bor_issues_top.pl FAIL forbidden patterns forbidden pattern: tab char (line 83) forbidden pattern: tab char (line 89) forbidden pattern: tab char (line 250) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36585 --- Comment #10 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- (In reply to Lisette Scheer from comment #9)
The page to run the report won't load and throws an error:
CGI::Compile::ROOT::kohadevbox_koha_reports_bor_issues_top_2epl::calculate():
DBI Exception: DBD::mysql::st execute failed: 'koha_kohadev.borrowers.surname' isn't in GROUP BY at /kohadevbox/koha/reports/bor_issues_top.pl line 58 at /usr/share/perl5/DBIx/Class/Exception.pm line 77
Likely due to running in SQL strict mode -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36585 --- Comment #11 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Created attachment 176100 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=176100&action=edit Bug 36585: (QA follow-up) Fix tab spaces Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36585 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36585 Lisette Scheer <lisette@bywatersolutions.com> 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=36585 Lisette Scheer <lisette@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #167251|0 |1 is obsolete| | Attachment #176100|0 |1 is obsolete| | --- Comment #12 from Lisette Scheer <lisette@bywatersolutions.com> --- Created attachment 176102 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=176102&action=edit Bug 36585: Improve 'Patrons with the most checkouts' report Update the 'Patrons with the most checkouts' report (bor_issues_top.pl) to: 1. Add the total to the CSV output. 2. Change the screen output to only show the patrons name once, instead of for each group by column. 3. Add total check out when output to screen. 4. Change item type group by from biblioitems.itemtype to items.itype. Note: This does not fix the SQL query so that it can run if the database is in strict mode. Test plan: 1. If using koha-testing-docker (KTD), set strict SQL mode for your database to 0 (that is, turn it off). (Edit <strict_sql_modes>0</strict_sql_modes> in /etc/koha/sites/kohadev/koha-conf.xml (and then flush_memcached and restart_all)) 2. Add some data so that a useful report can be generated: . Check out and return some items to different patrons in different libraries: ==> Minimum end result: . two items issued to a patron for one library, 1 item issued and returned for the same patron at another library . one item issued to another patron from another patron category for one of the libraries used previously 3. Generate the report with output to screen with a group by, for example: 'By' option set to Category code 4. Observe that the patron name is repeated for each column group. 5. Observe that there is no total column. 6. Generate the report with output to CSV. 7. Observe that the total checkouts is not in the CSV. 8. Apply the patch and restart Koha (restart_all). 9. Generate the CSV report again. 10. Observe that the total checkouts is in the CSV. 11. Generate the report to screen again. 12. Observe that there is a total column and the patron name is only shown in one column. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36585 Lisette Scheer <lisette@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #176102|0 |1 is obsolete| | --- Comment #13 from Lisette Scheer <lisette@bywatersolutions.com> --- Created attachment 176103 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=176103&action=edit Bug 36585: Improve 'Patrons with the most checkouts' report Update the 'Patrons with the most checkouts' report (bor_issues_top.pl) to: 1. Add the total to the CSV output. 2. Change the screen output to only show the patrons name once, instead of for each group by column. 3. Add total check out when output to screen. 4. Change item type group by from biblioitems.itemtype to items.itype. Note: This does not fix the SQL query so that it can run if the database is in strict mode. Test plan: 1. If using koha-testing-docker (KTD), set strict SQL mode for your database to 0 (that is, turn it off). (Edit <strict_sql_modes>0</strict_sql_modes> in /etc/koha/sites/kohadev/koha-conf.xml (and then flush_memcached and restart_all)) 2. Add some data so that a useful report can be generated: . Check out and return some items to different patrons in different libraries: ==> Minimum end result: . two items issued to a patron for one library, 1 item issued and returned for the same patron at another library . one item issued to another patron from another patron category for one of the libraries used previously 3. Generate the report with output to screen with a group by, for example: 'By' option set to Category code 4. Observe that the patron name is repeated for each column group. 5. Observe that there is no total column. 6. Generate the report with output to CSV. 7. Observe that the total checkouts is not in the CSV. 8. Apply the patch and restart Koha (restart_all). 9. Generate the CSV report again. 10. Observe that the total checkouts is in the CSV. 11. Generate the report to screen again. 12. Observe that there is a total column and the patron name is only shown in one column. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36585 --- Comment #14 from Lisette Scheer <lisette@bywatersolutions.com> --- Created attachment 176104 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=176104&action=edit Bug 36585: (QA follow-up) Fix tab spaces Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36585 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the| |This improves the 'Patrons release notes| |with the most checkouts' | |report to: | |1. Add the total | |to the CSV output. | |2. | |Change the screen output to | |only show the patrons name | |once, instead of for each | |group by column. | |3. Add | |total check out when output | |to screen. | |4. Change item | |type group by from | |biblioitems.itemtype to | |items.itype. | | | |Note: This | |does not fix the SQL query | |so that it can run if the | |database is in strict mode. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36585 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |additional_work_needed --- Comment #15 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Note: These strings are not translatable: + print "Patron".$sep; + print "Total".$sep; But neither was the already existing: - print $sep . "Total\n"; Can you please file a bug for this issue? Thank you. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36585 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to main Version(s)| |25.05.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36585 --- Comment #16 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Pushed for 25.05! Well done everyone, thank you! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36585 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Patrons with the most |Report 'Patrons with the |checkouts Report when |most checkouts' doesn't |outputting to CSV doesn't |have the total when |have the total |outputting to CSV -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36585 Michael Hafen <michael.hafen@washk12.org> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=38915 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36585 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|additional_work_needed | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36585 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m Status|Pushed to main |Needs documenting --- Comment #17 from Fridolin Somers <fridolin.somers@biblibre.com> --- Enhancement not pushed to 24.11.x -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org