Bug 26083: Item editor defaults to lost
authorKyle M Hall <kyle@bywatersolutions.com>
Wed, 29 Jul 2020 17:03:57 +0000 (13:03 -0400)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 30 Jul 2020 15:44:27 +0000 (17:44 +0200)
When editing an item via additem.pl, koha defaults to the first
available lost status, rather than defaulting to not-lost.

Test Plan:
1) Ensure you do not have a value ClaimReturnedLostValue
2) Edit an existing item that is not lost
3) Note the lost value is set even though it is not lost
4) Apply this patch
5) Edit a different item that is not lost
6) Note the lost value is not set!

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt

index 19ce9aa..0516957 100644 (file)
                         [% IF aval == mv.default %]
                         <option value="[%- aval | html -%]" selected="selected">[%- mv.labels.$aval | html -%]</option>
                         [% ELSE %]
-                            [% IF ite.IS_LOST_AV && aval == Koha.Preference("ClaimReturnedLostValue") %]
+                            [% IF ite.IS_LOST_AV && Koha.Preference("ClaimReturnedLostValue") && aval == Koha.Preference("ClaimReturnedLostValue") %]
                                 <option disabled="disabled" value="[%- aval | html -%]" title="Return claims must be processed from the patron details page">[%- mv.labels.$aval | html -%]</option>
                             [%  ELSE %]
                                 <option value="[%- aval | html -%]">[%- mv.labels.$aval | html -%]</option>