revision-diff.txt (2.43 KB)
I guess this is a fix, but do old-style calculated data elements really have a denominator? If so, why did they not have one in 2.10?
I am fine with this, but just hope that the denominators are ignored for the purpose of aggregation so that we do not get
Σ(numerator)/Σ(denominator)
which is the default aggregation right?
This will obviously not work for “number” type indicators.
Best regards,
Jason
···
On Wed, Jan 30, 2013 at 10:32 AM, noreply@launchpad.net wrote:
revno: 9656
committer: Hieu hieu.hispvietnam@gmail.com
branch nick: dhis2
timestamp: Wed 2013-01-30 14:31:03 +0700
message:
Startup routine - update the denominator of indicator if having any denominator is null follow up on the fixed bug <1105720>
modified:
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/addIndicatorForm.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/updateIndicatorForm.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-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java’
— dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java 2013-01-30 04:56:16 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java 2013-01-30 07:31:03 +0000
@@ -502,6 +502,10 @@
executeSql( "UPDATE userroleauthorities SET authority='F_USERGROUP_DELETE' WHERE authority='F_USER_GRUP_DELETE'" ); executeSql( "UPDATE userroleauthorities SET authority='F_USERGROUP_LIST' WHERE authority='F_USER_GRUP_LIST'" );
// update denominator of indicator which has indicatortype as 'number'
executeSql( "UPDATE indicator SET denominator = 1, denominatordescription = '' WHERE indicatortypeid IN (SELECT DISTINCT indicatortypeid FROM indicatortype WHERE indicatornumber = true) AND denominator IS NULL");
[log.info](http://log.info)( "Tables updated" ); }
=== modified file ‘dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/addIndicatorForm.vm’
— dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/addIndicatorForm.vm 2012-11-05 18:32:08 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/addIndicatorForm.vm 2013-01-30 07:31:03 +0000
@@ -103,10 +103,10 @@
-#if( $groupSets.size() > 0 )
+#if( $!groupSets && $!groupSets.size() > 0 )
<tr>
<td style="height:15px" colspan="2">
<td style="height:15px" colspan="2"/> </tr>
=== modified file ‘dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/updateIndicatorForm.vm’
— dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/updateIndicatorForm.vm 2013-01-29 07:17:12 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/updateIndicatorForm.vm 2013-01-30 07:31:03 +0000
@@ -101,7 +101,7 @@
</tr>
-#if( $groupSets.size() > 0 )
+#if( $!groupSets && $!groupSets.size() > 0 )
<tr> <td style="height:15px" colspan="2">
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help : https://help.launchpad.net/ListHelp
Hi Jason,
not exactly sure but I think this is to fix potential errors in the database from direct sql injection. The denominators are always used in aggregation but in this case we set the denominator to 1 which will not affect the outcome - so I think this will work…
Lars
···
On Wed, Jan 30, 2013 at 10:32 AM, noreply@launchpad.net wrote:
revno: 9656
committer: Hieu hieu.hispvietnam@gmail.com
branch nick: dhis2
timestamp: Wed 2013-01-30 14:31:03 +0700
message:
Startup routine - update the denominator of indicator if having any denominator is null follow up on the fixed bug <1105720>
modified:
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/addIndicatorForm.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/updateIndicatorForm.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-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java’
— dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java 2013-01-30 04:56:16 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java 2013-01-30 07:31:03 +0000
@@ -502,6 +502,10 @@
executeSql( "UPDATE userroleauthorities SET authority='F_USERGROUP_DELETE' WHERE authority='F_USER_GRUP_DELETE'" ); executeSql( "UPDATE userroleauthorities SET authority='F_USERGROUP_LIST' WHERE authority='F_USER_GRUP_LIST'" );
// update denominator of indicator which has indicatortype as 'number'
executeSql( "UPDATE indicator SET denominator = 1, denominatordescription = '' WHERE indicatortypeid IN (SELECT DISTINCT indicatortypeid FROM indicatortype WHERE indicatornumber = true) AND denominator IS NULL");
[log.info](http://log.info)( "Tables updated" ); }
=== modified file ‘dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/addIndicatorForm.vm’
— dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/addIndicatorForm.vm 2012-11-05 18:32:08 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/addIndicatorForm.vm 2013-01-30 07:31:03 +0000
@@ -103,10 +103,10 @@
-#if( $groupSets.size() > 0 )
+#if( $!groupSets && $!groupSets.size() > 0 )
<tr>
<td style="height:15px" colspan="2">
<td style="height:15px" colspan="2"/> </tr>
=== modified file ‘dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/updateIndicatorForm.vm’
— dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/updateIndicatorForm.vm 2013-01-29 07:17:12 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/updateIndicatorForm.vm 2013-01-30 07:31:03 +0000
@@ -101,7 +101,7 @@
</tr>
-#if( $groupSets.size() > 0 )
+#if( $!groupSets && $!groupSets.size() > 0 )
<tr> <td style="height:15px" colspan="2">
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help : https://help.launchpad.net/ListHelp
This had nothing to do with direct SQL injection as far as I know. No idea how these indicators for NULL denominators, but they seemed happy in 2.10.
Seems to work for me now, just do not really understand why these objects have a denominator at all, more from a fundamental perspective.
···
On Fri, Feb 1, 2013 at 10:33 AM, Lars Helge Øverland larshelge@gmail.com wrote:
Hi Jason,
not exactly sure but I think this is to fix potential errors in the database from direct sql injection. The denominators are always used in aggregation but in this case we set the denominator to 1 which will not affect the outcome - so I think this will work…
Lars
On Wed, Jan 30, 2013 at 10:25 PM, Jason Pickering jason.p.pickering@gmail.com wrote:
I guess this is a fix, but do old-style calculated data elements really have a denominator? If so, why did they not have one in 2.10?
I am fine with this, but just hope that the denominators are ignored for the purpose of aggregation so that we do not get
Σ(numerator)/Σ(denominator)
which is the default aggregation right?
This will obviously not work for “number” type indicators.
Best regards,
Jason
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help : https://help.launchpad.net/ListHelp
On Wed, Jan 30, 2013 at 10:32 AM, noreply@launchpad.net wrote:
revno: 9656
committer: Hieu hieu.hispvietnam@gmail.com
branch nick: dhis2
timestamp: Wed 2013-01-30 14:31:03 +0700
message:
Startup routine - update the denominator of indicator if having any denominator is null follow up on the fixed bug <1105720>
modified:
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/addIndicatorForm.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/updateIndicatorForm.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-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java’
— dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java 2013-01-30 04:56:16 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java 2013-01-30 07:31:03 +0000
@@ -502,6 +502,10 @@
executeSql( "UPDATE userroleauthorities SET authority='F_USERGROUP_DELETE' WHERE authority='F_USER_GRUP_DELETE'" ); executeSql( "UPDATE userroleauthorities SET authority='F_USERGROUP_LIST' WHERE authority='F_USER_GRUP_LIST'" );
// update denominator of indicator which has indicatortype as 'number'
executeSql( "UPDATE indicator SET denominator = 1, denominatordescription = '' WHERE indicatortypeid IN (SELECT DISTINCT indicatortypeid FROM indicatortype WHERE indicatornumber = true) AND denominator IS NULL");
[log.info](http://log.info)( "Tables updated" ); }
=== modified file ‘dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/addIndicatorForm.vm’
— dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/addIndicatorForm.vm 2012-11-05 18:32:08 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/addIndicatorForm.vm 2013-01-30 07:31:03 +0000
@@ -103,10 +103,10 @@
-#if( $groupSets.size() > 0 )
+#if( $!groupSets && $!groupSets.size() > 0 )
<tr>
<td style="height:15px" colspan="2">
<td style="height:15px" colspan="2"/> </tr>
=== modified file ‘dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/updateIndicatorForm.vm’
— dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/updateIndicatorForm.vm 2013-01-29 07:17:12 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/updateIndicatorForm.vm 2013-01-30 07:31:03 +0000
@@ -101,7 +101,7 @@
</tr>
-#if( $groupSets.size() > 0 )
+#if( $!groupSets && $!groupSets.size() > 0 )
<tr> <td style="height:15px" colspan="2">
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help : https://help.launchpad.net/ListHelp