From ddc2bd95b0ec6292f4e28461e1d881e81fb6d275 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 30 Apr 2019 13:54:37 -0400 Subject: [PATCH] Bug 22667: Pick default value from framework for cn_source If the cn_source has a default value defined in the framework it will not be used when ordering or receiving serials. Test plan: Set the pref DefaultClassificationSource to Library of congress Define a default value=ddc (for Dewey) for the ACQ and default framework Receive an order (AcqCreateItem=on ordering) and confirm that Dewey is selected by default (the default value from the ACQ framework is used) Receive a serial and confirm that Dewey is selected by default --- C4/Items.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/Items.pm b/C4/Items.pm index 0f5648c215..f01416ee8f 100644 --- a/C4/Items.pm +++ b/C4/Items.pm @@ -2488,7 +2488,7 @@ sub PrepareItemrecordDisplay { push @authorised_values, "" unless ( $tagslib->{$tag}->{$subfield}->{mandatory} ); my $class_sources = GetClassSources(); - my $default_source = C4::Context->preference("DefaultClassificationSource"); + my $default_source = $defaultvalue || C4::Context->preference("DefaultClassificationSource"); foreach my $class_source (sort keys %$class_sources) { next unless $class_sources->{$class_source}->{'used'} or -- 2.11.0