Bug 16429

Summary: Going to circulation from notice triggers may change logged in branch
Product: Koha Reporter: Kyle M Hall <kyle>
Component: Architecture, internals, and plumbingAssignee: Kyle M Hall <kyle>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: minor    
Priority: P5 - low CC: jonathan.druart, julian.maurice, veron
Version: unspecified   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11779
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Bug 16429 - Going to circulation from notice triggers may change logged in branch
Bug 16429 - Fix root problem
Bug 16429 - Fix root problem
Bug 16429 - Fix root problem
Bug 16429 - Going to circulation from notice triggers may change logged in branch
Bug 16429 - Fix root problem
Bug 16429 - Going to circulation from notice triggers may change logged in branch
Bug 16429 - Fix root problem
Bug 16429 - Going to circulation from notice triggers may change logged in branch
Bug 16429 - Fix root problem

Description Kyle M Hall 2016-05-03 10:28:39 UTC
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!

To reproduce:
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 ).
Comment 1 Kyle M Hall 2016-05-03 10:49:21 UTC Comment hidden (obsolete)
Comment 2 Kyle M Hall 2016-05-03 10:49:28 UTC Comment hidden (obsolete)
Comment 3 Kyle M Hall 2016-05-03 10:51:40 UTC Comment hidden (obsolete)
Comment 4 Kyle M Hall 2016-05-03 10:56:36 UTC Comment hidden (obsolete)
Comment 5 Marc Véron 2016-05-03 12:43:36 UTC Comment hidden (obsolete)
Comment 6 Marc Véron 2016-05-03 12:44:35 UTC Comment hidden (obsolete)
Comment 7 Nicole C. Engard 2016-05-03 14:00:21 UTC Comment hidden (obsolete)
Comment 8 Nicole C. Engard 2016-05-03 14:00:27 UTC Comment hidden (obsolete)
Comment 9 Jonathan Druart 2016-05-04 16:03:47 UTC
Created attachment 51194 [details] [review]
Bug 16429 - Going to circulation from notice triggers may change logged in branch

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>
Comment 10 Jonathan Druart 2016-05-04 16:04:11 UTC
Good catch Kyle!
Comment 11 Jonathan Druart 2016-05-04 16:04:25 UTC
Created attachment 51195 [details] [review]
Bug 16429 - Fix root problem

The root of this issue is old code in circulation.pl that is no longer
needed and leaves the affected scripts open to future regressions.

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>
Comment 12 Kyle M Hall 2016-05-05 10:21:49 UTC
Pushed to master for 16.05!
Comment 13 Julian Maurice 2016-05-16 11:46:39 UTC
Patch pushed to 3.22.x, will be in 3.22.7