Bug 30864 - Patron category form - no validation for password expiration field
Summary: Patron category form - no validation for password expiration field
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: System Administration (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on: 29924
Blocks:
  Show dependency treegraph
 
Reported: 2022-05-29 20:22 UTC by David Nind
Modified: 2023-12-28 20:42 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
This adds validation to the "Password expiration" field on the patron category form. If letters or other characters were entered, there was no error message. If what was entered was not a number, then it was not saved.
Version(s) released in:
22.11.00, 22.05.03
Circulation function:


Attachments
Bug 30864: Add validation to password_expiry_days (1.38 KB, patch)
2022-06-01 12:31 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 30864: Add validation to password_expiry_days (1.42 KB, patch)
2022-06-01 19:54 UTC, David Nind
Details | Diff | Splinter Review
Bug 30864: Add validation to password_expiry_days (1.48 KB, patch)
2022-06-03 10:59 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description David Nind 2022-05-29 20:22:43 UTC
When creating a patron category or editing an existing one, there is no validation for the "Password expiration" field.

If letters or other characters are entered, there is no error message and if not a number whatever is entered is not saved.

To replicate:
1. Go to Administration > Patrons and circulation > Patron categories.
2. Add a new patron category (or edit an existing category).
3. For the "Password expiration" field, enter letters or characters such as L$%.
4. For the "Age required" field, enter letters or characters.
5. Note that for the "Age required" field you are prompted to "Please enter only digits", but for "Password expiration" there is no validation error message.
6. If you save with letters or other characters in the "Password expiration" field, it is shown as a "-" on the patron categories list and is blank when you edit the category.
Comment 1 Jonathan Druart 2022-06-01 12:31:11 UTC
Created attachment 135539 [details] [review]
Bug 30864: Add validation to password_expiry_days

When creating a patron category or editing an existing one, there is no validation for the "Password expiration" field.

If letters or other characters are entered, there is no error message and if not a number whatever is entered is not saved.

To test:
1. Go to Administration > Patrons and circulation > Patron categories.
2. Add a new patron category (or edit an existing category).
3. For the "Password expiration" field, enter letters or characters such as L$%.
=> Note that you are prompted to "Please enter only digits"
Comment 2 David Nind 2022-06-01 19:54:55 UTC
Created attachment 135555 [details] [review]
Bug 30864: Add validation to password_expiry_days

When creating a patron category or editing an existing one, there is no validation for the "Password expiration" field.

If letters or other characters are entered, there is no error message and if not a number whatever is entered is not saved.

To test:
1. Go to Administration > Patrons and circulation > Patron categories.
2. Add a new patron category (or edit an existing category).
3. For the "Password expiration" field, enter letters or characters such as L$%.
=> Note that you are prompted to "Please enter only digits"

Signed-off-by: David Nind <david@davidnind.com>
Comment 3 Nick Clemens (kidclamp) 2022-06-03 10:59:21 UTC
Created attachment 135676 [details] [review]
Bug 30864: Add validation to password_expiry_days

When creating a patron category or editing an existing one, there is no validation for the "Password expiration" field.

If letters or other characters are entered, there is no error message and if not a number whatever is entered is not saved.

To test:
1. Go to Administration > Patrons and circulation > Patron categories.
2. Add a new patron category (or edit an existing category).
3. For the "Password expiration" field, enter letters or characters such as L$%.
=> Note that you are prompted to "Please enter only digits"

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 4 Tomás Cohen Arazi (tcohen) 2022-06-06 16:51:18 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!
Comment 5 Lucas Gass (lukeg) 2022-07-12 15:37:45 UTC
Backported to 22.05.x for 22.05.03