Bug 16429 - Going to circulation from notice triggers may change logged in branch
authorKyle M Hall <kyle@bywatersolutions.com>
Tue, 3 May 2016 10:30:20 +0000 (10:30 +0000)
committerKyle M Hall <kyle@bywatersolutions.com>
Thu, 5 May 2016 10:20:44 +0000 (10:20 +0000)
If you edit notice triggers and then use the "Checko out" tab from the
top bar, you may change your logged in library by accident!

Test Plan:
1) Disable the system preference CircAutocompl
2) Go to the notice triggers
3) Select the triggers for a library other than the one you logged in as
4) Use the "Check out" tab at the top to check out to a patron
5) Note your logged in branch has changed ( you'll need to refresh the
    page if the check out search took you directly to one patron ).
6) Apply this patch
7) Repeat steps 2-4
8) Note the branch no longer changes

Tested with both patches applied. Works as expected.
Signed-off-by: Marc VĂ©ron <veron@veron.ch>
Signed-off-by: Heather Braum <hbraum@nekls.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
koha-tmpl/intranet-tmpl/prog/en/includes/patron-search-box.inc

index e7fb788..11ae617 100644 (file)
@@ -37,7 +37,7 @@ $(document).ready(function(){
         </div>
        [% ELSE %]
             <input id="findborrower" name="findborrower" size="40" class="head-searchbox focus" type="text" />
-            <input name="branch" value="[% branch %]" type="hidden" />
+            <input name="branch" value="[% Branches.GetLoggedInBranchcode() %]" type="hidden" />
             <input name="printer" value="" type="hidden" />
             [% IF ( stickyduedate ) %]
             <input type="hidden" name="duedatespec" value="[% duedatespec %]" />