dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #33587
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 17172: Added approvedata to _dataelementstructure resource table. Removed a join in anlaytics table gene...
------------------------------------------------------------
revno: 17172
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Sun 2014-10-19 20:56:12 +0200
message:
Added approvedata to _dataelementstructure resource table. Removed a join in anlaytics table generation.
modified:
dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/resourcetable/DefaultResourceTableService.java
dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/resourcetable/jdbc/JdbcResourceTableStore.java
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-administration/src/main/java/org/hisp/dhis/resourcetable/DefaultResourceTableService.java'
--- dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/resourcetable/DefaultResourceTableService.java 2014-10-16 06:17:19 +0000
+++ dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/resourcetable/DefaultResourceTableService.java 2014-10-19 18:56:12 +0000
@@ -387,13 +387,14 @@
values.add( dataSet != null ? dataSet.getId() : null );
values.add( dataSet != null ? dataSet.getUid() : null );
values.add( dataSet != null ? dataSet.getName() : null );
+ values.add( dataSet != null ? dataSet.isApproveData() : false );
values.add( periodType != null ? periodType.getId() : null );
values.add( periodType != null ? periodType.getName() : null );
batchArgs.add( values.toArray() );
}
- resourceTableStore.batchUpdate( 8, TABLE_NAME_DATA_ELEMENT_STRUCTURE, batchArgs );
+ resourceTableStore.batchUpdate( 9, TABLE_NAME_DATA_ELEMENT_STRUCTURE, batchArgs );
log.info( "Data element table generated" );
}
=== modified file 'dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/resourcetable/jdbc/JdbcResourceTableStore.java'
--- dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/resourcetable/jdbc/JdbcResourceTableStore.java 2014-10-16 06:17:19 +0000
+++ dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/resourcetable/jdbc/JdbcResourceTableStore.java 2014-10-19 18:56:12 +0000
@@ -424,6 +424,7 @@
"datasetid INTEGER, " +
"datasetuid CHARACTER(11), " +
"datasetname VARCHAR(250), " +
+ "approvedata BOOLEAN, " +
"periodtypeid INTEGER, " +
"periodtypename VARCHAR(250) )";
=== 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 17:44:10 +0000
+++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/JdbcAnalyticsTableManager.java 2014-10-19 18:56:12 +0000
@@ -236,9 +236,8 @@
"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 " +
- "inner join dataset ds on des.datasetid = ds.datasetid " +
"where da.periodid = dv.periodid " +
- "and ds.approvedata = true " +
+ "and des.approvedata = true " +
"and (";
for ( OrganisationUnitLevel level : levels )