Summary: | Remove hyphens from EAN when adding a new record | ||
---|---|---|---|
Product: | Koha | Reporter: | Emmi Takkinen <emmi.takkinen> |
Component: | Cataloging | Assignee: | Emmi Takkinen <emmi.takkinen> |
Status: | Failed QA --- | QA Contact: | Testopia <testopia> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | e.betemps, m.de.rooy, magnus |
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6590 | ||
GIT URL: | Change sponsored?: | --- | |
Patch complexity: | Small patch | Documentation contact: | |
Documentation submission: | Text to go in the release notes: | ||
Version(s) released in: | Circulation function: | ||
Attachments: |
Bug 28584: Remove hyphens from EAN when adding new record
Bug 28584: Remove hyphens from EAN when adding new record Bug 28584: Remove hyphens from EAN when adding new record |
Description
Emmi Takkinen
2021-06-17 11:20:33 UTC
Created attachment 122059 [details] [review] Bug 28584: Remove hyphens from EAN when adding new record Add functionality to TransformMarcToKoha so that hyphens are removed from biblioitem tables "ean" column but EAN value in MARC record is not touched. To test: 1. Apply patch. 2. Create new record with EAN field(s) having hyphen(s) e.g. 74628-8972 3. Check records MARC details => EAN has hyphen 4. Check record from biblioitem table in database => EAN doesn't have hyphen(s) Prove t/db_dependent/Biblio/TransfornMarcToKoha.t Sponsored-by: Koha-Suomi Oy But see the discussion on bug 6590. The conclusion there was to not remove the hyphens, I think. (In reply to Magnus Enger from comment #2) > But see the discussion on bug 6590. The conclusion there was to not remove > the hyphens, I think. I understood it only applied to ISBN and ISSN. Also from that bug comment 15 says: > In UNIMARC, ISBN field is supposed to contain ISBN as written on the > book cover. ISBN without hyphens can be stored in EAN (073) field. Created attachment 130159 [details] [review] Bug 28584: Remove hyphens from EAN when adding new record Add functionality to TransformMarcToKoha so that hyphens are removed from biblioitem tables "ean" column but EAN value in MARC record is not touched. To test: 1. Apply patch. 2. Create new record with EAN field(s) having hyphen(s) e.g. 74628-8972 3. Check records MARC details => EAN has hyphen 4. Check record from biblioitem table in database => EAN doesn't have hyphen(s) Prove t/db_dependent/Biblio/TransfornMarcToKoha.t Sponsored-by: Koha-Suomi Oy Signed-off-by: Emmanuel Bétemps <e.betemps@gmail.com> I'm sorry but I tested once again today and it doesn't work. The first test I did was on February the 4th, at noon. - when I ran the sandbox, Kyle M Hall's comment wasn't here - when I signed-off, I saw his comment I don't know what patch I used for my first test. (In reply to e.betemps from comment #5) > I'm sorry but I tested once again today and it doesn't work. Could you describe in more detail how this doesn't work? Tested this on my test environment, hyphens are removed from biblioitems but not from MARC and test pass. So in my end, everything works as expected. > The first test I did was on February the 4th, at noon. > - when I ran the sandbox, Kyle M Hall's comment wasn't here > - when I signed-off, I saw his comment > > I don't know what patch I used for my first test. You probably used first patch provided here (id 122059, one without sign-off), but it seems Kyle somehow hijacked your sign-off :D I'm unsure how sandbox testing works, so no idea how this is possible. I followed the test plan : create a notice with values (with hyphen) in 073a I see the hyphen in the Mark preview (it's ok) but I also see it in my report (which displays the column 'ean' of the table 'biblioitems') Created attachment 130670 [details] [review] Bug 28584: Remove hyphens from EAN when adding new record Add functionality to TransformMarcToKoha so that hyphens are removed from biblioitem tables "ean" column but EAN value in MARC record is not touched. To test: 1. Apply patch. 2. Create new record with EAN field(s) having hyphen(s) e.g. 74628-8972 3. Check records MARC details => EAN has hyphen 4. Check record from biblioitem table in database => EAN doesn't have hyphen(s) Prove t/db_dependent/Biblio/TransfornMarcToKoha.t Sponsored-by: Koha-Suomi Oy Signed-off-by: Emmanuel Bétemps <e.betemps@gmail.com> Signed-off-by: Owen Leonard <oleonard@myacpl.org> I had to update Koha to MARC mapping because I didn't have biblioitems.ean mapped to anything. After setting it to 024$a and running batchRebuildBiblioTables.pl it worked as per the test plan. Hi Emmi, you said you use the EAN for matching so I wonder if removing the hyphen from the database column, but not from the MARC record will work? Could you explain your use case a little more? Right now this patch makes me a little uneasy as I feel like the information in the database and in the MARC record should match and this is an automatism that the library won't be able to control. In MARC21 024 is used to store EAN, but also a lot of other identifiers depending on indicator and $2: 024 - Other Standard Identifier (R) https://www.loc.gov/marc/bibliographic/bd024.html 0 - International Standard Recording Code 1 - Universal Product Code 2 - International Standard Music Number 3 - International Article Number 4 - Serial Item and Contribution Identifier 7 - Source specified in subfield $2 Source of the number or code is specified in subfield $2 (Source of number or code). 8 - Unspecified type of standard number or code So by doing this silently, we'll also be doing it for all of those numbers, some of which we can't tell what they might be ($2) |