Bugzilla – Attachment 175480 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: Additional fields are not properly fetched in serial subscription details
Bug-38528-Additional-fields-are-not-properly-fetch.patch (text/plain), 2.23 KB, created by
PTFS Europe Sandboxes
on 2024-12-15 18:51:17 UTC
(
hide
)
Description:
Bug 38528: Additional fields are not properly fetched in serial subscription details
Filename:
MIME Type:
Creator:
PTFS Europe Sandboxes
Created:
2024-12-15 18:51:17 UTC
Size:
2.23 KB
patch
obsolete
>From a63fda7dcac1b4202602fe42820b465232024614 Mon Sep 17 00:00:00 2001 >From: Baptiste <baptiste.wojtkowski@biblibre.com> >Date: Mon, 25 Nov 2024 17:00:53 +0100 >Subject: [PATCH] Bug 38528: Additional fields are not properly fetched in > serial subscription details > >TEST PLAN: >1 - Create a subscription >2 - Add an additional value: >Name: TEST >Authorised value: None >Repeatable: Not checked >Marc field: 245$a for MARC21, 200$a for UNIMARC >MARC field mode: get value from marc record >Searchable: Not checked >3 - Go on subscription details -> it is not displayed. >4 - Try and edit the subscription, go to page 2 -> value is not displayed >5 - Save -> value is not displayed >6 - Apply patch >On steps 3, 4, and 5, you can now see the title > >Signed-off-by: Mathieu Saby <mathsabypro@gmail.com> >--- > Koha/Object/Mixin/AdditionalFields.pm | 24 ++++++++++++++++++++++++ > 1 file changed, 24 insertions(+) > >diff --git a/Koha/Object/Mixin/AdditionalFields.pm b/Koha/Object/Mixin/AdditionalFields.pm >index b69d461252..1ddd9b92b8 100644 >--- a/Koha/Object/Mixin/AdditionalFields.pm >+++ b/Koha/Object/Mixin/AdditionalFields.pm >@@ -192,6 +192,7 @@ the field values 'value' for that field. Example where field_id = 2 is the only > sub get_additional_field_values_for_template { > my ($self) = @_; > >+ $self->_update_marc_get_fields(); > my $additional_field_ids = $self->additional_field_values->search( > {}, > { >@@ -210,6 +211,29 @@ sub get_additional_field_values_for_template { > return \%fields; > } > >+=head3 _update_marc_get_fields >+ >+Update additional field in db according to their marc value >+ >+ $self->_update_marc_get_fields() >+ >+=cut >+ >+sub _update_marc_get_fields { >+ my ($self) = @_; >+ my $tablename = $self->_result->table; >+ my @additional_fields = Koha::AdditionalFields->search( >+ { >+ tablename => $tablename, >+ marcfield_mode => 'get', >+ -not => { marcfield => undef }, >+ -not => { marcfield => '' } >+ } >+ )->get_column('id'); >+ my @additional_get_fields = map { { id => $_ } } @additional_fields; >+ $self->set_additional_fields( \@additional_get_fields ); >+} >+ > =head3 additional_field_values > > Returns additional field values >-- >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