https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32472
Marcel de Rooy <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] Severity|enhancement |major Summary|The method |[21.11] The method |Koha::Item->count is not |Koha::Item->count is not |covered by tests |covered by tests Version|master |21.11 --- Comment #2 from Marcel de Rooy <[email protected]> --- Quite interesting to see how many occurrences are really affected. If you pass items with say $items = Koha::Items->search, you will be fine since you passed items as a scalar to the template. So a lot of [plurals].count are just fine. But what about order.items.count? Generally this comes from passing order as a scalar but the next part "items" is evaluated in list context in TT. So those might be wrong.. A git grep like git grep -E "\w+\.\w+\.count " will give such candidates. (Note that you could also call other methods than count..] This gives me just a bunch for opac templates in 21.11. The ones I checked seem to be fine: item.ratings.count comes from $issue->{ratings} so scalar context. But quite a bit more for intranet, but most are in a specific context: club enrollments, return claims, credit type library limits, course reserves, stock rotation quota. Just mentioning a few: includes/cat-toolbar.inc: [% ELSIF ( biblio.subscriptions.count ) %] includes/clubs-table.inc: [% c.club_enrollments.count | html %] modules/acqui/showorder.tt: [% order.claims.count | html %] modules/cataloguing/moveitem.tt: [% IF from_biblio.items.count == 0 && CAN_user_editcatalogue_edit_catalogue %]modules/members/discharge.tt: [% IF patron.holds.count %] etc -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug. _______________________________________________ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
