Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Unable to create candidate because the date field doesn't allow inclusion of day of the month #8586

Closed
KLaFleur opened this issue Apr 6, 2023 · 2 comments · Fixed by #8648
Assignees
Labels
25.0.0 - Bugs Bug PR or issue introducing/requiring bug fixes (not mutually exclusive with the Feature label) Critical to release PR or issue is key for the release to which it has been assigned

Comments

@KLaFleur
Copy link
Contributor

KLaFleur commented Apr 6, 2023

Describe the bug
unable to create candidate because the date field would not allow me to include the day of the month

To Reproduce
Steps to reproduce the behavior (attach screenshots if applicable):

  1. Go to new profile --> create new profile --> try to select DOB
  2. Click on 'create'
  3. See error (stopped because the date passed in is not complete

What did you expect to happen?
to be allowed to include a full dob

Browser Environment:

OS: [osx]
Browser: Chrome
Version [111.0.5563.110]

@KLaFleur KLaFleur added Bug PR or issue introducing/requiring bug fixes (not mutually exclusive with the Feature label) 25.0.0 - Bugs labels Apr 6, 2023
@KLaFleur KLaFleur mentioned this issue Apr 6, 2023
14 tasks
@driusan driusan added the Critical to release PR or issue is key for the release to which it has been assigned label Apr 11, 2023
@KLaFleur
Copy link
Contributor Author

I'm still getting this error but looks like it's not merged!

driusan pushed a commit that referenced this issue May 11, 2023
When a dob Format of Ym (year and month without day) is set in the config module, candidates could not be created for 2 reasons.

The wrong format (!Y-m-d) was being passed through the function DateTime::createFromFormat in the createNew function of the candidate class, which gave a wrong format error to the user even if they were passing through the expected format of Year-month
Even if this was fixed, the date was inserted into the candidate table as YYYY-MM, but this is not compatible with the SQL Type date
This fixes this issue by getting the date format from config, processing it to the right format and passing it through to DateTime::createFromFormat, as well as adding a '-15' to the end of the date if Ym format is selected in the configuration. This inserts the fifteenth of the month as the arbitrary date for a candidate.

Resolves #8586
@driusan
Copy link
Collaborator

driusan commented May 11, 2023

It is now merged

@driusan driusan closed this as completed May 11, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
25.0.0 - Bugs Bug PR or issue introducing/requiring bug fixes (not mutually exclusive with the Feature label) Critical to release PR or issue is key for the release to which it has been assigned
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants