Birthdate Fields - Allowing 6 Numeric Digits / No Date Validation
- Dominant language
- Python
- Stars
- 8
- Forks
- 2
- Avg merge
- 14h 34m
- Merged PRs (30d)
- 46
Description
**Describe the bug in current situation**
A clear and concise description of what the bug is.
In the 'Request' tab on a request, all 'Date of Birth' fields allow a user to enter 6 numeric digits for the year (YYYYYY). This makes it difficult for a user to manually enter a birthdate accurately. A user should only be able to enter 4 numeric digits (YYYY) for the year. All other date fields appear to function properly.
In addition, there does not appear to be any date validation on 'Date of Birth' fields. You are able to enter a date of birth in the future, when this should not be possible.
**Link bug to the User Story**
**Impact of this bug**
Describe the impact, i.e. what the impact is, and number of users impacted.
Low
**Chance of Occurring (high/medium/low/very low)**
Low
**Pre Conditions: which Env, any pre-requesites or assumptions to execute steps?**
PROD or TEST
**Steps to Reproduce**
Steps to reproduce the behavior:
1. As an IAO user, click 'Add Request' to create a new request
2. Change the 'Request Type' field to "Personal"
3. Select any date of birth field on the 'Request' tab
4. Attempt to manually type a birth date (i.e., do not use the date picker)
5. See error, where you are able to enter 6 numeric digits for the year, and unable to manually enter the correct birth date
**Actual/ observed behaviour/ results**
Able to enter 6 numeric digits for the year rather than 4 numeric digits
**Expected behaviour**
A clear and concise description of what you expected to happen. Use the gherking language.
GIVEN a user has clicked on a date of birth field
WHEN the user manually enters the date of birth in the YYYY-MM-DD format
THEN the first 4 numeric digits entered will be for the year
AND the next 2 numeric digits will be for the month
AND the next 2 numeric digits will be for the day
GIVEN a user has manually entered, or used the date picker, to populate a 'Date of Birth' field
WHEN the date of birth entered or selected is in the future
THEN the user will be unable to select the date
**Screenshots/ Visual Reference/ Source**
If applicable, add screenshots to help explain your problem. You an use screengrab.
Contributor guide
Research direction
Start in the Request tab flow reached through Add Request after selecting Personal, and reproduce manual entry and future-date selection in a Date of Birth field. Trace the date-field implementation and its existing validation; done means four-digit years are accepted in YYYY-MM-DD input and future birthdates are rejected for both typing and the picker.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100