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-10070 improves rules engine performance #1271

Merged

Conversation

paschalidi
Copy link
Contributor

@paschalidi paschalidi commented Dec 7, 2020

This works on this ticket https://jira.dhis2.org/browse/DHIS2-10070.

Here is how much this would take in the previous version. If you would like me to explain in more detail how to get this view, please let me know and we can get into a call
image

This is the same action now
image

accValidFormValues[key] = isValid ? formValues[key] : null;
return accValidFormValues;
}, {});
.filter(key => fieldsValidation[key])
Copy link
Contributor Author

@paschalidi paschalidi Dec 7, 2020

Choose a reason for hiding this comment

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

What used to happen before, is that we iterated over all the form values and returned null when there isn't a value. I return now elements that have values.

Please lets try to think if this will cause any problems in the long term.

Copy link
Member

Choose a reason for hiding this comment

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

LGTM - I would test wether the default value assignment works as before. Check that a "Yes/No" data element left blank is evaluated to "No", or that a Numeric data element defaults to 0.

@paschalidi paschalidi marked this pull request as ready for review December 7, 2020 15:25
Copy link
Member

@Bekkalizer Bekkalizer left a comment

Choose a reason for hiding this comment

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

Looks good - one comment on a thing you can test functionally before we merge

@Bekkalizer Bekkalizer merged commit de1077c into master Dec 8, 2020
@Bekkalizer Bekkalizer deleted the cp/bugfixes/DHIS2-10070-performance-on-rules-engine branch December 8, 2020 09:47
@dhis2-bot
Copy link
Contributor

🎉 This PR is included in version 1.3.4 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

3 participants