[Bug 11587] New: IsSuperLibrarian generates warnings
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11587 Bug ID: 11587 Summary: IsSuperLibrarian generates warnings Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: gmcharlt@gmail.com Reporter: mtompset@hotmail.com QA Contact: testopia@bugs.koha-community.org If userenv->{flags} is undefined, the modulus 2 generates floody entries. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11587 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11587 --- Comment #1 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 24587 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=24587&action=edit Bug 11587 - IsSuperLibrarian generates warnings This corrects line 1250 of C4/Context.pm to be: return ($userenv->{flags}//0) % 2; And thus avoids an uninitialized value used in the modulus. TEST PLAN --------- 1) Apply the first patch (to update t/Context.t) 2) prove -v t/Context.t -- This should fail tests 7 and 8 3) Apply this patch (to fix C4/Context.pm) 4) prove -v t/Context.t -- All tests should succeed -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11587 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #24587|0 |1 is obsolete| | --- Comment #2 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 24588 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=24588&action=edit Bug 11587 - IsSuperLibrarian generates warnings Simply viewing OPAC detail triggers a modulus warning entry. This first patch adds two test cases to t/Context.t to test for this situation. TEST PLAN --------- 1) Apply this patch (to upgrade t/Context.t) 2) prove -v t/Context.t -- Tests 7 and 8 will fail 3) Apply second patch (to amend C4/Context.pm) 4) prove -v t/Context.t -- All tests will succeed -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11587 --- Comment #3 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 24589 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=24589&action=edit Bug 11587 - IsSuperLibrarian generates warnings This corrects line 1250 of C4/Context.pm to be: return ($userenv->{flags}//0) % 2; And thus avoids an uninitialized value used in the modulus. TEST PLAN --------- 1) Apply the first patch (to update t/Context.t) 2) prove -v t/Context.t -- This should fail tests 7 and 8 3) Apply this patch (to fix C4/Context.pm) 4) prove -v t/Context.t -- All tests should succeed -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11587 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|gmcharlt@gmail.com |mtompset@hotmail.com -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11587 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|enhancement |trivial --- Comment #4 from M. Tompsett <mtompset@hotmail.com> --- Silly default of enhancement! DOH! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11587 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #24588|0 |1 is obsolete| | --- Comment #5 from Chris Cormack <chris@bigballofwax.co.nz> --- Created attachment 24666 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=24666&action=edit Bug 11587 - IsSuperLibrarian generates warnings Simply viewing OPAC detail triggers a modulus warning entry. This first patch adds two test cases to t/Context.t to test for this situation. TEST PLAN --------- 1) Apply this patch (to upgrade t/Context.t) 2) prove -v t/Context.t -- Tests 7 and 8 will fail 3) Apply second patch (to amend C4/Context.pm) 4) prove -v t/Context.t -- All tests will succeed Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11587 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11587 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #24666|0 |1 is obsolete| | --- Comment #6 from Chris Cormack <chris@bigballofwax.co.nz> --- Created attachment 24667 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=24667&action=edit Bug 11587 - IsSuperLibrarian generates warnings This corrects line 1250 of C4/Context.pm to be: return ($userenv->{flags}//0) % 2; And thus avoids an uninitialized value used in the modulus. TEST PLAN --------- 1) Apply the first patch (to update t/Context.t) 2) prove -v t/Context.t -- This should fail tests 7 and 8 3) Apply this patch (to fix C4/Context.pm) 4) prove -v t/Context.t -- All tests should succeed Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11587 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #24666|1 |0 is obsolete| | CC| |jonathan.druart@biblibre.co | |m -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11587 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #24589|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11587 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11587 --- Comment #7 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 24676 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=24676&action=edit Bug 11587 - IsSuperLibrarian generates warnings (UT) Simply viewing OPAC detail triggers a modulus warning entry. This first patch adds two test cases to t/Context.t to test for this situation. TEST PLAN --------- 1) Apply this patch (to upgrade t/Context.t) 2) prove -v t/Context.t -- Tests 7 and 8 will fail 3) Apply second patch (to amend C4/Context.pm) 4) prove -v t/Context.t -- All tests will succeed Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11587 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #24666|0 |1 is obsolete| | Attachment #24667|0 |1 is obsolete| | --- Comment #8 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 24677 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=24677&action=edit Bug 11587 - IsSuperLibrarian generates warnings This corrects line 1250 of C4/Context.pm to be: return ($userenv->{flags}//0) % 2; And thus avoids an uninitialized value used in the modulus. TEST PLAN --------- 1) Apply the first patch (to update t/Context.t) 2) prove -v t/Context.t -- This should fail tests 7 and 8 3) Apply this patch (to fix C4/Context.pm) 4) prove -v t/Context.t -- All tests should succeed Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11587 --- Comment #9 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 24678 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=24678&action=edit Bug 11587 - Add UT for IsSuperLibrarian if flags == 0 Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11587 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |10277 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11587 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl --- Comment #10 from M. Tompsett <mtompset@hotmail.com> --- *** Bug 11893 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11587 Galen Charlton <gmcharlt@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |gmcharlt@gmail.com --- Comment #11 from Galen Charlton <gmcharlt@gmail.com> --- Pushed to master. Thanks, Mark! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11587 Fridolin SOMERS <fridolyn.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable CC| |fridolyn.somers@biblibre.co | |m --- Comment #12 from Fridolin SOMERS <fridolyn.somers@biblibre.com> --- Pushed to 3.14.x, will be in 3.14.10 I decided in the end to integrate Bug 10277 so also this one. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org