[Bug 36981] New: Check for subscription length value
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36981 Bug ID: 36981 Summary: Check for subscription length value Change sponsored?: --- Product: Koha Version: 22.11 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Serials Assignee: koha-bugs@lists.koha-community.org Reporter: pierre.genty@biblibre.com QA Contact: testopia@bugs.koha-community.org When editing serial subscription, it is possible to set amount such as 999999999 in "Subscription length" field. If no end date is set this could cause an infinite loop. -- 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=36981 Alban Peyrat <alban.peyrat_koha@yahoo.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |alban.peyrat_koha@yahoo.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36981 Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Patch complexity|--- |Trivial patch -- 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=36981 --- Comment #1 from Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski@biblibre.com> --- Created attachment 168308 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=168308&action=edit Bug 36981: Check for subscription length value Original comment: When editing serial subscription, it is possible to set amount such as 999999999 in "Subscription length" field. If no end date is set this could cause an infinite loop. I changed all concerned fields toward number fields with minimum 0 and max 2000 (arbitrary but I think it is nearly impossible to reach such an high number) TEST PLAN: 1 - Apply patch 2 - go to Serials -> search -> pick a subsciption 3 - Click on Edit->Edit subscription 4 - fill correct infos and go to page 2 5 - notice that the second field after the label subscription length is a number field 6 - try and fill -1 in this field -> notice it is impossible to save 7 - try and fill 5000 in this field -> notice it is impossible to save 8 - Repeat the process py clicking on "Renew" at step (3) 9 - Repeat the process py clicking on "numbering patterns" at step (3) (note, you can test the pattern but when clicking done you will be prevented from) -- 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=36981 Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |baptiste.wojtkowski@biblibr | |e.com Severity|enhancement |trivial --- Comment #2 from Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski@biblibre.com> --- Note : changing from enhancement to trivial since providing a too high value may impair the normal operation of Koha -- 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=36981 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- 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=36981 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #168308|0 |1 is obsolete| | --- Comment #3 from David Nind <david@davidnind.com> --- Created attachment 168773 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=168773&action=edit Bug 36981: Check for subscription length value Original comment: When editing serial subscription, it is possible to set amount such as 999999999 in "Subscription length" field. If no end date is set this could cause an infinite loop. I changed all concerned fields toward number fields with minimum 0 and max 2000 (arbitrary but I think it is nearly impossible to reach such an high number) TEST PLAN: 1 - Apply patch 2 - go to Serials -> search -> pick a subsciption 3 - Click on Edit->Edit subscription 4 - fill correct infos and go to page 2 5 - notice that the second field after the label subscription length is a number field 6 - try and fill -1 in this field -> notice it is impossible to save 7 - try and fill 5000 in this field -> notice it is impossible to save 8 - Repeat the process py clicking on "Renew" at step (3) 9 - Repeat the process py clicking on "numbering patterns" at step (3) (note, you can test the pattern but when clicking done you will be prevented from) Signed-off-by: David Nind <david@davidnind.com> -- 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=36981 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA --- Comment #4 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I am not sure 200 is a good default here. If you pick "issues" and you have a daily newspaper, it would be 365 at least. Saying: I don't think 200 is big enough for common use cases here. -- 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=36981 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|22.11 |Main -- 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=36981 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |baptiste.wojtkowski@biblibr |ity.org |e.com -- 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=36981 --- Comment #5 from Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski@biblibre.com> --- Hi Karin, thank you for your reply ! You might have misread the patch, I proposed 2000 as a limit, not 200, is it still too low ? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36981 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Passed QA --- Comment #6 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Ooops! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36981 Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Signed Off --- Comment #7 from Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski@biblibre.com> --- (In reply to Baptiste Wojtkowski (bwoj) from comment #5)
Hi Karin, thank you for your reply !
You might have misread the patch, I proposed 2000 as a limit, not 200, is it still too low ?
-- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36981 --- Comment #8 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Value is high, but not sure if that is the best approach. Leaving it for proper QA. Thanks for the quick feedback! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36981 Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36981 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36981 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl --- Comment #9 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Understand concerns of Katrin. This does not feel like the best solution. More a workaround. Where does it cause the infinite loop exactly? Can we fix that? Please provide some more details. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36981 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA --- Comment #10 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Please respond to raised questions. Changing status -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36981 --- Comment #11 from Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski@biblibre.com> --- Sry for taking long time to answer, needed to reproduce the pb I did not experiences myself ^^ When loading subscription-details.pl, it computes every occurrence of each record, so if the number of records is too high, it will compute every single occurrence, which may take time. It's not an infinite loop but it can be very long. I think this comes from here:
68 69 my ($totalissues,@serialslist) = GetSerials($subscriptionid); 70 $totalissues-- if $totalissues; # the -1 is to have 0 if this is a new > subscription (only 1 issue) 71
-- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36981 Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36981 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA --- Comment #12 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- FAIL koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-numberpatterns.tt FAIL forbidden patterns forbidden pattern: Don't use type=number for inputs (bug 17098) (line 216) FAIL koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-renew.tt FAIL forbidden patterns forbidden pattern: Don't use type=number for inputs (bug 17098) (line 90) -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org