[Koha-bugs] [Bug 34639] Item shown in transit on detail.pl even if marked as arrived or cancelled

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Aug 29 12:21:46 CEST 2023


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34639

--- Comment #4 from Lari Taskula <lari.taskula at hypernova.fi> ---
I do not yet understand why but something changed after prefetching
current_branchtransfers. It returns a transfer even if it shouldn't when the
transfer contains a datetime in datearrived or datecancelled.

Koha/Schema/Result/Item.pm
...
__PACKAGE__->has_many(
  "current_branchtransfers",
  "Koha::Schema::Result::Branchtransfer",
  { 'foreign.itemnumber' => 'self.itemnumber' },
  {
      where => { datearrived => undef, datecancelled => undef },
      order_by => [ { -desc => 'datesent' }, { -asc => 'daterequested' } ]
  }
);

current_branchtransfers by itself works fine but together with the prefetch in
detail.pl something gets broken.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list