Skip to content
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

fix: [DHIS2-18676] display error for age in the future #3932

Open
wants to merge 1 commit into
base: DHIS2-18310-enable-non-gregorian-calendars-in-views-and-lists
Choose a base branch
from

Conversation

alaa-yahia
Copy link
Member

@alaa-yahia alaa-yahia commented Jan 6, 2025

Implements DHIS2-18676

There are two errors displayed when a user selects a future date in the age field:

  • A date in the future is not allowed: Displayed when a user selects a date in the future from the date field.

  • Please provide a valid positive integer: Displayed when a user enters a negative number in the Days, Months, or Years fields.

@alaa-yahia alaa-yahia requested a review from a team as a code owner January 6, 2025 23:49
@alaa-yahia alaa-yahia changed the base branch from master to DHIS2-18310-enable-non-gregorian-calendars-in-views-and-lists January 6, 2025 23:50
@alaa-yahia alaa-yahia changed the title fix: [DHIS2-18676] capture able to save age in the future in tracked fix: [DHIS2-18676] able to save age in the future in tracked Jan 8, 2025
@alaa-yahia alaa-yahia changed the title fix: [DHIS2-18676] able to save age in the future in tracked fix: [DHIS2-18676] able to save age in the future Jan 8, 2025
Copy link
Contributor

@simonadomnisoru simonadomnisoru left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @alaa-yahia,
Even though errors are showing now, I can still save the age in the future from the trackedEntity profile widget. Can you take a look at it? I think the NoticeBoxes.container.js component is a good place to start investigating.

Screen.Recording.2025-01-09.at.12.03.46.mov

Thanks!

@alaa-yahia
Copy link
Member Author

@simonadomnisoru This doesn’t seem to be related to the age field. I was able to save the form even though there were missing required fields.

Screen.Recording.2025-01-13.at.13.43.19.mov

Copy link
Contributor

@simonadomnisoru simonadomnisoru left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@simonadomnisoru This doesn’t seem to be related to the age field. I was able to save the form even though there were missing required fields.

Ok, it looks like validation errors in age that do not stop from saving in capture will be fixed in DHIS2-18673. Then if the current ticket DHIS2-18676 is only about displaying future age errors, I'll update the Jira description and title to reflect that.

@simonadomnisoru simonadomnisoru changed the title fix: [DHIS2-18676] able to save age in the future fix: [DHIS2-18676] display error for age in the future Jan 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants