From c13e312743c6c36bf96e1490195e3d7b2e120e0e Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Tue, 23 Jan 2018 16:55:51 +0100 Subject: [PATCH] Bug 14769: Call controlled_biblio_indicators in authority merge Content-Type: text/plain; charset=utf-8 --- C4/AuthoritiesMarc.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/C4/AuthoritiesMarc.pm b/C4/AuthoritiesMarc.pm index 165ef36..d5dff1e 100644 --- a/C4/AuthoritiesMarc.pm +++ b/C4/AuthoritiesMarc.pm @@ -1471,10 +1471,11 @@ sub merge { my $newtag = $tags_new && @$tags_new ? _merge_newtag( $tag, $tags_new ) : $tag; + my $controlled_ind = Koha::Authority->new({ authtypecode => $authtypeto ? $authtypeto->authtypecode : undef })->controlled_biblio_indicators({ record => $MARCto, biblio_tag => $newtag }); #FIXME Replace this tric with new when refactoring my $field_to = MARC::Field->new( $newtag, - $field->indicator(1), - $field->indicator(2), + $controlled_ind->{ind1} // $field->indicator(1), + $controlled_ind->{ind2} // $field->indicator(2), 9 => $mergeto, # Needed to create field, will be moved ); my ( @prefix, @postfix ); -- 2.1.4