Bugzilla – Attachment 175689 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.62 KB, created by
Baptiste Wojtkowski (bwoj)
on 2024-12-19 09:57:47 UTC
(
hide
)
Description:
Bug 38528: [ALTERNATIVE] Update empty field value logic
Filename:
MIME Type:
Creator:
Baptiste Wojtkowski (bwoj)
Created:
2024-12-19 09:57:47 UTC
Size:
1.62 KB
patch
obsolete
>From 0400b60de7bfec4457757860d3a10a23c48f0f6f 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. > >Signed-off-by: Baptiste <baptiste.wojtkowski@biblibre.com> >--- > 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.30.2
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