Bug 14576: Rebase fixes Fix test Rebase code
Signed-off-by: Liz Rea <wizzyrea@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This commit is contained in:
parent
e7c05431f2
commit
62b6d94daa
2 changed files with 7 additions and 8 deletions
|
@ -1428,7 +1428,6 @@ sub AddIssue {
|
||||||
}
|
}
|
||||||
)->store;
|
)->store;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( $item_object->location eq 'CART' && $item_object->permanent_location ne 'CART' ) {
|
if ( $item_object->location eq 'CART' && $item_object->permanent_location ne 'CART' ) {
|
||||||
## Item was moved to cart via UpdateItemLocationOnCheckin, anything issued should be taken off the cart.
|
## Item was moved to cart via UpdateItemLocationOnCheckin, anything issued should be taken off the cart.
|
||||||
CartToShelf( $item_object->itemnumber );
|
CartToShelf( $item_object->itemnumber );
|
||||||
|
@ -1890,19 +1889,19 @@ sub AddReturn {
|
||||||
map { $update_loc_rules->{$_} = $update_loc_rules->{$_}[0] } keys %$update_loc_rules; #We can only move to one location so we flatten the arrays
|
map { $update_loc_rules->{$_} = $update_loc_rules->{$_}[0] } keys %$update_loc_rules; #We can only move to one location so we flatten the arrays
|
||||||
if ($update_loc_rules) {
|
if ($update_loc_rules) {
|
||||||
if (defined $update_loc_rules->{_ALL_}) {
|
if (defined $update_loc_rules->{_ALL_}) {
|
||||||
if ($update_loc_rules->{_ALL_} eq '_PERM_') { $update_loc_rules->{_ALL_} = $item->{permanent_location}; }
|
if ($update_loc_rules->{_ALL_} eq '_PERM_') { $update_loc_rules->{_ALL_} = $item->permanent_location; }
|
||||||
if ($update_loc_rules->{_ALL_} eq '_BLANK_') { $update_loc_rules->{_ALL_} = ''; }
|
if ($update_loc_rules->{_ALL_} eq '_BLANK_') { $update_loc_rules->{_ALL_} = ''; }
|
||||||
if ( $item->{location} ne $update_loc_rules->{_ALL_}) {
|
if ( $item->location ne $update_loc_rules->{_ALL_}) {
|
||||||
$messages->{'ItemLocationUpdated'} = { from => $item->{location}, to => $update_loc_rules->{_ALL_} };
|
$messages->{'ItemLocationUpdated'} = { from => $item->location, to => $update_loc_rules->{_ALL_} };
|
||||||
ModItem( { location => $update_loc_rules->{_ALL_} }, undef, $itemnumber );
|
ModItem( { location => $update_loc_rules->{_ALL_} }, undef, $itemnumber );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
foreach my $key ( keys %$update_loc_rules ) {
|
foreach my $key ( keys %$update_loc_rules ) {
|
||||||
if ( $update_loc_rules->{$key} eq '_PERM_' ) { $update_loc_rules->{$key} = $item->{permanent_location}; }
|
if ( $update_loc_rules->{$key} eq '_PERM_' ) { $update_loc_rules->{$key} = $item->permanent_location; }
|
||||||
if ( $update_loc_rules->{$key} eq '_BLANK_') { $update_loc_rules->{$key} = '' ;}
|
if ( $update_loc_rules->{$key} eq '_BLANK_') { $update_loc_rules->{$key} = '' ;}
|
||||||
if ( ($item->{location} eq $key && $item->{location} ne $update_loc_rules->{$key}) || ($key eq '_BLANK_' && $item->{location} eq '' && $update_loc_rules->{$key} ne '') ) {
|
if ( ($item->location eq $key && $item->location ne $update_loc_rules->{$key}) || ($key eq '_BLANK_' && $item->location eq '' && $update_loc_rules->{$key} ne '') ) {
|
||||||
$messages->{'ItemLocationUpdated'} = { from => $item->{location}, to => $update_loc_rules->{$key} };
|
$messages->{'ItemLocationUpdated'} = { from => $item->location, to => $update_loc_rules->{$key} };
|
||||||
ModItem( { location => $update_loc_rules->{$key} }, undef, $itemnumber );
|
ModItem( { location => $update_loc_rules->{$key} }, undef, $itemnumber );
|
||||||
last;
|
last;
|
||||||
}
|
}
|
||||||
|
|
|
@ -418,7 +418,7 @@ $item2 = Koha::Items->find( $itemnumber2 );
|
||||||
ok( $item2->location eq 'PROC' , q{UpdateItemLocationOnCheckin updates location value from '' to 'PROC' with setting "_BLANK_: PROC"} );
|
ok( $item2->location eq 'PROC' , q{UpdateItemLocationOnCheckin updates location value from '' to 'PROC' with setting "_BLANK_: PROC"} );
|
||||||
ok( $item2->permanent_location eq '' , q{UpdateItemLocationOnCheckin does not update permanent_location value from '' to 'PROC' with setting "_BLANK_: PROC"} );
|
ok( $item2->permanent_location eq '' , q{UpdateItemLocationOnCheckin does not update permanent_location value from '' to 'PROC' with setting "_BLANK_: PROC"} );
|
||||||
AddReturn( 'barcode_4', $branchcode_1 );
|
AddReturn( 'barcode_4', $branchcode_1 );
|
||||||
$item2 = Koha::Items( $itemnumber2 );
|
$item2 = Koha::Items->find( $itemnumber2 );
|
||||||
ok( $item2->location eq '' , q{UpdateItemLocationOnCheckin updates location value from 'PROC' to '' with setting "PROC: _PERM_" } );
|
ok( $item2->location eq '' , q{UpdateItemLocationOnCheckin updates location value from 'PROC' to '' with setting "PROC: _PERM_" } );
|
||||||
ok( $item2->permanent_location eq '' , q{UpdateItemLocationOnCheckin does not update permanent_location from '' with setting "PROC: _PERM_" } );
|
ok( $item2->permanent_location eq '' , q{UpdateItemLocationOnCheckin does not update permanent_location from '' with setting "PROC: _PERM_" } );
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue