From 30ace9e74c585f71e813a82a8bc2ea1f9d8b04b9 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Mon, 30 Dec 2019 08:04:29 -0500 Subject: [PATCH] Bug 24279 - Claims Returned does not work when set from additem.pl Test Plan: 1) Configure Claimes Returned 2) Apply this patch 3) Go to additem.pl for that item 4) Note the claims returned lost status does not show in the lost status pulldown Signed-off-by: Katrin Fischer --- cataloguing/additem.pl | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/cataloguing/additem.pl b/cataloguing/additem.pl index 2c371def28..514f24ce86 100755 --- a/cataloguing/additem.pl +++ b/cataloguing/additem.pl @@ -174,7 +174,17 @@ sub generate_subfield_form { my @authorised_values; my %authorised_lib; # builds list, depending on authorised value... - if ( $subfieldlib->{authorised_value} eq "branches" ) { + if ( $subfieldlib->{authorised_value} eq "LOST" ) { + my $ClaimReturnedLostValue = C4::Context->preference('ClaimReturnedLostValue'); + push @authorised_values, qq{}; + my $av = GetAuthorisedValues( $subfieldlib->{authorised_value} ); + for my $r ( @$av ) { + next if $ClaimReturnedLostValue && $r->{authorised_value} eq $ClaimReturnedLostValue; + push @authorised_values, $r->{authorised_value}; + $authorised_lib{$r->{authorised_value}} = $r->{lib}; + } + } + elsif ( $subfieldlib->{authorised_value} eq "branches" ) { foreach my $thisbranch (@$branches) { push @authorised_values, $thisbranch->{branchcode}; $authorised_lib{$thisbranch->{branchcode}} = $thisbranch->{branchname}; -- 2.17.1