Bug 25537: Page reload at branchtransfers.pl loses destination branch
authorKyle M Hall <kyle@bywatersolutions.com>
Thu, 21 May 2020 17:52:32 +0000 (13:52 -0400)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 15 Jun 2020 09:53:36 +0000 (11:53 +0200)
At branchtransfers.pl, one selects a destination branch and scans in any
number of items to generate transfers to that branch. However, anything
that makes the page reload causes your branch selection to be lost,
reverting you back to whichever branch comes first alphabetically.

This is an invitation to error when one has a stack of books to
send all to the same branch. Could that error handling get moved
into a modal or something that won't reload the page?

Test Plan:
1) Place a hold on an item and set it to waiting
2) Initiate a branch transfer from branchtransfers.pl for any branch but
   the first in the pulldown branch selector
3) Choose to cancel the hold and transfer
4) Note the pulldown reverts to the first option
5) Apply this patch
6) Repeat steps 1-3
7) Note the pulldown retains your preveiously selected branch!

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

koha-tmpl/intranet-tmpl/prog/en/modules/circ/branchtransfers.tt

index 3e7f9e9..9b3f6a2 100644 (file)
@@ -46,6 +46,7 @@
                     [% END %]
                     <input type="hidden" name="itemnumber" value="[% itemnumber | html %]" />
                     <input type="hidden" name="borrowernumber" value="[% borrowernumber | html %]" />
+                    <input type="hidden" name="tobranchcd" value="[% tobranchcd | html %]" />
                     [% IF ( waiting ) %]
                         <input type="hidden" name="barcode" value="[% barcode | html %]" />
                         <input type="hidden" name="request" value="KillWaiting" />