https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24254 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #114597|0 |1 is obsolete| | --- Comment #37 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 114666 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=114666&action=edit Bug 24254: Compare itemlost with 0 On C4::Search and C4::Circulation the uses of the items.itemlost field highlight the fact that the comparisson itemlost <= 0 was wrong, as it is evaluated as a Perl boolean. The column can only be an int and NOT NULL, so we need to check if it is 0 to ponder if not hidden. This patch changes the tests to reflect this, and adjust the Koha::Items->filter_by_visible_in_opac implementation to adapt to this. To test: 1. Apply this patch 2. Run: $ kshell k$ prove t/db_dependent/Koha/Items.t => SUCCESS: Tests pass! 3. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.