[Koha-bugs] [Bug 32472] [21.11] The method Koha::Item->count is not covered by tests

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Dec 15 09:46:50 CET 2022


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

--- Comment #3 from Marcel de Rooy <m.de.rooy at rijksmuseum.nl> ---
> includes/cat-toolbar.inc:                [% ELSIF (
> biblio.subscriptions.count ) %]
This one is fine. return $self->{_subscriptions} (scalar)

> modules/cataloguing/moveitem.tt:            [% IF from_biblio.items.count ==
> 0 && CAN_user_editcatalogue_edit_catalogue %]
It is a scalar too:  my $items_rs = $self->_result->items;

club enrollments too:
return scalar Koha::Club::Enrollments->search( { club_id => $self->id(),
date_canceled => undef } );

return_claims:
my $return_claims = $self->_result->return_claims_borrowernumbers; (SCALAR)
FINE

claims FINE
my $claims_rs = $self->_result->aqorders_claims;

So it is not so bad as it looked.
But sub items in Koha/Acquisition/Order.pm is a bad example:
with return Koha::Items->search({ itemnumber => \@itemnumbers });

So we could git grep on 
git grep -E "return Koha::\w+->search"
in the Koha directory.
See next comment.

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


More information about the Koha-bugs mailing list