Bug 22536: Display problem in Holds to Pull report
authorOwen Leonard <oleonard@myacpl.org>
Tue, 19 Mar 2019 12:41:26 +0000 (12:41 +0000)
committerLucas Gass <lucas@bywatersolutions.com>
Mon, 1 Apr 2019 16:41:23 +0000 (16:41 +0000)
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 <david.roberts@ptfs-europe.com>
Signed-off-by: Bin Wen <bin.wen@inlibro.com>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 9a321c128fed457bf6d11d2ce7ee7edf7dd28004)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 38bbe82aa07aa9a1a3cc33e00b5b8e459eb28a30)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

circ/pendingreserves.pl
koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt

index 734b8d7..d0c7274 100755 (executable)
@@ -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 '<br/>') l_itemcallnumber,
+                    ORDER BY items.itemnumber SEPARATOR '|') l_itemcallnumber,
             GROUP_CONCAT(DISTINCT items.enumchron
-                    ORDER BY items.itemnumber SEPARATOR '<br/>') l_enumchron,
+                    ORDER BY items.itemnumber SEPARATOR '|') l_enumchron,
             GROUP_CONCAT(DISTINCT items.copynumber
-                    ORDER BY items.itemnumber SEPARATOR '<br/>') 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},
index fe97911..0ba8587 100644 (file)
@@ -46,7 +46,7 @@
 <h2>Holds to pull placed between [% from | $KohaDates %] and [% to | $KohaDates %]</h2>
 <h3>Reported on [% todaysdate | $KohaDates %]</h3>
 <p>The following holds have not been filled. Please retrieve them and check them in.</p>
-<div class="searchresults">
+<div id="searchresults">
     [% IF ( reserveloop ) %]
     <table id="holdst">
     <thead>
@@ -54,7 +54,7 @@
         <th>Pull this many items</th>
         <th>Items available</th>
         <th>Patrons with holds</th>
-        <th>First patron</td>
+        <th>First patron</th>
         <th class="anti-the">Title</th>
         <th class="string-sort">Libraries</th>
         <th>Available call numbers</th>
             <td>"</td>
         [% END %]
         <td>
-            [% FOREACH holdingbranch IN reserveloo.holdingbranches %]
-                [% Branches.GetName ( holdingbranch ) %]
+            [% IF ( reserveloo.holdingbranches ) %]
+               <ul>
+                    [% FOREACH holdingbranch IN reserveloo.holdingbranches %]
+                        <li>
+                            [% Branches.GetName ( holdingbranch ) | html %]
+                        </li>
+                    [% END %]
+               </ul>
+            [% END %]
+        </td>
+        <td>
+            [% IF ( reserveloo.itemcallnumber ) %]
+                <ul>
+                    [% FOREACH itemcallnumber IN reserveloo.itemcallnumber  %]
+                        <li>
+                            [% itemcallnumber | html %]
+                        </li>
+                    [% END %]
+                </ul>
+            [% END %]
+        </td>
+        <td>
+            [% IF ( reserveloo.copyno ) %]
+                <ul>
+                    [% FOREACH copyno IN reserveloo.copyno %]
+                        <li>
+                            [% copyno | html %]
+                        </li>
+                    [% END %]
+                </ul>
+            [% END %]
+        </td>
+        <td>
+            [% IF ( reserveloo.enumchron ) %]
+                <ul>
+                    [% FOREACH enumchron IN reserveloo.enumchron %]
+                        <li>
+                            [% enumchron | html %]
+                        </li>
+                    [% END %]
+                </ul>
             [% END %]
         </td>
-        <td><p>[% reserveloo.itemcallnumber %]</p></td>
-        <td><p>[% reserveloo.copyno %]</p></td>
-        <td><p>[% reserveloo.enumchron %]</p></td>
         <td>
         [% FOREACH itemType IN reserveloo.itemTypes %]
             [% ItemTypes.GetDescription( itemType ) %]
                 <span>Biblio level hold.</span>
             [% END %]
         [% END %]
+            </td>
         </tr>
         [% END %]
     </tbody>