Bug 30432: Specify 'me' for biblionumber when limiting items

To test:
1 - Apply only unit tests
2 - prove t/db_dependent/Koha/Holds.t
3 - It fails
4 - Apply this patch
5 - prove t/db_dependent/Koha/Holds.t
6 - It passes!

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
Nick Clemens 2022-04-01 12:48:54 +00:00 committed by Fridolin Somers
parent 5d53081cb8
commit 4531fa5fc9

View file

@ -118,7 +118,7 @@ sub get_items_that_can_fill {
my @biblionumbers = $self->search({ 'me.itemnumber' => undef })->get_column('biblionumber'); my @biblionumbers = $self->search({ 'me.itemnumber' => undef })->get_column('biblionumber');
my @bibs_or_items; my @bibs_or_items;
push @bibs_or_items, 'me.itemnumber' => { in => \@itemnumbers } if @itemnumbers; push @bibs_or_items, 'me.itemnumber' => { in => \@itemnumbers } if @itemnumbers;
push @bibs_or_items, 'biblionumber' => { in => \@biblionumbers } if @biblionumbers; push @bibs_or_items, 'me.biblionumber' => { in => \@biblionumbers } if @biblionumbers;
my @branchtransfers = Koha::Item::Transfers->search( my @branchtransfers = Koha::Item::Transfers->search(
{ datearrived => undef }, { datearrived => undef },