From 072e7fdce3a64dbfb0432fcbc331c38078c327aa Mon Sep 17 00:00:00 2001 From: Olli-Antti Kivilahti Date: Mon, 16 Feb 2015 17:50:10 +0200 Subject: [PATCH] Bug 13540 - Item's permanent_location is set to CART|PROC when... - Followup 1 To fix the failing test "ReturnToShelvingCart: Adding a new Item with location also sets the permanent_location." When adding an Item, set the permanent_location to location if present. This behaviour is consistent with ModItem where permanent_location is set to location. --- C4/Items.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/C4/Items.pm b/C4/Items.pm index 623b82e..edbc6d5 100644 --- a/C4/Items.pm +++ b/C4/Items.pm @@ -2135,6 +2135,7 @@ sub _set_defaults_for_add { my $item = shift; $item->{dateaccessioned} ||= C4::Dates->new->output('iso'); $item->{$_} ||= 0 for (qw( notforloan damaged itemlost withdrawn)); + $item->{permanent_location} = $item->{location} unless ($item->{permanent_location}); } =head2 _koha_new_item -- 1.7.9.5