[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 11:37:01 CET 2022


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

--- Comment #8 from Marcel de Rooy <m.de.rooy at rijksmuseum.nl> ---
Created attachment 144610
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=144610&action=edit
Bug 32472: [21.11] Force scalar context on acqorder->items

This resolves a crash like
    The method Koha::Item->count is not covered by tests!
on the template construction
    [% IF ( order.items.count ) %]
in koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt.

Test plan (21.11):
Receive an order line under this condition: quantityreceived>0 with
items attached to the order line.
Note: Should be possible, comes from production logs.

Look for list context on ->items called from acqorder.
The result of git grep "\->items" is too wide but we could theoretically
miss an occurence with git grep "order.*\->items". With order.* we do
catch $new_order_object->items..

Signed-off-by: Marcel de Rooy <m.de.rooy at rijksmuseum.nl>

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


More information about the Koha-bugs mailing list