Bugzilla – Attachment 172811 Details for
Bug 35570
Add a generic master form in ILL
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35570: (QA follow-up): Update UNIMARC author to 200$f
Bug-35570-QA-follow-up-Update-UNIMARC-author-to-20.patch (text/plain), 2.51 KB, created by
Pedro Amorim
on 2024-10-16 10:48:11 UTC
(
hide
)
Description:
Bug 35570: (QA follow-up): Update UNIMARC author to 200$f
Filename:
MIME Type:
Creator:
Pedro Amorim
Created:
2024-10-16 10:48:11 UTC
Size:
2.51 KB
patch
obsolete
>From c359d7a20a345bc4bf351e70860b89cfb0928495 Mon Sep 17 00:00:00 2001 >From: Pedro Amorim <pedro.amorim@ptfs-europe.com> >Date: Wed, 16 Oct 2024 10:45:51 +0000 >Subject: [PATCH] Bug 35570: (QA follow-up): Update UNIMARC author to 200$f > >Reworked the logic here a bit to ensure the following scenario for UNIMARC: >If both title and author exist, the result is: >200$aTitle$fAuthor > >In the previous logic, it would become: >200$aTitle >200$fAuthor > >I'm assuming the desired result is the former and not the latter. >Test following the same test plan, but try having only author, or only title, and verify that the resulted MARC data is as expected. >--- > Koha/ILL/Backend/Standard.pm | 31 +++++++++++-------------------- > 1 file changed, 11 insertions(+), 20 deletions(-) > >diff --git a/Koha/ILL/Backend/Standard.pm b/Koha/ILL/Backend/Standard.pm >index f64908adff9..98e9cf463ab 100644 >--- a/Koha/ILL/Backend/Standard.pm >+++ b/Koha/ILL/Backend/Standard.pm >@@ -1176,26 +1176,17 @@ sub _standard_request2biblio { > ($record) = MarcToUTF8Record( $record, $marcflavour ); > } > >- if ($isbn) { >- my $marc_isbn = >- $marcflavour eq 'MARC21' >- ? MARC::Field->new( '020', '', '', a => $isbn ) >- : MARC::Field->new( '010', '', '', a => $isbn ); >- $record->append_fields($marc_isbn); >- } >- if ($author) { >- my $marc_author = >- $marcflavour eq 'MARC21' >- ? MARC::Field->new( '100', '1', '', a => $author ) >- : MARC::Field->new( '700', '1', '', a => $author ); >- $record->append_fields($marc_author); >- } >- if ($title) { >- my $marc_title = >- $marcflavour eq 'MARC21' >- ? MARC::Field->new( '245', '0', '0', a => $title ) >- : MARC::Field->new( '200', '0', '0', a => $title ); >- $record->append_fields($marc_title); >+ my $marc_isbn; >+ my $marc_author; >+ my $marc_title; >+ >+ if( $marcflavour eq 'MARC21' ) { >+ $record->append_fields(MARC::Field->new( '020', '', '', a => $isbn )) if $isbn; >+ $record->append_fields(MARC::Field->new( '100', '1', '', a => $author )) if $author; >+ $record->append_fields(MARC::Field->new( '245', '0', '0', a => $title )) if $title; >+ }elsif( $marcflavour eq 'UNIMARC' ) { >+ $record->append_fields(MARC::Field->new( '010', '', '', a => $isbn )) if $isbn; >+ $record->append_fields(MARC::Field->new( '200', '', '', $title ? ( 'a' => $title ) : undef, $author ? ( 'f' => $author ) : undef)) if $author || $title; > } > > # Suppress the record >-- >2.39.5
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 35570
:
159942
|
159943
|
159944
|
159946
|
159947
|
160452
|
160457
|
160654
|
160655
|
160656
|
160657
|
160658
|
160659
|
160660
|
160686
|
161519
|
161520
|
161521
|
161522
|
161523
|
161524
|
162894
|
162897
|
162898
|
162899
|
162900
|
162901
|
162902
|
162903
|
162904
|
162905
|
164277
|
164278
|
164279
|
164280
|
164281
|
164282
|
164283
|
164284
|
165204
|
165205
|
165206
|
165207
|
165208
|
165209
|
165210
|
165211
|
165286
|
165287
|
165288
|
165289
|
165290
|
165291
|
165292
|
165293
|
167050
|
167051
|
171312
|
171313
|
171314
|
171315
|
171316
|
171317
|
171318
|
171319
|
171320
|
171321
|
171322
|
171323
|
172218
|
172219
|
172722
|
172723
|
172724
|
172725
|
172726
|
172727
|
172728
|
172729
|
172730
|
172731
|
172732
|
172733
|
172734
|
172735
|
172740
|
172741
|
172742
|
172743
|
172744
|
172745
|
172746
|
172747
|
172748
|
172749
|
172750
|
172751
|
172752
|
172753
|
172780
|
172809
| 172811 |
173916
|
173917
|
173918