Bugzilla – Attachment 193858 Details for
Bug 41931
While creating EasyAnalytics empty subfields are created
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 41931: While creating EasyAnalitics empty subfields are (often) created.
Bug-41931-While-creating-EasyAnalitics-empty-subfi.patch (text/plain), 2.62 KB, created by
Janusz Kaczmarek
on 2026-02-25 15:21:11 UTC
(
hide
)
Description:
Bug 41931: While creating EasyAnalitics empty subfields are (often) created.
Filename:
MIME Type:
Creator:
Janusz Kaczmarek
Created:
2026-02-25 15:21:11 UTC
Size:
2.62 KB
patch
obsolete
>From e410324b136891e34ffe130430a958c10a471b56 Mon Sep 17 00:00:00 2001 >From: Janusz Kaczmarek <januszop@gmail.com> >Date: Wed, 25 Feb 2026 15:16:27 +0000 >Subject: [PATCH] Bug 41931: While creating EasyAnalitics empty subfields are > (often) created. > >In C4::Biblio::PrepHostMarcField a whole set of subfields is addes to >the field 773 regardless if a respective value exists or not. This >often creates empty subfields and generates warnings. > >Test plan: >========== >1. Set EasyAnalyticalRecords to Show. >2. Go to biblio #1, copy the barcode. >3. Go to biblio #2, chose Edit > Link to host record > enter the > barcode. >4. Examine the biblio #2: a) a new "virtual" item from biblio #1 is > being displayed; b) a 773 field has been inserted, but with empty > subfields $d & $x. >5. There should be warnings in plack-intranet-error.log like: >[WARN] Use of uninitialized value in join or string at /usr/share/perl5/MARC/Field.pm line 696. >6. Apply the patch ; restart_all. >7. Go to biblio #3 (!), chose Edit > Link to host record > enter the > barcode. >8. Examine the biblio #3: a) a new "virtual" item from biblio #1 is > being displayed; b) a 773 field has been inserted, with no empty > subfields. >9. No new warnings. > >Sponsored-by: Ignatianum University in Cracow >--- > C4/Biblio.pm | 20 ++++++++++---------- > 1 file changed, 10 insertions(+), 10 deletions(-) > >diff --git a/C4/Biblio.pm b/C4/Biblio.pm >index 1f1f897e54..f203ca75ab 100644 >--- a/C4/Biblio.pm >+++ b/C4/Biblio.pm >@@ -2049,19 +2049,19 @@ sub PrepHostMarcField { > my $issn = $hostrecord->subfield( '022', 'a' ); > my $isbn = $hostrecord->subfield( '020', 'a' ); > >- $hostmarcfield = MARC::Field->new( >- 773, '0', '', >+ my @subfields = ( > '0' => $hostbiblionumber, > '9' => $hostitemnumber, >- 'a' => $mainentry, >- 'b' => $ed, >- 'd' => $qualinfo, >- 'o' => $barcode, >- 't' => $title, >- 'w' => $recctrlno, >- 'x' => $issn, >- 'z' => $isbn > ); >+ push @subfields, 'a', $mainentry if $mainentry; >+ push @subfields, 'b', $ed if $ed; >+ push @subfields, 'd', $qualinfo if $qualinfo; >+ push @subfields, 'o', $barcode if $barcode; >+ push @subfields, 't', $title if $title; >+ push @subfields, 'w', $recctrlno if $recctrlno; >+ push @subfields, 'x', $issn if $issn; >+ push @subfields, 'z', $isbn if $isbn; >+ $hostmarcfield = MARC::Field->new( 773, '0', ' ', @subfields ); > } elsif ( $marcflavour eq "UNIMARC" ) { > $hostmarcfield = MARC::Field->new( > 461, '', '', >-- >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 41931
:
193858
|
193859
|
193916
|
193917