From b0dedd61a488812a1180a1e748186e66e1c9a9fb 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 Signed-off-by: Kyle M Hall Signed-off-by: Tomas Cohen Arazi --- 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 ce860ab4ea..5a36f9b1d4 100644 --- a/admin/columns_settings.yml +++ b/admin/columns_settings.yml @@ -1731,6 +1731,8 @@ modules: columnname: location - columnname: itemtype + - + columnname: collection - columnname: call_numbers - diff --git a/circ/reserveratios.pl b/circ/reserveratios.pl index 51ee09647b..5a20c768e2 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 6efc3e0263..ae70c990a4 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 %] + +
    + [% FOREACH ccode IN reserveloo.ccode %] +
  • [% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.ccode', authorised_value => ccode ) | html %]
  • + [% END %] +
+
    [% FOREACH listcall IN reserveloo.listcall %] -- 2.39.5