Bugzilla – Attachment 194475 Details for
Bug 41690
Add MARC21 245$b (subtitle) to Cite option
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 41690: Add MARC21 245 (subtitle) to Cite option
Bug-41690-Add-MARC21-245-subtitle-to-Cite-option.patch (text/plain), 3.17 KB, created by
Hammat wele
on 2026-03-04 21:24:49 UTC
(
hide
)
Description:
Bug 41690: Add MARC21 245 (subtitle) to Cite option
Filename:
MIME Type:
Creator:
Hammat wele
Created:
2026-03-04 21:24:49 UTC
Size:
3.17 KB
patch
obsolete
>From ba43dae29c4686229a6bd0aa8dc1c51310cc28b5 Mon Sep 17 00:00:00 2001 >From: Hammat Wele <hammat.wele@inlibro.com> >Date: Wed, 4 Mar 2026 21:23:42 +0000 >Subject: [PATCH] Bug 41690: Add MARC21 245 (subtitle) to Cite option > >The "Cite" option in the OPAC is missing the subtitle (245) in MARC21. > >To recreate: >1. Add a record or find a record with a subtitle (in KTD, biblionumber 58 has a 245 http://localhost:8081/cgi-bin/koha/catalogue/MARCdetail.pl?biblionumber=58 >2. In the OPAC, go to the record > http://localhost:8080/cgi-bin/koha/opac-detail.pl?biblionumber=58 >3. Click "Cite" > --> The subtitle is not in any of the citations >4. Apply the patch >5. Repeat step 2 and 3 > --> The subtitle is now shown >--- > C4/Record.pm | 17 +++++++++++------ > 1 file changed, 11 insertions(+), 6 deletions(-) > >diff --git a/C4/Record.pm b/C4/Record.pm >index febb1228ae2..43f354d1117 100644 >--- a/C4/Record.pm >+++ b/C4/Record.pm >@@ -931,6 +931,7 @@ sub marc2cites { > if ( $marcflavour eq "UNIMARC" ) { > %publication = ( > title => $record->subfield( "200", "a" ) || "", >+ subtitle => $record->subfield( "200", "e" ) || "", > place => $record->subfield( "210", "a" ) || "", > publisher => $record->subfield( "210", "c" ) || "", > date => $record->subfield( "210", "d" ) || $record->subfield( "210", "h" ) || "" >@@ -938,6 +939,7 @@ sub marc2cites { > } else { > %publication = ( > title => $record->subfield( "245", "a" ) || "", >+ subtitle => $record->subfield( "245", "b" ) || "", > place => $record->subfield( "264", "a" ) || $record->subfield( "260", "a" ) || "", > publisher => $record->subfield( "264", "b" ) || $record->subfield( "260", "b" ) || "", > date => $record->subfield( "264", "c" ) >@@ -978,13 +980,16 @@ sub marc2cites { > if ( $publication{date} ) { > $cites{'Harvard'} .= ' (' . $publication{'date'} . '). '; > $cites{'Chicago'} .= ' ' . $publication{'date'} . '. '; >- $cites{'MLA'} .= ' ' . $publication{'title'} . '. '; >- $cites{'APA'} .= ' (' . $publication{'date'} . '). '; >+ $cites{'MLA'} .= >+ ' ' . $publication{'title'} . ( $publication{'subtitle'} ? ': ' . $publication{'subtitle'} : '' ) . '. '; >+ $cites{'APA'} .= ' (' . $publication{'date'} . '). '; > } >- $cites{'Harvard'} .= $publication{'title'} . '. '; >- $cites{'Chicago'} .= $publication{'title'} . '. '; >- $cites{'MLA'} .= $publication{'place'} . ': '; >- $cites{'APA'} .= $publication{'title'} . '. '; >+ $cites{'Harvard'} .= >+ $publication{'title'} . ( $publication{'subtitle'} ? ': ' . $publication{'subtitle'} : '' ) . '. '; >+ $cites{'Chicago'} .= >+ $publication{'title'} . ( $publication{'subtitle'} ? ': ' . $publication{'subtitle'} : '' ) . '. '; >+ $cites{'MLA'} .= $publication{'place'} . ': '; >+ $cites{'APA'} .= $publication{'title'} . ( $publication{'subtitle'} ? ': ' . $publication{'subtitle'} : '' ) . '. '; > $cites{'Harvard'} .= $publication{'place'} . ': '; > $cites{'Chicago'} .= $publication{'place'} . ': '; > $cites{'MLA'} .= $publication{'publisher'} . '. '; >-- >2.34.1
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 41690
: 194475 |
194908