Bugzilla – Attachment 142492 Details for
Bug 31629
Cleanup database needs a flag for removing elastic index entries from background_jobs table
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 31154: Avoid unecessary loop
Bug-31154-Avoid-unecessary-loop.patch (text/plain), 1.53 KB, created by
Frédéric Demians
on 2022-10-24 12:07:33 UTC
(
hide
)
Description:
Bug 31154: Avoid unecessary loop
Filename:
MIME Type:
Creator:
Frédéric Demians
Created:
2022-10-24 12:07:33 UTC
Size:
1.53 KB
patch
obsolete
>From 232c6621547e59bdc7ad9956f5b1368965e82fdc Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 17 Oct 2022 16:00:25 +0200 >Subject: [PATCH] Bug 31154: Avoid unecessary loop > >We don't need to loop over the subfield and enter this block if there is >no record. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> > >https://bugs.koha-community.org/show_bug.cgi?id=31629 >--- > Koha/UI/Form/Builder/Item.pm | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > >diff --git a/Koha/UI/Form/Builder/Item.pm b/Koha/UI/Form/Builder/Item.pm >index 568a00e401..3a478ee05e 100644 >--- a/Koha/UI/Form/Builder/Item.pm >+++ b/Koha/UI/Form/Builder/Item.pm >@@ -152,7 +152,8 @@ sub generate_subfield_form { > && !$value > && $subfield->{kohafield} > && $subfield->{kohafield} eq 'items.itemcallnumber' >- && $pref_itemcallnumber ) >+ && $pref_itemcallnumber >+ && $marc_record ) > { > foreach > my $pref_itemcallnumber_part ( split( /,/, $pref_itemcallnumber ) ) >@@ -162,7 +163,7 @@ sub generate_subfield_form { > my $CNsubfields = > substr( $pref_itemcallnumber_part, 3 ); # Any and all subfields > $CNsubfields = undef if $CNsubfields eq ''; >- my $temp2 = $marc_record ? $marc_record->field($CNtag) : undef; >+ my $temp2 = $marc_record->field($CNtag); > > next unless $temp2; > $value = $temp2->as_string( $CNsubfields, ' ' ); >-- >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 31629
:
141837
|
141850
|
142492
|
142501
|
142502
|
142508
|
142509
|
142510