Bugzilla – Attachment 175647 Details for
Bug 38528
Additional fields are not properly fetched in serial subscription details
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38528: [ALTERNATIVE] Update empty field value logic
Bug-38528-ALTERNATIVE-Update-empty-field-value-log.patch (text/plain), 1.56 KB, created by
Pedro Amorim
on 2024-12-18 13:09:03 UTC
(
hide
)
Description:
Bug 38528: [ALTERNATIVE] Update empty field value logic
Filename:
MIME Type:
Creator:
Pedro Amorim
Created:
2024-12-18 13:09:03 UTC
Size:
1.56 KB
patch
obsolete
>From 84b06293438cf170ff46f7327ad9e55fe30575f6 Mon Sep 17 00:00:00 2001 >From: Pedro Amorim <pedro.amorim@ptfs-europe.com> >Date: Wed, 18 Dec 2024 12:09:27 -0100 >Subject: [PATCH] Bug 38528: [ALTERNATIVE] Update empty field value logic > >prepare_cgi_additional_field_values needs to consider a field value as empty, because a MARC get field will always be submitted empty, and then picked up and handled by set_additional_fields accordingly. >But because we don't want to polute the database with tons of empty additional fields if many empty repeatable fields were submitted in the UI, the check for empty value still happens, but only after the MARC get check has happen, not before. >--- > Koha/Object/Mixin/AdditionalFields.pm | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/Koha/Object/Mixin/AdditionalFields.pm b/Koha/Object/Mixin/AdditionalFields.pm >index b69d461252f..086b45683f0 100644 >--- a/Koha/Object/Mixin/AdditionalFields.pm >+++ b/Koha/Object/Mixin/AdditionalFields.pm >@@ -77,7 +77,7 @@ sub set_additional_fields { > } > } > >- if (defined $value) { >+ if (defined $value && $value ne '') { > my $field_value = Koha::AdditionalFieldValue->new({ > field_id => $additional_field->{id}, > record_id => $self->id, >@@ -113,7 +113,7 @@ sub prepare_cgi_additional_field_values { > push @additional_fields, { > id => $field->id, > value => $value, >- } if defined $value && $value ne ''; >+ } if defined $value; > } > } > >-- >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 38528
:
174978
|
175480
|
175647
|
175689