https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24669
Jonathan Druart <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #99079|0 |1 is obsolete| | Attachment #99080|0 |1 is obsolete| | --- Comment #3 from Jonathan Druart <[email protected]> --- Created attachment 99171 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=99171&action=edit Bug 24669: Improve numeric input handling in smart-rules.pl This removes code duplication by introducing a new subroutine strip_non_numeric() that removes whitespace and makes the rule value '' if it is a string value instead of a digit. The call to strip_non_numeric() is now added also to all the rules it is needed in. To test: 1. Write some string like "test" to rules: - Current checkouts allowed - Current on-site checkouts allowed - Holds allowed (total) - Holds allowed (daily) - Holds per record (count) - Holds per record (count) – can be found in default policy 2. Save rules 3. Apply patch 4. Edit the rule line where you just typed all those strings and save 5. Notice how the values are now empty strings (some say "unlimited" but if you go check from DB it should show empty value there) Sponsored-by: The National Library of Finland Signed-off-by: Jonathan Druart <[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/
