[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
Tue Feb 18 20:04:14 CET 2020


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

Martin Renvoize <martin.renvoize at ptfs-europe.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #99171|0                           |1
        is obsolete|                            |

--- Comment #5 from Martin Renvoize <martin.renvoize at ptfs-europe.com> ---
Created attachment 99216
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=99216&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 <jonathan.druart at bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize at ptfs-europe.com>

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


More information about the Koha-bugs mailing list