[Bug 35806] New: Patron statistics report should treat sort 1 and sort 2 the same
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35806 Bug ID: 35806 Summary: Patron statistics report should treat sort 1 and sort 2 the same 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: katrin.fischer@bsz-bw.de QA Contact: testopia@bugs.koha-community.org For some unknown reason we treat the sort 1 and sort 2 search fields in the patron statistics report differently: $req = $dbh->prepare("SELECT authorised_value,lib FROM authorised_values WHERE category='Bsort1' ORDER BY lib"); $req->execute; $template->param( SORT1_LOOP => $req->fetchall_arrayref({})); $req = $dbh->prepare("SELECT DISTINCTROW sort2 AS value FROM borrowers WHERE sort2 IS NOT NULL AND sort2 <> '' ORDER BY sort2 LIMIT 200"); # More than 200 items in a dropdown is not going to be useful anyway, and w/ 50,000 patrons we can destroy DB performance. $req->execute; $template->param( SORT2_LOOP => $req->fetchall_arrayref({})); For sort 1 we check for the authorised value, for the sort 2 we check for values from the database. For each we should check first if the field is linked to a database value and if not, we can create a list from the database. -- 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=35806 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |33452 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33452 [Bug 33452] Update patron statistics report -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org