Bug 14200

Summary: GetNormalizedISBN failing to normalize valid ISBNs in some cases
Product: Koha Reporter: Kyle M Hall <kyle>
Component: Architecture, internals, and plumbingAssignee: Kyle M Hall <kyle>
Status: CLOSED FIXED QA Contact: Marcel de Rooy <m.de.rooy>
Severity: normal    
Priority: P5 - low CC: m.de.rooy, tomascohen
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Bug 14200 - Unit Tests
Bug 14200 - GetNormalizedISBN failing to normalize valid ISBNs in some cases
[SIGNED-OFF] Bug 14200 - Unit Tests
[SIGNED-OFF] Bug 14200 - GetNormalizedISBN failing to normalize valid ISBNs in some cases
Bug 14200 - Unit Tests
Bug 14200 - GetNormalizedISBN failing to normalize valid ISBNs in some cases

Description Kyle M Hall 2015-05-14 10:19:19 UTC
For some reason the regular expression used to split the multiple ISBN fields can fail which keeps Business::ISBN from being able to parse out and return a valid isbn. Using split() instead of the regex fixes the issue.
Comment 1 Kyle M Hall 2015-05-14 10:21:32 UTC Comment hidden (obsolete)
Comment 2 Kyle M Hall 2015-05-14 10:21:38 UTC Comment hidden (obsolete)
Comment 3 Kyle M Hall 2015-05-14 17:44:12 UTC Comment hidden (obsolete)
Comment 4 Kyle M Hall 2015-05-14 17:44:41 UTC Comment hidden (obsolete)
Comment 5 Marcel de Rooy 2015-05-19 12:41:43 UTC
Created attachment 39296 [details] [review]
Bug 14200 - Unit Tests

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Karen Bryant <kbryant@ccpl-fl.net>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 6 Marcel de Rooy 2015-05-19 12:41:49 UTC
Created attachment 39297 [details] [review]
Bug 14200 - GetNormalizedISBN failing to normalize valid ISBNs in some cases

For some reason the regular expression used to split the multiple ISBN
fields can fail which keeps Business::ISBN from being able to parse out
and return a valid isbn. Using split() instead of the regex fixes the
issue.

Test Plan:
1) Apply the unit test patch first
2) prove t/Koha.t
3) Note the failures
4) Apply the second patch
5) prove t/Koha.t
6) Note all tests pass

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Karen Bryant <kbryant@ccpl-fl.net>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 7 Tomás Cohen Arazi 2015-05-19 12:47:54 UTC
Patches pushed to master.

Good work Kyle!