[Koha-bugs] [Bug 20972] New: If ISBN has 10 numbers only the first 9 numbers are used
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Thu Jun 21 10:44:32 CEST 2018
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 at lists.koha-community.org
Reporter: johan.larsson at ub.gu.se
QA Contact: testopia at 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.
More information about the Koha-bugs
mailing list