From 22c8dbeb49f3f37b55cd90847c57b8932a22e422 Mon Sep 17 00:00:00 2001 From: Baptiste Wojtkowski Date: Mon, 1 Jul 2024 11:27:49 +0200 Subject: [PATCH] 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 --- .../intranet-tmpl/prog/en/modules/serials/subscription-add.tt | 2 +- .../prog/en/modules/serials/subscription-numberpatterns.tt | 2 +- .../intranet-tmpl/prog/en/modules/serials/subscription-renew.tt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt index 2c6705656e..03832abb50 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt @@ -346,7 +346,7 @@ fieldset.rows table { clear: none; margin: 0; } [% END %] - (enter amount in numerals) +
  • diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-numberpatterns.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-numberpatterns.tt index a358f68f7e..d6a055ba78 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-numberpatterns.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-numberpatterns.tt @@ -203,7 +203,7 @@ - +
  • diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-renew.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-renew.tt index c510590163..9a7e7df246 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-renew.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-renew.tt @@ -80,7 +80,7 @@ [% END %] - (enter amount in numerals) +
  • -- 2.39.2