https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42803 Bug ID: 42803 Summary: Regression in reports/catalogue_out.pl Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Reports Assignee: koha-bugs@lists.koha-community.org Reporter: lucas@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org CC: lisette@bywatersolutions.com Target Milestone: ---
From Bug 42361:
1) Set strict_sql_modes to 0 in koha-conf.xml and restart plack 2) Go to Reports > Items with no checkouts: <staff_url>/cgi-bin/koha/reports/catalogue_out.pl 3) Leave Library set to "Any library" 4) Pick a specific item type that you know has items (e.g. "BK") 5) Submit, you get 0 results. Without patch you get normal results. If the first filter value is empty (i.e. 'Any library'), the filter key gets skipped which essentially results in items.homebranch LIKE 'BK' (from the test plan above). I think we need this: foreach my $filter (@filters_input) { - if ( Koha::Libraries->find($filter) || Koha::ItemTypes->find($filter) ) { + if ( !$filter || Koha::Libraries->find($filter) || Koha::ItemTypes->find($filter) ) { push( @filters, $filter ); } } -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.