From fa264f80b652358e02c93c5ba07267d79974e443 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Tue, 19 Mar 2019 12:41:26 +0000 Subject: [PATCH] Bug 22536: Display problem in Holds to Pull report This patch modifies the display of several values in the holds to pull report so that they can be displayed as lists instead of as chunks of HTML generated in SQL. This patch modifies the SQL in pendingreserves.pl so that values can be formatted in the same way that holding branch is. The better long-term solution is to remove SQL from pendingreserves.pl altogether, but this is a quick fix. This patch also makes a couple of minor markup changes to fix validation. To test, apply the patch and go to Circulation -> Holds to pull. To see the changes the patch makes your holds to pull list should have titles with multiple items at multiple branches, with call number, copy number, and enumeration data. These values should all be displayed in bulleted lists. Signed-off-by: David Roberts --- circ/pendingreserves.pl | 12 ++--- .../prog/en/modules/circ/pendingreserves.tt | 51 +++++++++++++++++++--- 2 files changed, 50 insertions(+), 13 deletions(-) diff --git a/circ/pendingreserves.pl b/circ/pendingreserves.pl index 734b8d7..d0c7274 100755 --- a/circ/pendingreserves.pl +++ b/circ/pendingreserves.pl @@ -192,11 +192,11 @@ my $strsth = GROUP_CONCAT(DISTINCT items.location ORDER BY items.itemnumber SEPARATOR '|') l_location, GROUP_CONCAT(DISTINCT items.itemcallnumber - ORDER BY items.itemnumber SEPARATOR '
') l_itemcallnumber, + ORDER BY items.itemnumber SEPARATOR '|') l_itemcallnumber, GROUP_CONCAT(DISTINCT items.enumchron - ORDER BY items.itemnumber SEPARATOR '
') l_enumchron, + ORDER BY items.itemnumber SEPARATOR '|') l_enumchron, GROUP_CONCAT(DISTINCT items.copynumber - ORDER BY items.itemnumber SEPARATOR '
') l_copynumber, + ORDER BY items.itemnumber SEPARATOR '|') l_copynumber, biblio.title, biblio.author, count(DISTINCT items.itemnumber) as icount, @@ -251,9 +251,9 @@ while ( my $data = $sth->fetchrow_hashref ) { biblionumber => $data->{biblionumber}, holdingbranches => [split('\|', $data->{l_holdingbranch})], branch => $data->{l_branch}, - itemcallnumber => $data->{l_itemcallnumber}, - enumchron => $data->{l_enumchron}, - copyno => $data->{l_copynumber}, + itemcallnumber => [split('\|', $data->{l_itemcallnumber})], + enumchron => [split('\|', $data->{l_enumchron})], + copyno => [split('\|', $data->{l_copynumber})], count => $data->{icount}, rcount => $data->{rcount}, pullcount => $data->{icount} <= $data->{rcount} ? $data->{icount} : $data->{rcount}, diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt index 2f0b775..331e0a1 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt @@ -46,7 +46,7 @@

Holds to pull placed between [% from | $KohaDates %] and [% to | $KohaDates %]

Reported on [% todaysdate | $KohaDates %]

The following holds have not been filled. Please retrieve them and check them in.

-
+
[% IF ( reserveloop ) %] @@ -54,7 +54,7 @@ - @@ -88,13 +88,49 @@ [% END %] + + + - - - [% END %] -- 2.7.4
Pull this many items Items available Patrons with holdsFirst patron + First patron Title Libraries Available call numbers" - [% FOREACH holdingbranch IN reserveloo.holdingbranches %] - [% Branches.GetName ( holdingbranch ) | html %] + [% IF ( reserveloo.holdingbranches ) %] +
    + [% FOREACH holdingbranch IN reserveloo.holdingbranches %] +
  • + [% Branches.GetName ( holdingbranch ) | html %] +
  • + [% END %] +
+ [% END %] +
+ [% IF ( reserveloo.itemcallnumber ) %] +
    + [% FOREACH itemcallnumber IN reserveloo.itemcallnumber %] +
  • + [% itemcallnumber | html %] +
  • + [% END %] +
+ [% END %] +
+ [% IF ( reserveloo.copyno ) %] +
    + [% FOREACH copyno IN reserveloo.copyno %] +
  • + [% copyno | html %] +
  • + [% END %] +
+ [% END %] +
+ [% IF ( reserveloo.enumchron ) %] +
    + [% FOREACH enumchron IN reserveloo.enumchron %] +
  • + [% enumchron | html %] +
  • + [% END %] +
[% END %]

[% reserveloo.itemcallnumber | html %]

[% reserveloo.copyno | html %]

[% reserveloo.enumchron | html %]

[% FOREACH itemType IN reserveloo.itemTypes %] [% ItemTypes.GetDescription( itemType ) | html %] @@ -135,6 +171,7 @@ Biblio level hold. [% END %] [% END %] +