Bugzilla – Attachment 119413 Details for
Bug 27774
Always remove hyphens from ISBN when cataloging
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27774: Always remove hyphens from ISBN when cataloging
Bug-27774-Always-remove-hyphens-from-ISBN-when-cat.patch (text/plain), 1.42 KB, created by
Kyle M Hall (khall)
on 2021-04-09 16:10:12 UTC
(
hide
)
Description:
Bug 27774: Always remove hyphens from ISBN when cataloging
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2021-04-09 16:10:12 UTC
Size:
1.42 KB
patch
obsolete
>From 213db88383a1fb52d854412f9a5d2f11c3fe1ba3 Mon Sep 17 00:00:00 2001 >From: Fridolin Somers <fridolin.somers@biblibre.com> >Date: Wed, 24 Feb 2021 16:31:07 +0100 >Subject: [PATCH] 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> >--- > C4/Biblio.pm | 3 +++ > 1 file changed, 3 insertions(+) > >diff --git a/C4/Biblio.pm b/C4/Biblio.pm >index f6c89f92e8..2390ce00b5 100644 >--- a/C4/Biblio.pm >+++ b/C4/Biblio.pm >@@ -2429,6 +2429,9 @@ sub TransformMarcToKohaOneField { > if( $kohafield =~ /copyrightdate|publicationyear/ ) { > $retval = _adjust_pubyear( $retval ); > } >+ if( $kohafield =~ /isbn/ ) { >+ $retval =~ s/-//g; # Remove hyphens >+ } > > return $retval; > } >-- >2.24.3 (Apple Git-128)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 27774
:
117277
|
117329
| 119413 |
119414
|
119452