Age value type

Hi Community,
age value type allows data entry for ( years, months, days) fields while and giving this result:

I think this would be much better if it only allows to select the date and lock the other fields.
In case a user enters data on the detail side and uses the current year, the value becomes zeros 0000-mm-dd, and that cause analytics to fail with error: ERROR: date/time field value out of range

I suggest locking the years , months, days fields automatically when the age type is used.

Thanks

Jean Paul Mutali
HISP Rwanda

2 Likes

@mutali please create a Jira issue for this! (: Thanks for your post

Was a Jira Issue created for this?
Is this feature available now?

Best,
Clement

Hi @Quoda

Are you facing a similar issue with the age value type, could you add your input? There isn’t a jira feature request yet, would you like to create one?

After that please share here so community members can vote & watch.

Thanks!

1 Like

Hi @Gassim
I have created a jira ticket: [DHIS2-14924] - Jira

2 Likes

Thanks! :pray:

1 Like

Hi @mutali,

Following up this thread as I saw your JIRA issue.
For Age value type, you either put the date OR the number of years, months and/or days, which will then calculate the date. Hence you do not put 2021 as the year but something like 0 or 1, then eg 9 months, 3 days etc. Which then calculates the date (which is what is saved on the backend).

I have also raised a PR to update the docs since there was no documentation for Age, having @Markus review to make sure I have explained it correctly (Will then also add it for TEA value types.)

I’ll close the JIRA too but let me know if I misunderstood anything in your post!

Thanks,
Karoline
DHIS2 Design team

Thanks @Karoline!

I think the issue here is that the field where one should put the date allowed for 0000 as a year and resulted in errors; however, now if one tries to type 0000, it shows an error “date required”, but if one copy/pastes the date it doesn’t check, please see GIF:
/