| Summary: | Patron registration allows for saving required fields with a single space instead of information | ||
|---|---|---|---|
| Product: | Koha | Reporter: | Lisette Scheer <lisette> |
| Component: | Patrons | Assignee: | Lucas Gass (lukeg) <lucas> |
| Status: | Signed Off --- | QA Contact: | Testopia <testopia> |
| Severity: | trivial | ||
| Priority: | P5 - low | CC: | david, gmcharlt, kyle, lucas, wizzyrea |
| Version: | unspecified | ||
| Hardware: | All | ||
| OS: | All | ||
| GIT URL: | Initiative type: | --- | |
| Sponsorship status: | --- | Comma delimited list of Sponsors: | |
| Crowdfunding goal: | 0 | Patch complexity: | Trivial patch |
| Documentation contact: | Documentation submission: | ||
| Text to go in the release notes: |
This changes the OPAC self-registration form validation so that required fields need actual information, and not just spaces.
Before this, spaces could be entered into most required fields and the form would successfully submit. Now, when submitting, a warning is generated to fill in all missing fields for required fields with just spaces.
|
Version(s) released in: | |
| Circulation function: | |||
| Attachments: |
Bug 37143: Do not allow required fields with only whitespace to be submitted
Bug 37143: Do not allow required fields with only whitespace to be submitted Bug 37143: Do not allow required fields with only whitespace to be submitted Bug 37143: Do not allow required fields with only whitespace to be submitted Bug 37143: Do not allow required fields with only whitespace to be submitted |
||
|
Description
Lisette Scheer
2024-06-20 14:57:17 UTC
"difficulties" = 500 error searching for patrons where the erroneous patron is part of the result set. This is true for staff interface patron reg as well. For example: 1. Do a patron search in the staff interface for all patrons. In k-t-d this works fine. 2. Self register a patron. For the required firstname and surname fields use an empty string like " ". 3. You can successfully register. 4. Go back to the staff client and do the same patron search, it never completes. Created attachment 167936 [details] [review] Bug 37143: Do not allow required fields with only whitespace to be submitted To test: 1. Make some fields for OPAC self registration required. 2. Create a new patron via self reg. 3. Fill out those required fields as an empty string like " ". 4. Submit the form, it succeeds. 5. APPLY PATCH, restart_all 6. Try again. Required fields with only whitespace are treated as if they were empty. The patch no longer applies. I did manage to fix the patch, but the QA tidy showed an issue with this line - the double commas: opac/opac-memberentry.pl 280 branchcode => $patron->branchcode,, I'm not sure if fixing this should be in another bug. The fixed patch does work. Created attachment 192161 [details] [review] Bug 37143: Do not allow required fields with only whitespace to be submitted To test: 1. Make some fields for OPAC self registration required. 2. Create a new patron via self reg. 3. Fill out those required fields as an empty string like " ". 4. Submit the form, it succeeds. 5. APPLY PATCH, restart_all 6. Try again. Required fields with only whitespace are treated as if they were empty. Created attachment 192179 [details] [review] Bug 37143: Do not allow required fields with only whitespace to be submitted To test: 1. Make some fields for OPAC self registration required. 2. Create a new patron via self reg. 3. Fill out those required fields as an empty string like " ". 4. Submit the form, it succeeds. 5. APPLY PATCH, restart_all 6. Try again. Required fields with only whitespace are treated as if they were empty. Signed-off-by: David Nind <david@davidnind.com> Created attachment 192181 [details] [review] Bug 37143: Do not allow required fields with only whitespace to be submitted To test: 1. Make some fields for OPAC self registration required. 2. Create a new patron via self reg. 3. Fill out those required fields as an empty string like " ". 4. Submit the form, it succeeds. 5. APPLY PATCH, restart_all 6. Try again. Required fields with only whitespace are treated as if they were empty. Signed-off-by: David Nind <david@davidnind.com> Amended patch to fix qa tidy warning. Created attachment 192191 [details] [review] Bug 37143: Do not allow required fields with only whitespace to be submitted To test: 1. Make some fields for OPAC self registration required. 2. Create a new patron via self reg. 3. Fill out those required fields as an empty string like " ". 4. Submit the form, it succeeds. 5. APPLY PATCH, restart_all 6. Try again. Required fields with only whitespace are treated as if they were empty. Signed-off-by: David Nind <david@davidnind.com> |