-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Character Limits - General Info & Submission Access #4026
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Terraform plan for meta No changes. Your infrastructure matches the configuration.
✅ Plan applied in Deploy to Development and Management Environment #729 |
Terraform plan for dev No changes. Your infrastructure matches the configuration.
✅ Plan applied in Deploy to Development and Management Environment #729 |
Minimum allowed coverage is Generated by 🐒 cobertura-action against b016f2f |
phildominguez-gsa
approved these changes
Jun 28, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Character Limits - General Info & Submission Access
Issue: #1999
Character limits for the general information and submission access fields.
See this drive for a quick report on average/median/min/max value lengths in dissemination.
I pulled the min/max values from the above report into JSON, and gave them their own folder and README in
backend/schemas/character_limits
. From the initial values, I changed the values up/down to reasonable values. The README contains explanations for these decisions. Most fields in this folder remain unchanged from the report, and can be used in a later PR for setting limits on the workbooks.Changes:
In this PR, I set character limits for the General information and Submission access pages.
backend/schemas/character_limits
exists.general.json
has values edited from the baseline report.general.json
are used to set min/maxLength values:GeneralInformation.schema.json
andBaselibsonnet
backend/report_submission/forms.py
for the General Information formbackend/api/serializers
for the Submission access formgen-form.html
ensure that errors display correctlyvalidate.js
allow multiple length validations, and include greater/less than comparatorsstep-3.html
fix a little wonkyness (not all), but also display character limits during the form entry process (as opposed to post-form submission, like in gen info).make all --> format_jsonnet -> jsonnetfmt -i {files}
I've also changed the regex for
audit_period_other_months
to allow for single character responses. This resolves #3969, which has been an issue difficult to discern for users for a little while.^0?[1-9]$|^1[0-8]$
^0?[1-9]$
- One word, either 1-9 or 01-09 OR^1[0-8]$
- One word, 10-18.Other validation errors now provide a generic "unexpected error" response, so these should be caught much faster in the future. This resolves #3970.
How to test:
[email protected]
, or more than 340)audit_period_other_months
should allow a single digit response, and provide a nice error if it is outside the allowed range (1-18 months).Screenshots:
Character limits:
audit_period_other_months
Regex issue:
Length and regex issue:
PR checklist: submitters
main
into your branch shortly before creating the PR. (You should also be mergingmain
into your branch regularly during development.)git status | grep migrations
. If there are any results, you probably need to add them to the branch for the PR. Your PR should have only one new migration file for each of the component apps, except in rare circumstances; you may need to delete some and re-runpython manage.py makemigrations
to reduce the number to one. (Also, unless in exceptional circumstances, your PR should not delete any migration files.)PR checklist: reviewers
make docker-clean; make docker-first-run && docker compose up
; then rundocker compose exec web /bin/bash -c "python manage.py test"
The larger the PR, the stricter we should be about these points.