Bug 42349: Fix filtering items by recalls

On the holdings table the filter by status=recalls is not working correctly.

Test plan:
Add a recall on an item of a bibliographic record that has several
items.
Filter the items table by status=recall
=> Without this patch all items are displayed
=> With this patch applied only the item with a recall is displayed

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Aleisha Amohia <aleisha@catalyst.net.nz>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit b38236830e)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
This commit is contained in:
Jonathan Druart 2026-04-13 16:27:52 +02:00 committed by Baptiste Wojtkowski
parent 134b0a0cd4
commit ba72de2339
No known key found for this signature in database
GPG Key ID: 47A8A13E10BC0D40
1 changed files with 2 additions and 2 deletions

View File

@ -312,9 +312,9 @@ sub filter_by_has_recalls {
$params //= {};
my $recalls = Koha::Recalls->search(
{ %$params, 'me.itemnumber' => [ $self->get_column('itemnumber') ], 'me.item_level' => 1, },
{ %$params, 'me.item_id' => [ $self->get_column('itemnumber') ], 'me.item_level' => 1, },
{
columns => ['itemnumber'],
columns => ['item_id'],
distinct => 1
}
)->_resultset->as_query;