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: [DHIS2-16123] Add inheritable TEAs to Relationships #3464

Merged
merged 5 commits into from
Dec 1, 2023

Conversation

eirikhaugstulen
Copy link
Contributor

Tech summary:

  • Added a hook that checks if the current trackedEntityType has any inheritable attributes and fetches the values if there are any.

@eirikhaugstulen eirikhaugstulen marked this pull request as ready for review November 16, 2023 12:04
@eirikhaugstulen eirikhaugstulen requested a review from a team as a code owner November 16, 2023 12:04
Copy link
Contributor

@superskip superskip left a comment

Choose a reason for hiding this comment

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

Review service time! 😄

The big thing I noticed is that there is still missing inheritance from non-TET attributes.
In addition you'll find that I've added the usual assorted code comments below.

@@ -152,7 +150,7 @@ export const useFormValues = ({ program, trackedEntityInstanceAttributes, orgUni
formFoundation &&
Object.entries(formFoundation).length > 0 &&
formValuesReadyRef.current === false &&
areAttributesWithSubvaluesReady
!!clientAttributesWithSubvalues
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice! NIT: Can omit !!

@eirikhaugstulen
Copy link
Contributor Author

Review service time! 😄

The big thing I noticed is that there is still missing inheritance from non-TET attributes. In addition you'll find that I've added the usual assorted code comments below.

Thanks for the review @superskip - fixed all of the things mentioned above!
I was not aware that you could have inheritance on Data Elements 🤔 Can you give me a tip on where to configure this?

Copy link
Contributor

@superskip superskip left a comment

Choose a reason for hiding this comment

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

@eirikhaugstulen Good job getting through the comments so quickly 🙂

Clarification: TEAs not associated with the TET (for example phone number in TB program).

@eirikhaugstulen
Copy link
Contributor Author

All right, @superskip - now I get what you mean. Should be better now!

Copy link
Contributor

@superskip superskip left a comment

Choose a reason for hiding this comment

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

LGTM 🎉

Copy link

Copy link

@geethaalwan geethaalwan left a comment

Choose a reason for hiding this comment

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

Tested successfully on 2.41,2.40.3,2.39.4,2.38.6 versions

@eirikhaugstulen eirikhaugstulen merged commit 620b008 into master Dec 1, 2023
36 checks passed
@eirikhaugstulen eirikhaugstulen deleted the eh/feat/DHIS2-16123_InheritableTEAs branch December 1, 2023 07:07
dhis2-bot added a commit that referenced this pull request Dec 3, 2023
# [100.47.0](v100.46.1...v100.47.0) (2023-12-03)

### Bug Fixes

* **translations:** sync translations from transifex (master) ([e20fb8c](e20fb8c))

### Features

* [DHIS2-16123] Add inheritable TEAs to Relationships ([#3464](#3464)) ([620b008](620b008))
@dhis2-bot
Copy link
Contributor

🎉 This PR is included in version 100.47.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants