@@ -, +, @@ What happens when location is undefined? It is autovivified to empty string in the string compare (ne), so not equal to CART and PROC. The subcondition is true before and after this patch. --- Koha/Item.pm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) --- a/Koha/Item.pm +++ a/Koha/Item.pm @@ -179,8 +179,7 @@ sub store { if ( exists $updated_columns{location} - and $self->location ne 'CART' - and $self->location ne 'PROC' + and ( !defined($self->location) or $self->location !~ /^(CART|PROC)$/ ) and not exists $updated_columns{permanent_location} ) { $self->permanent_location( $self->location ); --