Bug 22294

Summary: EDI wrongly assumes all ISBN13's have corresponding ISBN10's
Product: Koha Reporter: Martin Renvoize <martin.renvoize>
Component: AcquisitionsAssignee: Martin Renvoize <martin.renvoize>
Status: CLOSED FIXED QA Contact: Kyle M Hall <kyle>
Severity: normal    
Priority: P5 - low CC: martin.renvoize
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
19.11.00
Attachments: Bug 22294: Check return of as_isbn10 before calling methods on it
Bug 22294: Check return of as_isbn10 before calling methods on it
Bug 22294: Check return of as_isbn10 before calling methods on it

Description Martin Renvoize 2019-02-08 10:35:46 UTC
One of the fallbacks in the _check_for_existing_bib routine within Koha::EDI attempts to convert a given ISBN13 into it's ISBN10 equivalent and then search for it. However, not all ISBN13's have an ISBN10 equivalent and Business::ISBN returns 'undef' instead of a new Business::ISBN object if you attempt to do this conversion.

This results in uncaught EDI failures and noise in the logs when such an ISBN reaches this point in the code path.
Comment 1 Martin Renvoize 2019-02-08 10:38:54 UTC
Created attachment 84861 [details] [review]
Bug 22294: Check return of as_isbn10 before calling methods on it
Comment 2 Brendan Gallagher 2019-10-04 07:49:00 UTC
Created attachment 93668 [details] [review]
Bug 22294: Check return of as_isbn10 before calling methods on it

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Comment 3 Kyle M Hall 2019-10-04 16:37:53 UTC
Created attachment 93755 [details] [review]
Bug 22294: Check return of as_isbn10 before calling methods on it

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 4 Martin Renvoize 2019-10-08 13:31:31 UTC
Nice work!

Pushed to master for 19.11.00