dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #32457
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 16559: Resource tables, clear zero values function. Respecting the zero-significant per data element set...
------------------------------------------------------------
revno: 16559
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2014-08-29 10:45:54 +0200
message:
Resource tables, clear zero values function. Respecting the zero-significant per data element setting.
modified:
dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/statementbuilder/H2StatementBuilder.java
dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/statementbuilder/HsqlStatementBuilder.java
dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/statementbuilder/MySQLStatementBuilder.java
dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/statementbuilder/PostgreSQLStatementBuilder.java
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/commons.js
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/javascript/maintenance.js
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/maintenanceForm.vm
--
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-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/statementbuilder/H2StatementBuilder.java'
--- dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/statementbuilder/H2StatementBuilder.java 2014-04-07 14:37:39 +0000
+++ dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/statementbuilder/H2StatementBuilder.java 2014-08-29 08:45:54 +0000
@@ -83,7 +83,11 @@
{
return
"DELETE FROM datavalue " +
- "WHERE datavalue.value = '0'";
+ "USING datavalue, dataelement " +
+ "WHERE datavalue.dataelementid = dataelement.dataelementid " +
+ "AND dataelement.aggregationtype = 'sum' " +
+ "AND dataelement.zeroissignificant = false " +
+ "AND datavalue.value = '0'";
}
@Override
=== modified file 'dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/statementbuilder/HsqlStatementBuilder.java'
--- dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/statementbuilder/HsqlStatementBuilder.java 2014-05-15 16:58:37 +0000
+++ dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/statementbuilder/HsqlStatementBuilder.java 2014-08-29 08:45:54 +0000
@@ -83,7 +83,11 @@
{
return
"DELETE FROM datavalue " +
- "WHERE datavalue.value = '0'";
+ "USING datavalue, dataelement " +
+ "WHERE datavalue.dataelementid = dataelement.dataelementid " +
+ "AND dataelement.aggregationtype = 'sum' " +
+ "AND dataelement.zeroissignificant = false " +
+ "AND datavalue.value = '0'";
}
@Override
=== modified file 'dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/statementbuilder/MySQLStatementBuilder.java'
--- dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/statementbuilder/MySQLStatementBuilder.java 2014-05-15 16:58:37 +0000
+++ dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/statementbuilder/MySQLStatementBuilder.java 2014-08-29 08:45:54 +0000
@@ -86,6 +86,7 @@
"USING datavalue, dataelement " +
"WHERE datavalue.dataelementid = dataelement.dataelementid " +
"AND dataelement.aggregationtype = 'sum' " +
+ "AND dataelement.zeroissignificant = false " +
"AND datavalue.value = '0'";
}
=== modified file 'dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/statementbuilder/PostgreSQLStatementBuilder.java'
--- dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/statementbuilder/PostgreSQLStatementBuilder.java 2014-05-15 16:58:37 +0000
+++ dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/statementbuilder/PostgreSQLStatementBuilder.java 2014-08-29 08:45:54 +0000
@@ -104,6 +104,7 @@
"USING dataelement " +
"WHERE datavalue.dataelementid = dataelement.dataelementid " +
"AND dataelement.aggregationtype = 'sum' " +
+ "AND dataelement.zeroissignificant = false " +
"AND datavalue.value = '0'";
}
=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/commons.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/commons.js 2014-07-12 11:33:56 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/commons.js 2014-08-29 08:45:54 +0000
@@ -85,7 +85,8 @@
*
* @param context Context vars from context menu
*/
-function translateWithContext( context ) {
+function translateWithContext( context )
+{
translate( context.type, context.uid );
}
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/javascript/maintenance.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/javascript/maintenance.js 2014-08-05 22:30:52 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/javascript/maintenance.js 2014-08-29 08:45:54 +0000
@@ -11,7 +11,7 @@
if ( clearAnalytics || clearDataMart || dataMartIndex || zeroValues || dataSetCompleteness || prunePeriods || updateCategoryOptionCombos )
{
- setWaitMessage( i18n_performing_maintenance );
+ setHeaderWaitMessage( i18n_performing_maintenance );
var params = "clearAnalytics=" + clearAnalytics +
"&clearDataMart=" + clearDataMart +
@@ -27,12 +27,12 @@
data: params,
dataType: "xml",
success: function(result){
- setMessage( i18n_maintenance_performed );
+ setHeaderDelayMessage( i18n_maintenance_performed );
}
});
}
else
{
- setMessage( i18n_select_options );
+ setHeaderDelayMessage( i18n_select_options );
}
}
\ No newline at end of file
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/maintenanceForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/maintenanceForm.vm 2014-08-05 22:30:52 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/maintenanceForm.vm 2014-08-29 08:45:54 +0000
@@ -45,4 +45,3 @@
<input type="button" value="$i18n.getString( 'perform_maintenance' )" onclick="performMaintenance()" style="width:170px"/>
</p>
-<span id="message"></span>