Bugzilla – Attachment 117329 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.35 KB, created by
Frank Hansen
on 2021-02-25 14:31:04 UTC
(
hide
)
Description:
Bug 27774: Always remove hyphens from ISBN when cataloging
Filename:
MIME Type:
Creator:
Frank Hansen
Created:
2021-02-25 14:31:04 UTC
Size:
1.35 KB
patch
obsolete
>From ffe6ba85d729c25264ef950993180c81eb4be66d 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> >--- > C4/Biblio.pm | 3 +++ > 1 file changed, 3 insertions(+) > >diff --git a/C4/Biblio.pm b/C4/Biblio.pm >index e84110cccc..7748ae2f60 100644 >--- a/C4/Biblio.pm >+++ b/C4/Biblio.pm >@@ -2523,6 +2523,9 @@ sub TransformMarcToKohaOneField { > if( $kohafield =~ /copyrightdate|publicationyear/ ) { > $retval = _adjust_pubyear( $retval ); > } >+ if( $kohafield =~ /isbn/ ) { >+ $retval =~ s/-//g; # Remove hyphens >+ } > > return $retval; > } >-- >2.11.0
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