=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/chart/Chart.java' --- dhis-2/dhis-api/src/main/java/org/hisp/dhis/chart/Chart.java 2011-12-21 22:11:29 +0000 +++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/chart/Chart.java 2011-12-22 00:00:00 +0000 @@ -251,6 +251,7 @@ for ( Period period : periods ) { period.setName( format.formatPeriod( period ) ); + period.setShortName( format.formatPeriod( period ) ); } } === 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 2011-12-21 22:11:29 +0000 +++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java 2011-12-22 00:00:00 +0000 @@ -259,6 +259,11 @@ executeSql( "ALTER TABLE chart DROP COLUMN size" ); executeSql( "ALTER TABLE chart DROP COLUMN verticallabels" ); executeSql( "ALTER TABLE chart DROP COLUMN horizontalplotorientation" ); + + 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" ); // remove outdated relative periods @@ -354,8 +359,6 @@ // replace null with false for boolean fields executeSql( "update chart set hidelegend = false where hidelegend is null" ); - executeSql( "update chart set verticallabels = false where verticallabels is null" ); - executeSql( "update chart set horizontalplotorientation = false where horizontalplotorientation is null" ); executeSql( "update chart set regression = false where regression is null" ); executeSql( "update chart set targetline = false where targetline is null" ); executeSql( "update chart set hidesubtitle = false where hidesubtitle is null" ); @@ -391,6 +394,8 @@ executeSql( "update chart set monthslastyear = false where monthslastyear is null" ); executeSql( "update chart set quarterslastyear = false where quarterslastyear is null" ); executeSql( "update chart set lastyear = false where lastyear is null" ); + executeSql( "update chart set lastsixmonth = false where lastsixmonth is null" ); + executeSql( "update chart set last12months = false where last12months is null" ); executeSql( "update chart set last5years = false where last5years is null" ); executeSql( "update chart set last4quarters = false where last4quarters is null" ); executeSql( "update chart set last12months = false where last12months is null" ); === 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 2011-12-21 20:41:22 +0000 +++ dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/chart/hibernate/Chart.hbm.xml 2011-12-22 00:00:00 +0000 @@ -83,19 +83,13 @@ - - - + - - - - - + === modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/chart/action/SaveChartAction.java' --- dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/chart/action/SaveChartAction.java 2011-12-21 20:41:22 +0000 +++ dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/chart/action/SaveChartAction.java 2011-12-22 00:00:00 +0000 @@ -248,27 +248,34 @@ this.selectedDataSets = selectedDataSets; } - private boolean reportingMonth; - - public void setReportingMonth( boolean reportingMonth ) - { - this.reportingMonth = reportingMonth; - } - - private boolean reportingBimonth; - - public void setReportingBimonth( boolean reportingBimonth ) - { - this.reportingBimonth = reportingBimonth; - } - - private boolean reportingQuarter; - - public void setReportingQuarter( boolean reportingQuarter ) - { - this.reportingQuarter = reportingQuarter; - } - + private boolean lastMonth; + + public void setLastMonth( boolean lastMonth ) + { + this.lastMonth = lastMonth; + } + + private boolean last12Months; + + public void setLast12Months( boolean last12Months ) + { + this.last12Months = last12Months; + } + + private boolean lastQuarter; + + public void setLastQuarter( boolean lastQuarter ) + { + this.lastQuarter = lastQuarter; + } + + private boolean last4Quarters; + + public void setLast4Quarters( boolean last4Quarters ) + { + this.last4Quarters = last4Quarters; + } + private boolean lastSixMonth; public void setLastSixMonth( boolean lastSixMonth ) @@ -276,18 +283,11 @@ this.lastSixMonth = lastSixMonth; } - private boolean monthsThisYear; - - public void setMonthsThisYear( boolean monthsThisYear ) - { - this.monthsThisYear = monthsThisYear; - } - - private boolean quartersThisYear; - - public void setQuartersThisYear( boolean quartersThisYear ) - { - this.quartersThisYear = quartersThisYear; + private boolean last2SixMonths; + + public void setLast2SixMonths( boolean last2SixMonths ) + { + this.last2SixMonths = last2SixMonths; } private boolean thisYear; @@ -297,25 +297,11 @@ this.thisYear = thisYear; } - private boolean monthsLastYear; - - public void setMonthsLastYear( boolean monthsLastYear ) - { - this.monthsLastYear = monthsLastYear; - } - - private boolean quartersLastYear; - - public void setQuartersLastYear( boolean quartersLastYear ) - { - this.quartersLastYear = quartersLastYear; - } - - private boolean lastYear; - - public void setLastYear( boolean lastYear ) - { - this.lastYear = lastYear; + private boolean last5Years; + + public void setLast5Years( boolean last5Years ) + { + this.last5Years = last5Years; } // ------------------------------------------------------------------------- @@ -374,10 +360,17 @@ chart.setPeriods( periods ); chart.setOrganisationUnits( organisationUnits ); - RelativePeriods relatives = new RelativePeriods( reportingMonth, reportingBimonth, reportingQuarter, lastSixMonth, - monthsThisYear, quartersThisYear, thisYear, monthsLastYear, quartersLastYear, lastYear, false, false, false, false, false ); - - chart.setRelatives( relatives ); + RelativePeriods rp = new RelativePeriods(); + rp.setReportingMonth( lastMonth ); + rp.setLast12Months( last12Months ); + rp.setReportingQuarter( lastQuarter ); + rp.setLast4Quarters( last4Quarters ); + rp.setLastSixMonth( lastSixMonth ); + rp.setLast2SixMonths( last2SixMonths ); + rp.setThisYear( thisYear ); + rp.setLast5Years( last5Years ); + + chart.setRelatives( rp ); chartService.saveChart( chart ); === modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/resources/org/hisp/dhis/reporting/i18n_module.properties' --- dhis-2/dhis-web/dhis-web-reporting/src/main/resources/org/hisp/dhis/reporting/i18n_module.properties 2011-12-14 08:10:22 +0000 +++ dhis-2/dhis-web/dhis-web-reporting/src/main/resources/org/hisp/dhis/reporting/i18n_module.properties 2011-12-22 00:00:00 +0000 @@ -393,4 +393,8 @@ last_5_years=Last 5 years last_12_months=Last 12 months last_4_quarters=Last 4 quarters -reporting_rate_summary=Reporting Rate Summary \ No newline at end of file +reporting_rate_summary=Reporting Rate Summary +last_month=Last month +last_quarter=Last quarter +last_six_month=Last six-month +last_2_sixmonths=Last 2 six-months \ No newline at end of file === modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/addChartIndicatorModeForm.vm' --- dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/addChartIndicatorModeForm.vm 2011-07-01 08:11:03 +0000 +++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/addChartIndicatorModeForm.vm 2011-12-22 00:00:00 +0000 @@ -59,21 +59,23 @@ - -   - -   - -   + +   + +   + +   -

+
- -   - -   - - + +   + +   + + + + === modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/addChartPeriodModeForm.vm' --- dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/addChartPeriodModeForm.vm 2011-07-01 08:11:03 +0000 +++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/addChartPeriodModeForm.vm 2011-12-22 00:00:00 +0000 @@ -57,21 +57,23 @@ - -   - -   - -   + +   + +   + +  
- -   - -   - - + +   + +   + + + +