dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #33588
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 17173: Analytics table, moved _dataelementstructure out of approval subquery into main query
------------------------------------------------------------
revno: 17173
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Sun 2014-10-19 21:38:04 +0200
message:
Analytics table, moved _dataelementstructure out of approval subquery into main query
modified:
dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/JdbcAnalyticsTableManager.java
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/JdbcAnalyticsTableManager.java'
--- dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/JdbcAnalyticsTableManager.java 2014-10-19 18:56:12 +0000
+++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/JdbcAnalyticsTableManager.java 2014-10-19 19:38:04 +0000
@@ -206,6 +206,7 @@
textValueExpression + " as textvalue " +
"from datavalue dv " +
"left join _dataelementgroupsetstructure degs on dv.dataelementid=degs.dataelementid " +
+ "left join _dataelementstructure des on dv.dataelementid=des.dataelementid " +
"left join _organisationunitgroupsetstructure ougs on dv.sourceid=ougs.organisationunitid " +
"left join _categoryoptiongroupsetstructure cogs on dv.attributeoptioncomboid=cogs.categoryoptioncomboid " +
"left join _categorystructure dcs on dv.categoryoptioncomboid=dcs.categoryoptioncomboid " +
@@ -235,8 +236,8 @@
"select coalesce(min(dal.level),999) " +
"from dataapproval da " +
"inner join dataapprovallevel dal on da.dataapprovallevelid = dal.dataapprovallevelid " +
- "inner join _dataelementstructure des on da.datasetid = des.datasetid and des.dataelementid = dv.dataelementid " +
- "where da.periodid = dv.periodid " +
+ "where da.datasetid = des.datasetid " +
+ "and da.periodid = dv.periodid " +
"and des.approvedata = true " +
"and (";