From ad056f8979ef5ea332f4f12a130f32315072d296 Mon Sep 17 00:00:00 2001 From: Lucas Gass Date: Wed, 27 Sep 2023 18:38:31 +0000 Subject: [PATCH] Bug 34938: Add collection column to hold ratio report To test: 1. Create enough holds on items so that they will appear on the holds ratio report. 2. Visit circ/reserveratios.pl by going to Circulation > Holds ratios 3. No collection column. 4. Apply patch and restart services 5. Look again at circ/reserveratios.pl, now you should see a collection column. 6. Ensure that the data in the column looks correct. 7. Go to Administration > Table settings to ensure you can hide that column, and other columns in the table. Signed-off-by: Andrew Fuerste-Henry --- admin/columns_settings.yml | 2 ++ circ/reserveratios.pl | 3 +++ .../intranet-tmpl/prog/en/modules/circ/reserveratios.tt | 8 ++++++++ 3 files changed, 13 insertions(+) diff --git a/admin/columns_settings.yml b/admin/columns_settings.yml index 270c99984be..4c731d70876 100644 --- a/admin/columns_settings.yml +++ b/admin/columns_settings.yml @@ -1565,6 +1565,8 @@ modules: columnname: location - columnname: itemtype + - + columnname: collection - columnname: call_numbers - diff --git a/circ/reserveratios.pl b/circ/reserveratios.pl index 51ee09647b3..5a20c768e2f 100755 --- a/circ/reserveratios.pl +++ b/circ/reserveratios.pl @@ -116,6 +116,8 @@ my $strsth = ORDER BY items.itemnumber SEPARATOR '|') as l_location, GROUP_CONCAT(DISTINCT items.itype ORDER BY items.itemnumber SEPARATOR '|') as l_itype, + GROUP_CONCAT(DISTINCT items.ccode + ORDER BY items.ccode SEPARATOR '|') as l_ccode, reserves.found, biblio.title, @@ -173,6 +175,7 @@ while ( my $data = $sth->fetchrow_hashref ) { itemcallnumber => $data->{itemcallnumber}, location => [split('\|', $data->{l_location})], itype => [split('\|', $data->{l_itype})], + ccode => [split('\|', $data->{l_ccode})], reservecount => $data->{reservecount}, itemcount => $data->{itemcount}, copies_to_buy => sprintf( "%d", $copies_to_buy ), diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/reserveratios.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/reserveratios.tt index 222f695d0eb..953f50854d7 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/reserveratios.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/reserveratios.tt @@ -60,6 +60,7 @@ Holding libraries Location Itype + Collection Call numbers Items needed @@ -101,6 +102,13 @@ [% END %] + + +