dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #16138
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 6056: DV fixed bug with last year relative period
------------------------------------------------------------
revno: 6056
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2012-02-20 17:09:57 +0100
message:
DV fixed bug with last year relative period
modified:
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java
dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/chart/hibernate/Chart.hbm.xml
dhis-2/dhis-web/dhis-web-visualizer/src/main/java/org/hisp/dhis/visualizer/action/AddOrUpdateChartAction.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-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 2012-02-20 12:22:33 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java 2012-02-20 16:09:57 +0000
@@ -272,7 +272,6 @@
executeSql( "ALTER TABLE chart DROP COLUMN monthsLastYear" );
executeSql( "ALTER TABLE chart DROP COLUMN quartersLastYear" );
- executeSql( "ALTER TABLE chart DROP COLUMN lastYear" );
executeSql( "ALTER TABLE chart DROP COLUMN last6BiMonths" );
executeSql( "DROP TABLE chart_periods" );
=== modified file 'dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/chart/hibernate/Chart.hbm.xml'
--- dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/chart/hibernate/Chart.hbm.xml 2012-01-23 19:44:06 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/chart/hibernate/Chart.hbm.xml 2012-02-20 16:09:57 +0000
@@ -77,6 +77,7 @@
<property name="last12Months" />
<property name="last4Quarters" />
<property name="last2SixMonths" />
+ <property name="lastYear" />
<property name="last5Years" />
</component>
=== modified file 'dhis-2/dhis-web/dhis-web-visualizer/src/main/java/org/hisp/dhis/visualizer/action/AddOrUpdateChartAction.java'
--- dhis-2/dhis-web/dhis-web-visualizer/src/main/java/org/hisp/dhis/visualizer/action/AddOrUpdateChartAction.java 2012-02-20 10:36:16 +0000
+++ dhis-2/dhis-web/dhis-web-visualizer/src/main/java/org/hisp/dhis/visualizer/action/AddOrUpdateChartAction.java 2012-02-20 16:09:57 +0000
@@ -193,6 +193,13 @@
{
this.thisYear = thisYear;
}
+
+ private boolean lastYear;
+
+ public void setLastYear( boolean lastYear )
+ {
+ this.lastYear = lastYear;
+ }
private boolean last5Years;
@@ -334,8 +341,8 @@
}
}
- if ( lastMonth || last12Months || lastQuarter || last4Quarters || lastSixMonth || last2SixMonths || thisYear
- || last5Years )
+ if ( lastMonth || last12Months || lastQuarter || last4Quarters || lastSixMonth ||
+ last2SixMonths || thisYear || lastYear || last5Years )
{
RelativePeriods rp = new RelativePeriods();
rp.setReportingMonth( lastMonth );
@@ -345,6 +352,7 @@
rp.setLastSixMonth( lastSixMonth );
rp.setLast2SixMonths( last2SixMonths );
rp.setThisYear( thisYear );
+ rp.setLastYear( lastYear );
rp.setLast5Years( last5Years );
chart.setRelatives( rp );