dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #42253
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 21592: Data element resource table, including workflowid
------------------------------------------------------------
revno: 21592
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2016-01-05 15:55:10 +0100
message:
Data element resource table, including workflowid
modified:
dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/resourcetable/table/DataElementResourceTable.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/table/DataElementResourceTable.java'
--- dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/resourcetable/table/DataElementResourceTable.java 2016-01-04 02:27:49 +0000
+++ dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/resourcetable/table/DataElementResourceTable.java 2016-01-05 14:55:10 +0000
@@ -69,6 +69,7 @@
"datasetuid CHARACTER(11), " +
"datasetname VARCHAR(230), " +
"datasetapprovallevel INTEGER, " +
+ "workflowid INTEGER, " +
"periodtypeid INTEGER, " +
"periodtypename VARCHAR(230))";
@@ -104,7 +105,8 @@
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.getWorkflow() != null ? null : APPROVAL_LEVEL_HIGHEST );
+ values.add( dataSet != null && dataSet.isApproveData() ? null : APPROVAL_LEVEL_HIGHEST );
+ values.add( dataSet != null && dataSet.isApproveData() ? dataSet.getWorkflow().getId() : null );
values.add( periodType != null ? periodType.getId() : null );
values.add( periodType != null ? periodType.getName() : null );
@@ -121,6 +123,7 @@
"create unique index in_dataelementstructure_dataelementuid_" + getRandomSuffix() + " on " + getTempTableName() + "(dataelementuid);",
"create index in_dataelementstructure_datasetid_" + getRandomSuffix() + " on " + getTempTableName() + "(datasetid);",
"create index in_dataelementstructure_datasetuid_" + getRandomSuffix() + " on " + getTempTableName() + "(datasetuid);",
- "create index in_dataelementstructure_periodtypeid_" + getRandomSuffix() + " on " + getTempTableName() + "(periodtypeid);" );
+ "create index in_dataelementstructure_periodtypeid_" + getRandomSuffix() + " on " + getTempTableName() + "(periodtypeid);",
+ "create index in_dataelementstructure_workflowid_" + getRandomSuffix() + " on " + getTempTableName() + "(workflowid);" );
}
}