Bugzilla – Attachment 177127 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: (QA follow-up) Add tests for set_additional_fields with marcfield_mode = 'get'
Bug-38528-QA-follow-up-Add-tests-for-setadditional.patch (text/plain), 2.02 KB, created by
Pedro Amorim
on 2025-01-24 16:00:47 UTC
(
hide
)
Description:
Bug 38528: (QA follow-up) Add tests for set_additional_fields with marcfield_mode = 'get'
Filename:
MIME Type:
Creator:
Pedro Amorim
Created:
2025-01-24 16:00:47 UTC
Size:
2.02 KB
patch
obsolete
>From 118a002a34ab92d979802c8d057e3827da47a01c Mon Sep 17 00:00:00 2001 >From: Pedro Amorim <pedro.amorim@ptfs-europe.com> >Date: Fri, 24 Jan 2025 15:58:43 +0000 >Subject: [PATCH] Bug 38528: (QA follow-up) Add tests for set_additional_fields > with marcfield_mode = 'get' > >Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> >--- > .../Koha/Object/Mixin/AdditionalFields.t | 26 ++++++++++++++++++- > 1 file changed, 25 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Koha/Object/Mixin/AdditionalFields.t b/t/db_dependent/Koha/Object/Mixin/AdditionalFields.t >index 8026032307c..c969c42599f 100755 >--- a/t/db_dependent/Koha/Object/Mixin/AdditionalFields.t >+++ b/t/db_dependent/Koha/Object/Mixin/AdditionalFields.t >@@ -16,7 +16,7 @@ my $builder = t::lib::TestBuilder->new; > my $schema = Koha::Database->schema; > > subtest 'set_additional_fields with marcfield_mode = "get"' => sub { >- plan tests => 1; >+ plan tests => 2; > > $schema->txn_begin; > >@@ -53,6 +53,30 @@ subtest 'set_additional_fields with marcfield_mode = "get"' => sub { > > is($values->[0]->value, 'some value', 'value was copied from the biblio record to the field'); > >+ $field->delete; >+ my $get_marcfield_field = Koha::AdditionalField->new( >+ { >+ tablename => 'subscription', >+ name => random_string( 'c' x 100 ), >+ marcfield => '998$Z', >+ marcfield_mode => 'get', >+ } >+ ); >+ $get_marcfield_field->store()->discard_changes(); >+ my $q = CGI->new; >+ $q->param( >+ -name => 'additional_field_' . $get_marcfield_field->id, >+ -value => '', >+ ); >+ >+ my @additional_fields = >+ Koha::Object::Mixin::AdditionalFields->prepare_cgi_additional_field_values( $q, 'subscription' ); >+ $subscription->set_additional_fields( \@additional_fields ); >+ >+ $values = $subscription->additional_field_values()->as_list(); >+ >+ is( $values->[0]->value, 'some value', 'value was copied from the biblio record to the field' ); >+ > $schema->txn_rollback; > }; > >-- >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
|
177064
|
177125
|
177126
|
177127
|
177168
|
177169
|
177170