[Bug 13452] New: Average checkout report always uses biblioitems.itemtype
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13452 Bug ID: 13452 Summary: Average checkout report always uses biblioitems.itemtype Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: minor Priority: P5 - low Component: Reports Assignee: gmcharlt@gmail.com Reporter: fridolyn.somers@biblibre.com QA Contact: testopia@bugs.koha-community.org The average checkout report reports/issues_avg_stats.pl always uses biblioitems.itemtype, regardless to item-level_itypes system preference. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13452 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Patch complexity|--- |Medium patch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13452 --- Comment #1 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 40003 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=40003&action=edit Bug 13452: 'Average loan time' report to obey item-level_itypes preference Fixes the 'Average loan time' report so that the system preference setting item-level_itypes is taken into account. Before the patch, the report was always using the biblio level itemtype. With the patch, it will depend on the pref setting. To test: - Run various reports, compare results with both possible pref settings - Try limiting your search in various ways, especially on a specific itemtype - Make sure you switch checkboxes in testing, using itemtype as the row or as the column Notes: - Filtering on a specific itemtype does not work without the patch as it fixes a bug there. - Fixes headings and breadcrumbs so that the name of the report is the same as on the reports start page -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13452 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #40003|0 |1 is obsolete| | --- Comment #2 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 40004 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=40004&action=edit Bug 13452: 'Average loan time' report to obey item-level_itypes preference Fixes the 'Average loan time' report so that the system preference setting item-level_itypes is taken into account. Before the patch, the report was always using the biblio level itemtype. With the patch, it will depend on the pref setting. To test: - Run various reports, compare results with both possible pref settings - Try limiting your search in various ways, especially on a specific itemtype - Make sure you switch checkboxes in testing, using itemtype as the row or as the column Notes: - Filtering on a specific itemtype on master was not working if the itemtype was chosen as column. The patch should fix that. - Fixes headings and breadcrumbs so that the name of the report is the same as on the reports start page -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13452 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de Severity|minor |normal Assignee|gmcharlt@gmail.com |katrin.fischer@bsz-bw.de -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13452 Amit <amitddng135@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |amitddng135@gmail.com -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13452 --- Comment #3 from M. Tompsett <mtompset@hotmail.com> --- Comment on attachment 40004 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=40004 Bug 13452: 'Average loan time' report to obey item-level_itypes preference Review of attachment 40004: --> (http://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=13452&attachment=40004) ----------------------------------------------------------------- ::: reports/issues_avg_stats.pl @@ +407,4 @@
if (( @colfilter ) and ($colfilter[1])){ $sth2->execute("'".$colfilter[0]."'","'".$colfilter[1]."'"); } elsif ($colfilter[0]) { + $sth2->execute;
Perhaps a shallow reading of the changes doesn't make this obvious, but why did this change? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13452 --- Comment #4 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Comment on attachment 40004 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=40004 Bug 13452: 'Average loan time' report to obey item-level_itypes preference Review of attachment 40004: --> (http://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=13452&attachment=40004) ----------------------------------------------------------------- ::: reports/issues_avg_stats.pl @@ +407,4 @@
if (( @colfilter ) and ($colfilter[1])){ $sth2->execute("'".$colfilter[0]."'","'".$colfilter[1]."'"); } elsif ($colfilter[0]) { + $sth2->execute;
Because without this change there was always an error in the logs - without any of the other changes of the patch. I needed to change it to get it working first... that's how I remember. The answer should be further above in the code... this whole script should be rewritten to create the SQL in cleaner ways. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13452 Indranil Das Gupta <indradg@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #40004|0 |1 is obsolete| | --- Comment #5 from Indranil Das Gupta <indradg@gmail.com> --- Created attachment 40798 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=40798&action=edit Bug 13452: 'Average loan time' report to obey item-level_itypes preference Fixes the 'Average loan time' report so that the system preference setting item-level_itypes is taken into account. Before the patch, the report was always using the biblio level itemtype. With the patch, it will depend on the pref setting. To test: - Run various reports, compare results with both possible pref settings - Try limiting your search in various ways, especially on a specific itemtype - Make sure you switch checkboxes in testing, using itemtype as the row or as the column Notes: - Filtering on a specific itemtype on master was not working if the itemtype was chosen as column. The patch should fix that. - Fixes headings and breadcrumbs so that the name of the report is the same as on the reports start page Signed-off-by: Indranil Das Gupta (L2C2 Technologies) <indradg@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13452 Indranil Das Gupta <indradg@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |indradg@gmail.com Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13452 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org Status|Signed Off |Failed QA --- Comment #6 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- I won't use the splinter review, it will be confusing. 1/ There are 2 different ways to do the same thing: 247 if ( $line=~/itemtype/ ) { $line = $itype; } 257 $linefilter[0] = @$filters[9] if ($line =~ /itemtype/ ) ; and 263 if ( $column=~/itemtype/ ) { $column = $itype; } 274 $colfilter[0] = @$filters[9] if ($column =~ $itype ) ; 2/ Please use sql placeholders for "issuingrules.itemtype=$itype" (x3) 3/ if (( @colfilter ) and ($colfilter[1])){ $sth2->execute("'".$colfilter[0]."'","'".$colfilter[1]."'"); } elsif ($colfilter[0]) { $sth2->execute; } else { $sth2->execute; } Could be : if (( @colfilter ) and ($colfilter[1])){ $sth2->execute("'".$colfilter[0]."'","'".$colfilter[1]."'"); } else { $sth2->execute; } -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13452 --- Comment #7 from Julian Maurice <julian.maurice@biblibre.com> --- Created attachment 43053 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=43053&action=edit Bug 13452: Fix obvious issues in issues_avg_stats.pl - Remove joins with issuingrules which are not needed - Fix the SQL query so that $weight is now the value of COUNT(*) instead of a timestamp - QA fix: '$column eq $itype' instead of '$column =~ $itype' (same for $line) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13452 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff CC| |julian.maurice@biblibre.com --- Comment #8 from Julian Maurice <julian.maurice@biblibre.com> --- QA fix #2 not needed due to the removal of joins QA fix #3: the whole 'if' block is unnecessary, and wrong, since there is no placeholders in query. Replaced by a simple $sth2->execute; -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org