Bug 14399: Prevent display of double zero notforloan status
On bug 12913 a zero status is added on the inventory form. This prevents
a lot of false warnings for a wrong notforloan status. The zero status
is not included in the default setup. But if you would add one, the
status will display here twice now.
This patch checks if the status already exists.
Test plan:
[1] Add a zero NOTFORLOAN status if it does not yet exist in Authorized
values.
[2] Check that you do not see two "For loan" statuses on inventory form.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This commit is contained in:
parent
24313d2b8a
commit
e162c4d526
|
|
@ -97,7 +97,7 @@ for my $statfield (qw/items.notforloan items.itemlost items.withdrawn items.dama
|
|||
if ( $statfield eq 'items.notforloan') {
|
||||
# Add notforloan == 0 to the list of possible notforloan statuses
|
||||
# The lib value is replaced in the template
|
||||
push @$arr, { authorised_value => 0, id => 'stat0' , lib => 'ignore' };
|
||||
push @$arr, { authorised_value => 0, id => 'stat0' , lib => 'ignore' } if ! grep { $_->{authorised_value} eq '0' } @$arr;
|
||||
@notforloans = map { $_->{'authorised_value'} } @$arr;
|
||||
}
|
||||
$hash->{values} = $arr;
|
||||
|
|
|
|||
Loading…
Reference in New Issue