[Bug 6137] New: Fix a little bug when userenv is null
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6137 Bug #: 6137 Summary: Fix a little bug when userenv is null Classification: Unclassified Change sponsored?: --- Product: Koha Version: master Platform: All OS/Version: All Status: NEW Severity: trivial Priority: P5 Component: Circulation AssignedTo: kyle.m.hall@gmail.com ReportedBy: julian.maurice@biblibre.com QAContact: koha-bugs@lists.koha-community.org CC: gmcharlt@gmail.com Coming patch just adds a test which check userenv is not null before using it. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6137 --- Comment #1 from Julian Maurice <julian.maurice@biblibre.com> 2011-04-08 09:26:31 UTC --- Created attachment 3829 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=3829 Patch -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6137 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P5 |PATCH-Sent -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6137 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |chris@bigballofwax.co.nz Patch Status|--- |Needs Signoff -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6137 --- Comment #2 from Chris Cormack <chris@bigballofwax.co.nz> 2011-05-16 22:23:30 UTC --- <<<<<<< HEAD if ($circcontrol eq 'PickupLibrary') { $branch= C4::Context->userenv->{'branch'} if C4::Context->userenv; ======= if ($circcontrol eq 'PickupLibrary' and (C4::Context->userenv and C4::Context->userenv->{'branch'}) ){ $branch= C4::Context->userenv->{'branch'};
> Bug 6137: fix a Circulation bug. userenv null
Patch conflicted, I chose the change in this patch to resolve the conflict as it is a more complete fix -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6137 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #3829|0 |1 is obsolete| | --- Comment #3 from Chris Cormack <chris@bigballofwax.co.nz> 2011-05-16 22:24:59 UTC --- Created attachment 4132 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=4132 Signed off patch -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6137 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch Status|Needs Signoff |Signed Off -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6137 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |paul.poulain@biblibre.com --- Comment #4 from Paul Poulain <paul.poulain@biblibre.com> 2011-08-10 11:53:19 UTC --- QA comment I think this bugfix is OK, but a use case is needed to earn passed QA status: how can I reproduce the problem ? -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6137 Ian Walls <ian.walls@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ian.walls@bywatersolutions. | |com --- Comment #5 from Ian Walls <ian.walls@bywatersolutions.com> 2011-09-22 12:14:56 UTC --- Yes, going to need a test case so we can see what this bug looks like in action, and thus prove that the fix here does indeed fix the bad behaviour. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6137 M. de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl Patch Status|Signed Off |Failed QA --- Comment #6 from M. de Rooy <m.de.rooy@rijksmuseum.nl> 2011-11-07 14:42:15 UTC --- As mentioned above, test plan is wanted. Just looking at the code, the patch could change the flow through code. It seems that the check on existence should be handled within the if block, and provide the alternative in case it fails. Do I overlook something? -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6137 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff AssignedTo|kyle.m.hall@gmail.com |julian.maurice@biblibre.com --- Comment #7 from Julian Maurice <julian.maurice@biblibre.com> 2012-01-27 15:09:47 UTC --- Created attachment 7354 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=7354 Unit tests for _GetCircControlBranch These unit tests call _GetCircControlBranch for each value of syspref CircControl, with and without a userenv. Not sure about what should be returned when userenv is not set, undef or the item branch (or maybe the patron branch)? Without the first patch it returns undef, and the item branch with the patch applied. Tests expect that it must returns the item branch when userenv is not set. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6137 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|PATCH-Sent (DO NOT USE) |P3 Status|Needs Signoff |Failed QA --- Comment #8 from Paul Poulain <paul.poulain@biblibre.com> 2012-02-01 11:13:12 UTC --- testing the unit tests, it seems something is wrong: 12:10 ~/koha.dev/koha-community (new/bug_6137 $%)$ prove t/Circulation.t t/Circulation.t .. 2/? # Now, set a userenv t/Circulation.t .. All 15 subtests passed Test Summary Report ------------------- t/Circulation.t (Wstat: 0 Tests: 15 Failed: 0) Parse errors: Plan (1..15) must be at the beginning or end of the TAP output Files=1, Tests=15, 2 wallclock secs ( 0.04 usr 0.01 sys + 0.92 cusr 0.06 csys = 1.03 CPU) Result: FAIL marking failed QA for now, -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6137 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #7354|0 |1 is obsolete| | --- Comment #9 from Julian Maurice <julian.maurice@biblibre.com> 2012-02-03 12:58:16 UTC --- Created attachment 7443 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=7443 Unit tests for _GetCircControlBranch prove failed because "plan tests => 15" was executed after the first test. Now it's "use Test::More tests => 15", and prove returns success. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6137 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6137 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #7443|0 |1 is obsolete| | --- Comment #10 from Paul Poulain <paul.poulain@biblibre.com> 2012-02-13 12:41:11 UTC --- Created attachment 7617 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=7617 Bug 6137: unit tests for C4::Circulation::_GetCircControlBranch Signed-off-by: Paul Poulain <paul.poulain@biblibre.com> -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6137 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off --- Comment #11 from Paul Poulain <paul.poulain@biblibre.com> 2012-02-13 12:44:22 UTC --- OK, unit test signed-off, but I've one concern: chris, as this patch check for some syspref, it should be in t/db_dependant, isn't it ? -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6137 --- Comment #12 from Chris Cormack <chris@bigballofwax.co.nz> 2012-02-14 00:52:54 UTC --- Yep, looks like it should be to me. (Note Julian wrote the unit test not me ;)) -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6137 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA --- Comment #13 from Paul Poulain <paul.poulain@biblibre.com> 2012-02-17 17:41:30 UTC --- QA comment, OK, passed QA, will move the test to db_dependant directory when pushing -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6137 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master Version|master |rel_3_6 -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6137 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |RESOLVED Resolution|--- |FIXED --- Comment #14 from Julian Maurice <julian.maurice@biblibre.com> --- patch is in master and 3.6.x branches, marking as resolved -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org