[Bug 24669] New: Editing circulation rule breaks holds when total holds unlimited
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24669 Bug ID: 24669 Summary: Editing circulation rule breaks holds when total holds unlimited Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: major Priority: P5 - low Component: Circulation Assignee: koha-bugs@lists.koha-community.org Reporter: katrin.fischer@bsz-bw.de QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle.m.hall@gmail.com Depends on: 18936 Add a new rule, leave holds values empty and save. After saving, the values show in the table as 'unlimitd' Edit the rule, the editor shows the values not empty, but the string 'unlimited'. Saving the rule now without fixing this means you can no longer place holds. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18936 [Bug 18936] Convert issuingrules fields to circulation_rules -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24669 Lisette Scheer <lisetteslatah@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lisetteslatah@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24669 Joonas Kylmälä <joonas.kylmala@helsinki.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |joonas.kylmala@helsinki.fi |ity.org | CC| |joonas.kylmala@helsinki.fi -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24669 Joonas Kylmälä <joonas.kylmala@helsinki.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24669 --- Comment #1 from Joonas Kylmälä <joonas.kylmala@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.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24669 --- Comment #2 from Joonas Kylmälä <joonas.kylmala@helsinki.fi> --- Created attachment 99080 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=99080&action=edit Bug 24669: Show "Unlimited" values correctly in smart-rules.pl The rules "Holds allowed (total)", "Holds allowed (daily)", "Holds per record (count)" were not set empty when in rule editing. Also, the text "Unlimited" was not shown for rule "Holds per record (count)" even though it should have been since empty value means unlimited holds per record. To test: 1. Apply patch 2. Edit the rules "Holds allowed (total)", "Holds allowed (daily)", "Holds per record (count)" to be empty and save 3. Make sure all of the above rules now say Unlimited 4. Edit the rules again and make sure the above rules are now in the rule editing empty. Sponsored-by: The National Library of Finland -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24669 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24669 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #99079|0 |1 is obsolete| | Attachment #99080|0 |1 is obsolete| | --- Comment #3 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- 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 <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24669 --- Comment #4 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 99172 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=99172&action=edit Bug 24669: Show "Unlimited" values correctly in smart-rules.pl The rules "Holds allowed (total)", "Holds allowed (daily)", "Holds per record (count)" were not set empty when in rule editing. Also, the text "Unlimited" was not shown for rule "Holds per record (count)" even though it should have been since empty value means unlimited holds per record. To test: 1. Apply patch 2. Edit the rules "Holds allowed (total)", "Holds allowed (daily)", "Holds per record (count)" to be empty and save 3. Make sure all of the above rules now say Unlimited 4. Edit the rules again and make sure the above rules are now in the rule editing empty. Sponsored-by: The National Library of Finland Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24669 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #99171|0 |1 is obsolete| | --- Comment #5 from Martin Renvoize <martin.renvoize@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@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24669 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #99172|0 |1 is obsolete| | --- Comment #6 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 99217 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=99217&action=edit Bug 24669: Show "Unlimited" values correctly in smart-rules.pl The rules "Holds allowed (total)", "Holds allowed (daily)", "Holds per record (count)" were not set empty when in rule editing. Also, the text "Unlimited" was not shown for rule "Holds per record (count)" even though it should have been since empty value means unlimited holds per record. To test: 1. Apply patch 2. Edit the rules "Holds allowed (total)", "Holds allowed (daily)", "Holds per record (count)" to be empty and save 3. Make sure all of the above rules now say Unlimited 4. Edit the rules again and make sure the above rules are now in the rule editing empty. Sponsored-by: The National Library of Finland Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24669 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com Status|Signed Off |Passed QA --- Comment #7 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Thanks for the quick followup here Joonas, Passing QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24669 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |20.05.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24669 --- Comment #8 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Nice work everyone! Pushed to master for 20.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24669 --- Comment #9 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 99251 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=99251&action=edit Bug 24669: Fix selenium test There is one more "Unlimited" on the circ rules now. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24669 Joy Nelson <joy@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |joy@bywatersolutions.com Resolution|--- |FIXED Status|Pushed to master |RESOLVED --- Comment #10 from Joy Nelson <joy@bywatersolutions.com> --- not backporting to 19.11.x due to missing dependencies -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24669 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=30794 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org