From 7a14e9d6e477c0c3904df099e11afbf15fdee701 Mon Sep 17 00:00:00 2001 From: xljoha Date: Thu, 21 Jun 2018 09:58:55 +0200 Subject: [PATCH] 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 Signed-off-by: Katrin Fischer Signed-off-by: Nick Clemens Signed-off-by: Martin Renvoize (cherry picked from commit b9bd93e9205d4b8344a77214fefb8efe2c84792e) Signed-off-by: Fridolin Somers --- Koha/Edifact/Order.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Koha/Edifact/Order.pm b/Koha/Edifact/Order.pm index ac63a94a9a..dcab51dede 100644 --- a/Koha/Edifact/Order.pm +++ b/Koha/Edifact/Order.pm @@ -596,7 +596,7 @@ sub additional_product_id { $product_id = $1; $product_code = 'EN'; } - elsif ( $isbn_field =~ m/(\d{9})[Xx\d]/ ) { + elsif ( $isbn_field =~ m/(\d{9}[Xx\d])/ ) { $product_id = $1; $product_code = 'IB'; } -- 2.39.5