Bug 8448 - Holds Awaiting Pickup : Cancelling a hold on a waiting item with multiple...
authorDavid Cook <dcook@prosentient.com.au>
Mon, 16 Jul 2012 04:13:31 +0000 (14:13 +1000)
committerPaul Poulain <paul.poulain@biblibre.com>
Tue, 24 Jul 2012 14:39:34 +0000 (16:39 +0200)
When you cancel a hold in the "Hold Waiting" tab of Holds Awaiting Pickup, you should be prompted to retain or transfer the hold for the next patron in the queue. However, instead of seeing this prompt, you are just shown white screen that fails to alert you to the fact that there are more holds on that item!

There is a missing FOREACH reference in waitingreserves.tt. The template tries to directly reference the hash within the cancel_results array, but we need to access the array before we can access the hash.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
koha-tmpl/intranet-tmpl/prog/en/modules/circ/waitingreserves.tt

index 0101d7f..ea0faef 100644 (file)
@@ -45,26 +45,28 @@ $.tablesorter.addParser({
             [% END %]
         </h2>
     [% IF ( cancel_result ) %]
-        [% IF ( cancel_result.messagetransfert ) %]
-            <div>
-                <h2>Hold find for ([% nextreservtitle %]), must be transferred</h2>
-                <p>This hold placed by : <b> [% nextreservsurname %] [% nextreservfirstname %]</b> at the library : <b> [% branchname %] </b>, Please transfer this hold.
-                </p>
-                <form name="cancelReservewithtransfert" action="waitingreserves.pl" method="post">
-                    <input type="submit" class="button" />
-                </form>
-            </div>
-        [% END %]
-        [% IF ( cancel_result.waiting ) %]
-            <div id="bloc25">
-                <h2>This hold is waiting</h2>
-                <p>This hold ([% nextreservtitle %]) was placed by <b> : [% nextreservsurname %] [% nextreservfirstname %]</b>,
-                Please retain this hold.
-                </p>
-                <form name="cancelReservewithwaiting" action="waitingreserves.pl" method="post">
-                    <input type="submit" />
-                </form>
-            </div>
+        [% FOREACH cancel_result %]
+            [% IF ( messagetransfert ) %]
+                <div>
+                    <h2>Hold find for ([% nextreservtitle %]), must be transferred</h2>
+                    <p>This hold placed by : <b> [% nextreservsurname %] [% nextreservfirstname %]</b> at the library : <b> [% branchname %] </b>, Please transfer this hold.
+                    </p>
+                    <form name="cancelReservewithtransfert" action="waitingreserves.pl" method="post">
+                        <input type="submit" class="button" />
+                    </form>
+                </div>
+            [% END %]
+            [% IF ( waiting ) %]
+                <div id="bloc25">
+                    <h2>This hold is waiting</h2>
+                    <p>This hold ([% nextreservtitle %]) was placed by <b> : [% nextreservsurname %] [% nextreservfirstname %]</b>,
+                    Please retain this hold.
+                    </p>
+                    <form name="cancelReservewithwaiting" action="waitingreserves.pl" method="post">
+                        <input type="submit" />
+                    </form>
+                </div>
+            [% END %]
         [% END %]
     [% ELSE %]
         <div id="resultlist" class="toptabs">