[Bug 20972] New: If ISBN has 10 numbers only the first 9 numbers are used
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20972 Bug ID: 20972 Summary: If ISBN has 10 numbers only the first 9 numbers are used Change sponsored?: --- Product: Koha Version: 17.05 Hardware: All OS: All Status: NEW Severity: critical Priority: P5 - low Component: Acquisitions Assignee: koha-bugs@lists.koha-community.org Reporter: johan.larsson@ub.gu.se QA Contact: testopia@bugs.koha-community.org If ISBN has 10 numbers only the first 9 numbers are being added to the Edifact-message (PIA+5+3540556753:IB') The bug is located in Koha/Edifact/Order.pm elsif ( $isbn_field =~ m/(\d{9})[Xx\d]/ ) { $product_id = $1; $product_code = 'IB'; } product_id will only get the first 9 chars in the regular expression because of the placement on the parenthesis. The solution to this is to move the right parenthesis like below: elsif ( $isbn_field =~ m/(\d{9}[Xx\d])/ ) { $product_id = $1; $product_code = 'IB'; } -- 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=20972 --- Comment #1 from Johan Larsson <johan.larsson@ub.gu.se> --- Created attachment 76225 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=76225&action=edit Bug 20972: If ISBN has 10 numbers only the first 9 numbers are used If ISBN has 10 numbers only the first 9 numbers are being added to the Edifact-message (PIA+5+3540556753:IB') This is caused by wrong positioning of capturing parentheses in a regular expression. Sponsored-by: Gothenburg University Library -- 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=20972 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |colin.campbell@ptfs-europe. | |com, | |katrin.fischer@bsz-bw.de -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20972 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |7736 Status|NEW |Needs Signoff Version|17.05 |master CC| |jonathan.druart@bugs.koha-c | |ommunity.org Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7736 [Bug 7736] Edifact QUOTE and ORDER functionality -- 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=20972 Colin Campbell <colin.campbell@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #76225|0 |1 is obsolete| | --- Comment #2 from Colin Campbell <colin.campbell@ptfs-europe.com> --- Created attachment 76281 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=76281&action=edit Signed off patch correcting ISBN extraction Signed off patch -- 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=20972 Colin Campbell <colin.campbell@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- 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=20972 --- Comment #3 from Colin Campbell <colin.campbell@ptfs-europe.com> --- Created attachment 76290 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=76290&action=edit Add a test case for this to Ediorder.t Add a test for this bug and ensure routine is correctly distinguishing 10 character ISBNs from 13 digit EANs -- 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=20972 --- Comment #4 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Thx for the quick sign-off and tests, Colin! -- 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=20972 --- Comment #5 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 76303 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=76303&action=edit Bug 20972: If ISBN has 10 numbers only the first 9 numbers are used If ISBN has 10 numbers only the first 9 numbers are being added to the Edifact-message (PIA+5+3540556753:IB') This is caused by wrong positioning of capturing parentheses in a regular expression. Sponsored-by: Gothenburg University Library Signed-off-by: Colin Campbell <colin.campbell@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- 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=20972 --- Comment #6 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 76304 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=76304&action=edit Bug 20972: Add a testcase for bug 20972 Ensure all 10 characters of ISBN are preserved And that ISBNs and EANs are correctly identidied in the PIA segment Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- 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=20972 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- 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=20972 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #76281|0 |1 is obsolete| | -- 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=20972 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #76290|0 |1 is obsolete| | -- 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=20972 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |nick@bywatersolutions.com --- Comment #7 from Nick Clemens <nick@bywatersolutions.com> --- Awesome work all! Pushed to master for 18.11.x -- 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=20972 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com Status|Pushed to Master |Pushed to Stable --- Comment #8 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Pushed to 18.05.x for 18.05.02 -- 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=20972 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m --- Comment #9 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Pushed to 17.11.x for 17.11.08 Regular expression are a curse, they can be hell or heaven :D -- 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=20972 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Stable |RESOLVED Resolution|--- |FIXED --- Comment #10 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Pushed to 17.05.x for 17.05.14 -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org