Description
Kyle M Hall (khall)
2014-02-18 12:43:17 UTC
Created attachment 25368 [details] [review] Bug 11779 - Unexpected change in logged in branch when changing overdue notice triggers Steps to reproduce: 1) Log into staff intranet 2) Set logged in branch 3) Browse to tools/overdue notice triggers 4) Select a branch from the pulldown that is not your logged in branch 5) use the "Check out" bar at the top of the page to search for a patron to check out to 6) Once you have landed here, click the "check out" tab link again, or the Edit button ( any action really ) 7) Note your logged in branch has now changed to the once selected when editing the notice/status triggers This is due to the way the patron search passes the branchcode to be used via the form. This form assumes the branchcode variable is always the currently logged in branch, which may not and is not always the case. Test Plan: 1) Apply this patch 2) Repeat the steps to reproduce above 3) Note your logged in branch does not change Created attachment 25369 [details] [review] Bug 11779 - Unexpected change in logged in branch when changing overdue notice triggers Steps to reproduce: 1) Log into staff intranet 2) Set logged in branch 3) Browse to tools/overdue notice triggers 4) Select a branch from the pulldown that is not your logged in branch 5) use the "Check out" bar at the top of the page to search for a patron to check out to 6) Once you have landed here, click the "check out" tab link again, or the Edit button ( any action really ) 7) Note your logged in branch has now changed to the once selected when editing the notice/status triggers This is due to the way the patron search passes the branchcode to be used via the form. This form assumes the branchcode variable is always the currently logged in branch, which may not and is not always the case. Test Plan: 1) Apply this patch 2) Repeat the steps to reproduce above 3) Note your logged in branch does not change Created attachment 25398 [details] [review] Bug 11779 - Unexpected change in logged in branch when changing overdue notice triggers Steps to reproduce: 1) Log into staff intranet 2) Set logged in branch 3) Browse to tools/overdue notice triggers 4) Select a branch from the pulldown that is not your logged in branch 5) use the "Check out" bar at the top of the page to search for a patron to check out to 6) Once you have landed here, click the "check out" tab link again, or the Edit button ( any action really ) 7) Note your logged in branch has now changed to the once selected when editing the notice/status triggers This is due to the way the patron search passes the branchcode to be used via the form. This form assumes the branchcode variable is always the currently logged in branch, which may not and is not always the case. Test Plan: 1) Apply this patch 2) Repeat the steps to reproduce above 3) Note your logged in branch does not change Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Created attachment 25437 [details] [review] Bug 11779 - Unexpected change in logged in branch when changing overdue notice triggers Steps to reproduce: 1) Log into staff intranet 2) Set logged in branch 3) Browse to tools/overdue notice triggers 4) Select a branch from the pulldown that is not your logged in branch 5) use the "Check out" bar at the top of the page to search for a patron to check out to 6) Once you have landed here, click the "check out" tab link again, or the Edit button ( any action really ) 7) Note your logged in branch has now changed to the once selected when editing the notice/status triggers This is due to the way the patron search passes the branchcode to be used via the form. This form assumes the branchcode variable is always the currently logged in branch, which may not and is not always the case. Test Plan: 1) Apply this patch 2) Repeat the steps to reproduce above 3) Note your logged in branch does not change Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Funny bug :) This patch fixes the described issue and should not introduce regression. Pushed to master, along with a follow-up that - Ensures that the plugin returns the empty string, not undef, if no user environment is set. This avoids spurious warnings should the new template plugin function be used in the OPAC. - Adds unit tests for the new plugin function. Thanks, Kyle! Pushed to 3.14.x, will be in 3.14.07 Pushed to 3.12.x will be in 3.12.13 |