From 070fe7b4641224bafc7eb6b3d099479bf8c3187f 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 (cherry picked from commit b0dedd61a488812a1180a1e748186e66e1c9a9fb) Signed-off-by: Fridolin Somers --- 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 e528b76298..3a1c616a4c 100644 --- a/admin/columns_settings.yml +++ b/admin/columns_settings.yml @@ -1557,6 +1557,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 e621e338c3..2993cf57a1 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/reserveratios.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/reserveratios.tt @@ -55,6 +55,7 @@ Holding libraries Location Itype + Collection Call numbers Items needed @@ -96,6 +97,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