[Bug 20348] New: SIP2 patron identification fails to use userid
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20348 Bug ID: 20348 Summary: SIP2 patron identification fails to use userid Change sponsored?: --- Product: Koha Version: 17.11 Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: SIP2 Assignee: koha-bugs@lists.koha-community.org Reporter: jose.i.martin.cuesta@gmail.com QA Contact: testopia@bugs.koha-community.org CC: colin.campbell@ptfs-europe.com The following code in C4/SIP/ILS/Patron.pm: $kp = Koha::Patrons->find( { cardnumber => $patron_id } ) or Koha::Patrons->find( { userid => $patron_id } ); should be (using || instead of or): $kp = Koha::Patrons->find( { cardnumber => $patron_id } ) || Koha::Patrons->find( { userid => $patron_id } ); It will never try to match a patron by userid. This is a bug according to Perl documentation here: https://perldoc.perl.org/perlop.html#Logical-or-and-Exclusive-Or -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20348 Jose Martin <jose.i.martin.cuesta@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20348 Jose Martin <jose.i.martin.cuesta@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |NEW -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20348 Jose Martin <jose.i.martin.cuesta@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|koha-bugs@lists.koha-commun |jose.i.martin.cuesta@gmail. |ity.org |com --- Comment #1 from Jose Martin <jose.i.martin.cuesta@gmail.com> --- Created attachment 72502 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=72502&action=edit Replaces "or" with "||" in variable assignment -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20348 Jose Martin <jose.i.martin.cuesta@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20348 Colin Campbell <colin.campbell@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #72502|0 |1 is obsolete| | --- Comment #2 from Colin Campbell <colin.campbell@ptfs-europe.com> --- Created attachment 72539 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=72539&action=edit Patch with signoff Signed off - added CR to commit message to avoid auto wrapping added a line to clarify what was being fixed -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20348 Colin Campbell <colin.campbell@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off --- Comment #3 from Colin Campbell <colin.campbell@ptfs-europe.com> --- Confirmed that lookup by userid was not being executed and that reverting the or to || does correct that and restores the code to a working lookup. People should beware of prettifying the code by replacing operators with operators that are not equivalent. Specially as in this case when the buggy change is hidden in a large commit which is not explicit about making the change -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20348 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |josef.moravec@gmail.com |y.org | CC| |josef.moravec@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20348 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20348 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #72539|0 |1 is obsolete| | --- Comment #4 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 72556 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=72556&action=edit Bug 20348: SIP2 patron identification fails to use userid Replaces "or" with "||" in variable assignment second attempt to retrieve borrower was not being executed due to changed precedence Signed-off-by: Colin Campbell <colin.campbell@ptfs-europe.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20348 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|17.11 |master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20348 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |1782 CC| |jonathan.druart@bugs.koha-c | |ommunity.org --- Comment #5 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Caused by commit 2b90ea2cb0e5e976de7ddef0151ae83d8ac578e6 Bug 17829: Move GetMember to Koha::Patron Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=1782 [Bug 1782] Patron Types VS Categories -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20348 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on|1782 |17829 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=1782 [Bug 1782] Patron Types VS Categories https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17829 [Bug 17829] Move GetMember to Koha::Patron -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20348 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #6 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Patch pushed to master for 18.05 Thanks Jose for your first patch in! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20348 Magnus Enger <magnus@libriotech.no> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |magnus@libriotech.no --- Comment #7 from Magnus Enger <magnus@libriotech.no> --- Hooray for Jose! This also needs to go into the stable branch, please. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20348 Magnus Enger <magnus@libriotech.no> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kohapatch@gmail.com --- Comment #8 from Magnus Enger <magnus@libriotech.no> --- *** Bug 10372 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20348 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable CC| |nick@bywatersolutions.com --- Comment #9 from Nick Clemens <nick@bywatersolutions.com> --- Awesome work all! Pushed to stable for 17.11.04 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20348 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED CC| |fridolin.somers@biblibre.co | |m Status|Pushed to Stable |RESOLVED --- Comment #10 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Not in 17.05.x since Bug 17829 not in it -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org