From 1e727da0446ad3814f8519b86120020af2f4099a 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 Signed-off-by: Brendan Gallagher Signed-off-by: Katrin Fischer Signed-off-by: Martin Renvoize --- C4/Items.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/Items.pm b/C4/Items.pm index 0b80896400..7076674392 100644 --- a/C4/Items.pm +++ b/C4/Items.pm @@ -2492,7 +2492,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.4.GIT