[Koha-bugs] [Bug 24669] Editing circulation rule breaks holds when total holds unlimited

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Feb 17 12:00:38 CET 2020


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

--- Comment #1 from Joonas Kylmälä <joonas.kylmala at helsinki.fi> ---
Created attachment 99079
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=99079&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

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


More information about the Koha-bugs mailing list