Bug 27774 - Always remove hyphens from ISBN when cataloging
Summary: Always remove hyphens from ISBN when cataloging
Status: RESOLVED DUPLICATE of bug 6590
Alias: None
Product: Koha
Classification: Unclassified
Component: Cataloging (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor
Assignee: Fridolin Somers
QA Contact: Kyle M Hall (khall)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-02-24 15:28 UTC by Fridolin Somers
Modified: 2021-06-03 21:14 UTC (History)
4 users (show)

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


Attachments
Bug 27774: Always remove hyphens from ISBN when cataloging (1.30 KB, patch)
2021-02-24 15:49 UTC, Fridolin Somers
Details | Diff | Splinter Review
Bug 27774: Always remove hyphens from ISBN when cataloging (1.35 KB, patch)
2021-02-25 14:31 UTC, Frank Hansen
Details | Diff | Splinter Review
Bug 27774: Always remove hyphens from ISBN when cataloging (1.42 KB, patch)
2021-04-09 16:10 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
Bug 27774: Add unit test (2.35 KB, patch)
2021-04-09 16:10 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
Bug 27774: Add unit test (2.38 KB, patch)
2021-04-12 11:52 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Fridolin Somers 2021-02-24 15:28:44 UTC
Actually hyphens are removed from ISBN when using acquisition or z3950 cataloguing or with bulkmarcimport.
I propose to add this behavior in TransformMarcToKoha() so MARC data is unchanged, but biblioitems.isbn is without hyphens. This can be used if search using SQL and in reports.
Comment 1 Fridolin Somers 2021-02-24 15:29:35 UTC
Sort of a renew of Bug 6590
Comment 2 Fridolin Somers 2021-02-24 15:49:36 UTC
Created attachment 117277 [details] [review]
Bug 27774: Always remove hyphens from ISBN when cataloging

Actually hyphens are removed from ISBN when using acquisition or z3950 cataloguing or with bulkmarcimport.
I propose to add this behavior in TransformMarcToKoha() so MARC data is unchanged, but biblioitems.isbn is without hyphens. This can be used if search using SQL and in reports.

We may after this remove other codes that remove hyphens before
cataloguing a biblio record.

Test plan :
1) Create a new record with an ISBN with hyphen, ie 978-0008376109
2) Save
3) Export to MARCXML and see ISBN has hyphen
4) Look into database : select isbn from biblioitems where
   bilionumber=xxx
5) Check you see ISBN without hyphen
Comment 3 Frank Hansen 2021-02-25 14:31:04 UTC
Created attachment 117329 [details] [review]
Bug 27774: Always remove hyphens from ISBN when cataloging

Actually hyphens are removed from ISBN when using acquisition or z3950 cataloguing or with bulkmarcimport.
I propose to add this behavior in TransformMarcToKoha() so MARC data is unchanged, but biblioitems.isbn is without hyphens. This can be used if search using SQL and in reports.

We may after this remove other codes that remove hyphens before
cataloguing a biblio record.

Test plan :
1) Create a new record with an ISBN with hyphen, ie 978-0008376109
2) Save
3) Export to MARCXML and see ISBN has hyphen
4) Look into database : select isbn from biblioitems where
   bilionumber=xxx
5) Check you see ISBN without hyphen

Signed-off-by: Frank Hansen <frank.hansen@ub.lu.se>
Comment 4 Kyle M Hall (khall) 2021-04-09 16:10:12 UTC
Created attachment 119413 [details] [review]
Bug 27774: Always remove hyphens from ISBN when cataloging

Actually hyphens are removed from ISBN when using acquisition or z3950 cataloguing or with bulkmarcimport.
I propose to add this behavior in TransformMarcToKoha() so MARC data is unchanged, but biblioitems.isbn is without hyphens. This can be used if search using SQL and in reports.

We may after this remove other codes that remove hyphens before
cataloguing a biblio record.

Test plan :
1) Create a new record with an ISBN with hyphen, ie 978-0008376109
2) Save
3) Export to MARCXML and see ISBN has hyphen
4) Look into database : select isbn from biblioitems where
   bilionumber=xxx
5) Check you see ISBN without hyphen

Signed-off-by: Frank Hansen <frank.hansen@ub.lu.se>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 5 Kyle M Hall (khall) 2021-04-09 16:10:24 UTC
Created attachment 119414 [details] [review]
Bug 27774: Add unit test

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 6 Jonathan Druart 2021-04-12 11:52:42 UTC
Created attachment 119452 [details] [review]
Bug 27774: Add unit test

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

JD amended patch: s/all three mappings/all mappings/
Comment 7 Jonathan Druart 2021-04-12 12:44:30 UTC
From bug 6590 it seems that people didn't agree on removing hyphens for ISBNs

Bug 6590 comment 15:
> 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.

Why did you open a separate bug report?
Comment 8 Fridolin Somers 2021-04-12 12:54:32 UTC
Piouf I don't remember.
I'm OK if this one is closed as duplicate.
Comment 9 Katrin Fischer 2021-06-03 21:14:58 UTC

*** This bug has been marked as a duplicate of bug 6590 ***