Bug 13192

Summary: Hard-coded value (ISBN Prefix '978') in cataloguing::value_builder::unimarc_field_010
Product: Koha Reporter: Tiburce Euphrasie <tiburce.euphrasie>
Component: MARC Bibliographic data supportAssignee: Galen Charlton <gmcharlt>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: trivial    
Priority: P5 - low CC: fred.pierre, fridolin.somers, julian.maurice, katrin.fischer, marjorie.barry-vila
Version: unspecified   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21821
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:

Description Tiburce Euphrasie 2014-11-03 18:45:13 UTC
Aloha,
Frédéric Demians suggests me to open a new bug report for this case (please read http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13167 for more information):

...I think I've also detected a small problem in cataloguing::value_builder::unimarc_field_010 :
[...] Line 94 to 96 :
    if (length ($isbn) == 13){
        $isbn = substr($isbn, 3, length($isbn)-3);
    }
[...] Then, line 143 :
        $sth->execute($seg2, "978$seg2");

This "978" on line 143 is hard-coded and there's no relation with the original data inside $isbn (lost on line 95 via the substr function). I don't know if this is a real problem but it might be better to keep the original data than replacing it with "978".

Thanks to Frédéric Demians for resolving bug 13167.
Aloha.
Comment 1 Fred P 2017-03-28 17:45:24 UTC
In the United States, ISBN's starting with 979 are not yet introduced, however material in France, Europe and other countries are already rolling out 979 ISBN's. Sadly, they do not play well with Koha scripts. Let's hope we can find a solution before these codes become more prevalent.
Comment 2 Katrin Fischer 2019-02-10 10:38:14 UTC
This is still valid. I am not sure how the plugin works as there is no documentation in the code - checking ISBN validity?

I wonder why it is not using Business::ISBN?

Adding some UNIMARC people to see if this plugin is still used and should be fixed. The original developer was Nahuel who is no longer working on Koha.