Bug 29981

Summary: AddReturn does not set CART when items.location is NULL
Product: Koha Reporter: Marcel de Rooy <m.de.rooy>
Component: CirculationAssignee: Marcel de Rooy <m.de.rooy>
Status: CLOSED DUPLICATE QA Contact: Testopia <testopia>
Severity: major    
Priority: P5 - low CC: gmcharlt, kyle.m.hall
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:

Description Marcel de Rooy 2022-01-31 07:36:47 UTC
This is a regression somewhere between bug 14576 and current master 21.12.
Probably originating from trying to resolve a warn on the NULL value.
Comment 1 Marcel de Rooy 2022-01-31 07:37:57 UTC
if ( defined $item->location && $item->location ne $update_loc_rules->{_ALL_}) {
  $messages->{'ItemLocationUpdated'} = { from => $item->location, to => $update_loc_rules->{_ALL_} };
  $item->location($update_loc_rules->{_ALL_})->store({skip_record_index=>1});
Comment 2 Marcel de Rooy 2022-01-31 07:50:16 UTC
Hmm. It seems that a correction has been made very recently:

            if (
                ( defined $item->location && $item->location ne $update_loc_rules->{_ALL_}) ||
                (!defined $item->location && $update_loc_rules->{_ALL_} ne "")
Comment 3 Marcel de Rooy 2022-01-31 08:12:16 UTC
Bug 28472 was not that recent after all ;)

*** This bug has been marked as a duplicate of bug 28472 ***