https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24602
David Nind <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #98533|0 |1 is obsolete| | --- Comment #6 from David Nind <[email protected]> --- Created attachment 98555 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=98555&action=edit Bug 24602: Make get_onshelfholds_policy fallback to 0 The onshelfholds circulation rules values are more of an ENUM type (as opposed to other rules with integers like max*qty). In the quantities cases, it makes sense to have undef mean unlimited. In the enum type it is clearer to just set a default value (0) as the code already expects (Note: undef and 0 both eval to false so there's no behaviour problem, but warnings or we get forced to check for defined when the rule is used. It seems trivial to just make the rule fallback to a chosen default value). This patch makes it fallback to 0. To test: 1. Run: $ kshell k$ prove t/db_dependent/Koha/CirculationRules.t \ t/db_dependent/Reserves.t => FAIL: CirculationRules.t fails and Reserves.t prints a warning 2. Apply this patch 3. Repeat (1) => SUCCESS: Tests pass! No warning! 4. Sign off :-D Signed-off-by: David Nind <[email protected]> -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ 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/
