Bug 22294 - EDI wrongly assumes all ISBN13's have corresponding ISBN10's
Summary: EDI wrongly assumes all ISBN13's have corresponding ISBN10's
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Martin Renvoize (ashimema)
QA Contact: Kyle M Hall (khall)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-02-08 10:35 UTC by Martin Renvoize (ashimema)
Modified: 2020-06-04 20:35 UTC (History)
1 user (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
19.11.00
Circulation function:


Attachments
Bug 22294: Check return of as_isbn10 before calling methods on it (825 bytes, patch)
2019-02-08 10:38 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 22294: Check return of as_isbn10 before calling methods on it (889 bytes, patch)
2019-10-04 07:49 UTC, Brendan Gallagher
Details | Diff | Splinter Review
Bug 22294: Check return of as_isbn10 before calling methods on it (961 bytes, patch)
2019-10-04 16:37 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Renvoize (ashimema) 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 (ashimema) 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 (khall) 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 (ashimema) 2019-10-08 13:31:31 UTC
Nice work!

Pushed to master for 19.11.00