Under certain circumstances, the Acquisitions module fails to load at CanUserUseBudget in C4::Budgets. To replicate (assuming using kohadevbox): 1. Login as koha_kohadev 2. Attempt to load the Acquisitions module 3. Notice Internal Server Error 4. Check plack log which shows Can't call method "unblessed" on an undefined value at /home/vagrant/kohaclone/C4/Budgets.pm line 919.
Given there is an easy way to trigger this problem. I changed the title.
-- and expanded scope a little: same file, same tweak.
Created attachment 65051 [details] [review] Bug 18942: Add test case to prove change
Created attachment 65052 [details] [review] Bug 18942: Internal Server Error symptomatic of using system user TEST PLAN --------- 1) sudo koha-shell -c bash kohadev 2) prove -v t/Budgets/CanUserUseBudget.t -- works 3) prove -v t/Budgets/CanUserModifyBudget.t -- works 4) exit 5) git bz apply 18942 -- interactive just the test patch 6) repeat steps 1-4 -- prove fails (similar message with 919 in comment #0) 7) git bz apply 18942 -- interactive just the actual fix 8) repeat steps 1-4 -- works 9) run koha qa test tools
Created attachment 65055 [details] [review] Bug 18942: Add test case to prove change Signed-off-by: Lee Jamison <ldjamison@marywood.edu> Works as directed following test plan!
Created attachment 65056 [details] [review] Bug 18942: Internal Server Error symptomatic of using system user TEST PLAN --------- 1) sudo koha-shell -c bash kohadev 2) prove -v t/Budgets/CanUserUseBudget.t -- works 3) prove -v t/Budgets/CanUserModifyBudget.t -- works 4) exit 5) git bz apply 18942 -- interactive just the test patch 6) repeat steps 1-4 -- prove fails (similar message with 919 in comment #0) 7) git bz apply 18942 -- interactive just the actual fix 8) repeat steps 1-4 -- works 9) run koha qa test tools Signed-off-by: Lee Jamison <ldjamison@marywood.edu>
Login with DB user is not allowed, the only 2 available actions are 1. Create a patron and 2. Set the superlibrarian permission
Created attachment 65078 [details] [review] Bug 18942: Simplify syntax
Created attachment 65079 [details] [review] Bug 18942: Add test case to prove change Signed-off-by: Lee Jamison <ldjamison@marywood.edu> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Created attachment 65080 [details] [review] Bug 18942: Internal Server Error symptomatic of using system user TEST PLAN --------- 1) sudo koha-shell -c bash kohadev 2) prove -v t/Budgets/CanUserUseBudget.t -- works 3) prove -v t/Budgets/CanUserModifyBudget.t -- works 4) exit 5) git bz apply 18942 -- interactive just the test patch 6) repeat steps 1-4 -- prove fails (similar message with 919 in comment #0) 7) git bz apply 18942 -- interactive just the actual fix 8) repeat steps 1-4 -- works 9) run koha qa test tools Signed-off-by: Lee Jamison <ldjamison@marywood.edu> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Created attachment 65081 [details] [review] Bug 18942: Simplify syntax Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Created attachment 65082 [details] [review] Bug 18942: (QA followup) Add new tests descriptions Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Pushed to master for 17.11, thanks to everybody involved!
Not pushed to 17.05.x because depends on Bug 17829