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: storedby and last updated in enrollment analytics [DHIS2-11775] #8909

Merged

Conversation

gnespolino
Copy link
Contributor

Refactored the time condition rendering a bit to accommodate enrollments.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Oct 4, 2021

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 12 Code Smells

0.0% 0.0% Coverage
11.0% 11.0% Duplication

Set<AnalyticsPeriodBoundary> boundaries = map.get( programStage );

String eventTableName = "analytics_event_" + programIndicator.getProgram().getUid();
sql += " (select count(*) from " + eventTableName + " where " + eventTableName +
Copy link
Contributor

@d-bernat d-bernat Oct 4, 2021

Choose a reason for hiding this comment

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

waht do you think about replacement of '... ( select count(*)..) > 0' with 'exists(select 1 from ... limit 1)'

Copy link
Contributor Author

Choose a reason for hiding this comment

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

makes sense and should improve performances. So generally speaking I agree with that.
However this code was just moved from somewhere else and is not meant to be modified within this ticket scope.
I'd suggest to create a specific task for it

Copy link
Contributor

@d-bernat d-bernat Oct 4, 2021

Choose a reason for hiding this comment

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

Ok, agree, can you please create a ticket for this and assign it to me? Please in comment let me know where is this code coming from. I would like to change it as well. Thank you :-)

Copy link
Contributor

@maikelarabori maikelarabori 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 in general 👍 I would just add some Javadocs on the main classes and methods.

@gnespolino gnespolino merged commit fdf9b27 into master Oct 4, 2021
@gnespolino gnespolino deleted the DHIS2-11775_storedby_lastupdated_enrollments_analytics branch October 4, 2021 10:18
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.

3 participants