Bug 29981 - AddReturn does not set CART when items.location is NULL
Summary: AddReturn does not set CART when items.location is NULL
Status: CLOSED DUPLICATE of bug 28472
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: Main
Hardware: All All
: P5 - low major
Assignee: Marcel de Rooy
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-01-31 07:36 UTC by Marcel de Rooy
Modified: 2022-01-31 08:12 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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 ***