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

feat: Add optionSetId into items returned by /dataItems [DHIS2-18644] #19552

Merged
merged 5 commits into from
Dec 23, 2024

Conversation

maikelarabori
Copy link
Contributor

Add the optionSetId (uid) in the objects returned by the endpoint /dataItems.
When the dimension does not have a relationship with OptionSet, do not return it.
It should be returned as part of the dataItems object, ie. (see the last attribute):

"dataItems": [
    {
      "code": "DE_2006099",
      "displayName": "Display Name",
      "valueType": "NUMBER",
      "name": "Name",
      "id": "OsY2lXrypjO",
      "shortName": "Short Name",
      "displayShortName": "Display Short Name",
      "dimensionItemType": "DATA_ELEMENT",
      "optionSetId": uid12345
    }, ...

In addition, the OPTION_SET type was removed. It will not be required anymore. If we need it later we can just recover the deleted class.

Finally, I followed latest @gnespolino's PR, and applied the same refactoring for the string of COLUMNS.

Copy link
Contributor

@gnespolino gnespolino left a comment

Choose a reason for hiding this comment

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

I think it's good, just some failing test to fix

@maikelarabori maikelarabori merged commit c3cb5c2 into master Dec 23, 2024
17 checks passed
@maikelarabori maikelarabori deleted the DHIS2-18644_2.42 branch December 23, 2024 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
run-api-analytics-tests Enables analytics e2e tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants