dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #14701
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 5075: Impl new relative periods
Merge authors:
Lars Helge Øverland (larshelge)
------------------------------------------------------------
revno: 5075 [merge]
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2011-11-01 19:03:16 +0100
message:
Impl new relative periods
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/period/BiMonthlyPeriodType.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/period/RelativePeriods.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/period/SixMonthlyPeriodType.java
dhis-2/dhis-api/src/test/java/org/hisp/dhis/period/BiMonthlyPeriodTypeTest.java
dhis-2/dhis-api/src/test/java/org/hisp/dhis/period/RelativePeriodTest.java
dhis-2/dhis-api/src/test/java/org/hisp/dhis/period/SixMonthlyPeriodTypeTest.java
dhis-2/dhis-services/dhis-service-datamart-default/src/test/java/org/hisp/dhis/datamart/DataMartExportStoreTest.java
dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/scheduling/DataMartTask.java
dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/scheduling/DataSetCompletenessTask.java
dhis-2/dhis-web/dhis-web-datamart/src/main/java/org/hisp/dhis/datamart/action/SaveDataMartExportAction.java
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/tablecreator/action/SaveTableAction.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-api/src/main/java/org/hisp/dhis/period/BiMonthlyPeriodType.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/period/BiMonthlyPeriodType.java 2011-09-16 07:53:59 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/period/BiMonthlyPeriodType.java 2011-11-01 17:37:42 +0000
@@ -129,6 +129,23 @@
return periods;
}
+
+ public List<Period> generateRollingPeriods( Date date )
+ {
+ Calendar cal = createCalendarInstance( date );
+ cal.set( Calendar.DAY_OF_MONTH, 1 );
+ cal.add( Calendar.MONTH, ( ( cal.get( Calendar.MONTH ) % 2 ) * -1 ) - 10 );
+
+ ArrayList<Period> periods = new ArrayList<Period>();
+
+ for ( int i = 0; i < 6; i++ )
+ {
+ periods.add( createPeriod( cal ) );
+ cal.add( Calendar.MONTH, 2 );
+ }
+
+ return periods;
+ }
@Override
public String getIsoDate( Period period )
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/period/RelativePeriods.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/period/RelativePeriods.java 2011-10-23 12:03:50 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/period/RelativePeriods.java 2011-11-01 17:57:03 +0000
@@ -95,11 +95,23 @@
"month11",
"month12" };
+ public static final String[] BIMONTHS_LAST_6 = {
+ "bimonth1",
+ "bimonth2",
+ "bimonth3",
+ "bimonth4",
+ "bimonth5",
+ "bimonth6" };
+
public static final String[] QUARTERS_THIS_YEAR = {
"quarter1",
"quarter2",
"quarter3",
"quarter4" };
+
+ public static final String[] SIXMONHTS_LAST_2 = {
+ "sixmonth1",
+ "sixmonth2" };
public static final String[] QUARTERS_LAST_YEAR = {
"quarter1_last_year",
@@ -138,8 +150,12 @@
private Boolean last12Months = false;
+ private Boolean last6BiMonths = false;
+
private Boolean last4Quarters = false;
+ private Boolean last2SixMonths = false;
+
// -------------------------------------------------------------------------
// Constructors
// -------------------------------------------------------------------------
@@ -150,7 +166,7 @@
/**
* @param reportingMonth reporting month
- * @param reportingBimonth reporting bimonth
+ * @param reportingBimonth reporting bi-month
* @param reportingQuarter reporting quarter
* @param monthsThisYear months this year
* @param quartersThisYear quarters this year
@@ -160,12 +176,14 @@
* @param lastYear last year
* @param last5Years last 5 years
* @param last12Months last 12 months
+ * @param last6BiMonths last 6 bi-months
* @param last4Quarters last 4 quarters
+ * @param last2SixMonths last 2 six-months
*/
public RelativePeriods( boolean reportingMonth, boolean reportingBimonth, boolean reportingQuarter,
boolean monthsThisYear, boolean quartersThisYear, boolean thisYear,
boolean monthsLastYear, boolean quartersLastYear, boolean lastYear, boolean last5Years,
- boolean last12Months, boolean last4Quarters )
+ boolean last12Months, boolean last6BiMonths, boolean last4Quarters, boolean last2SixMonths )
{
this.reportingMonth = reportingMonth;
this.reportingBimonth = reportingBimonth;
@@ -178,7 +196,9 @@
this.lastYear = lastYear;
this.last5Years = last5Years;
this.last12Months = last12Months;
+ this.last6BiMonths = last6BiMonths;
this.last4Quarters = last4Quarters;
+ this.last2SixMonths = last2SixMonths;
}
// -------------------------------------------------------------------------
@@ -201,7 +221,10 @@
this.lastYear = false;
this.last5Years = false;
this.last12Months = false;
+ this.last6BiMonths = false;
this.last4Quarters = false;
+ this.last2SixMonths = false;
+
return this;
}
@@ -329,11 +352,21 @@
periods.addAll( getRelativePeriodList( new MonthlyPeriodType().generateRollingPeriods( date ), MONTHS_LAST_12, dynamicNames, format ) );
}
+ if ( isLast6BiMonths() )
+ {
+ periods.addAll( getRelativePeriodList( new BiMonthlyPeriodType().generateRollingPeriods( date ), BIMONTHS_LAST_6, dynamicNames, format ) );
+ }
+
if ( isLast4Quarters() )
{
periods.addAll( getRelativePeriodList( new QuarterlyPeriodType().generateRollingPeriods( date ), QUARTERS_THIS_YEAR, dynamicNames, format ) );
}
+ if ( isLast2SixMonths() )
+ {
+ periods.addAll( getRelativePeriodList( new SixMonthlyPeriodType().generateRollingPeriods( date ), SIXMONHTS_LAST_2, dynamicNames, format ) );
+ }
+
date = getDate( MONTHS_IN_YEAR, date );
if ( isMonthsLastYear() )
@@ -502,11 +535,21 @@
return last12Months != null && last12Months;
}
+ public boolean isLast6BiMonths()
+ {
+ return last6BiMonths != null && last6BiMonths;
+ }
+
public boolean isLast4Quarters()
{
return last4Quarters != null && last4Quarters;
}
+ public boolean isLast2SixMonths()
+ {
+ return last2SixMonths != null && last2SixMonths;
+ }
+
// -------------------------------------------------------------------------
// Getters & setters
// -------------------------------------------------------------------------
@@ -621,6 +664,16 @@
this.last12Months = last12Months;
}
+ public Boolean getLast6BiMonths()
+ {
+ return last6BiMonths;
+ }
+
+ public void setLast6BiMonths( Boolean last6BiMonths )
+ {
+ this.last6BiMonths = last6BiMonths;
+ }
+
public Boolean getLast4Quarters()
{
return last4Quarters;
@@ -631,6 +684,16 @@
this.last4Quarters = last4Quarters;
}
+ public Boolean getLast2SixMonths()
+ {
+ return last2SixMonths;
+ }
+
+ public void setLast2SixMonths( Boolean last2SixMonths )
+ {
+ this.last2SixMonths = last2SixMonths;
+ }
+
// -------------------------------------------------------------------------
// Equals, hashCode, and toString
// -------------------------------------------------------------------------
@@ -653,7 +716,9 @@
result = prime * result + ( ( lastYear == null ) ? 0 : lastYear.hashCode() );
result = prime * result + ( ( last5Years == null ) ? 0 : last5Years.hashCode() );
result = prime * result + ( ( last12Months == null ) ? 0 : last12Months.hashCode() );
+ result = prime * result + ( ( last6BiMonths == null ) ? 0 : last6BiMonths.hashCode() );
result = prime * result + ( ( last4Quarters == null ) ? 0 : last4Quarters.hashCode() );
+ result = prime * result + ( ( last2SixMonths == null ) ? 0 : last2SixMonths.hashCode() );
return result;
}
@@ -810,6 +875,18 @@
return false;
}
+ if ( last6BiMonths == null )
+ {
+ if ( other.last6BiMonths != null )
+ {
+ return false;
+ }
+ }
+ else if ( !last6BiMonths.equals( other.last6BiMonths ) )
+ {
+ return false;
+ }
+
if ( last4Quarters == null )
{
if ( other.last4Quarters != null )
@@ -821,6 +898,18 @@
{
return false;
}
+
+ if ( last2SixMonths == null )
+ {
+ if ( other.last2SixMonths != null )
+ {
+ return false;
+ }
+ }
+ else if ( !last2SixMonths.equals( other.last2SixMonths ) )
+ {
+ return false;
+ }
return true;
}
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/period/SixMonthlyPeriodType.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/period/SixMonthlyPeriodType.java 2011-05-05 21:14:56 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/period/SixMonthlyPeriodType.java 2011-11-01 17:37:42 +0000
@@ -138,6 +138,23 @@
return periods;
}
+ public List<Period> generateRollingPeriods( Date date )
+ {
+ Calendar cal = createCalendarInstance( date );
+ cal.set( Calendar.DAY_OF_MONTH, 1 );
+ cal.add( Calendar.MONTH, ( ( cal.get( Calendar.MONTH ) % 6 ) * -1 ) - 6 );
+
+ ArrayList<Period> periods = new ArrayList<Period>();
+
+ for ( int i = 0; i < 2; i++ )
+ {
+ periods.add( createPeriod( cal ) );
+ cal.add( Calendar.MONTH, 6 );
+ }
+
+ return periods;
+ }
+
@Override
public String getIsoDate( Period period )
{
=== modified file 'dhis-2/dhis-api/src/test/java/org/hisp/dhis/period/BiMonthlyPeriodTypeTest.java'
--- dhis-2/dhis-api/src/test/java/org/hisp/dhis/period/BiMonthlyPeriodTypeTest.java 2011-10-12 17:32:39 +0000
+++ dhis-2/dhis-api/src/test/java/org/hisp/dhis/period/BiMonthlyPeriodTypeTest.java 2011-11-01 17:37:42 +0000
@@ -42,7 +42,7 @@
private Cal startCal;
private Cal endCal;
private Cal testCal;
- private CalendarPeriodType periodType;
+ private BiMonthlyPeriodType periodType;
@Before
public void before()
@@ -124,6 +124,22 @@
assertEquals( periodType.createPeriod( new Cal( 2009, 9, 1 ).time() ), periods.get( 4 ) );
assertEquals( periodType.createPeriod( new Cal( 2009, 11, 1 ).time() ), periods.get( 5 ) );
}
+
+ @Test
+ public void testGenerateRollingPeriods()
+ {
+ testCal.set( 2009, 8, 15 );
+
+ List<Period> periods = periodType.generateRollingPeriods( testCal.time() );
+
+ assertEquals( 6, periods.size() );
+ assertEquals( periodType.createPeriod( new Cal( 2008, 9, 1 ).time() ), periods.get( 0 ) );
+ assertEquals( periodType.createPeriod( new Cal( 2008, 11, 1 ).time() ), periods.get( 1 ) );
+ assertEquals( periodType.createPeriod( new Cal( 2009, 1, 1 ).time() ), periods.get( 2 ) );
+ assertEquals( periodType.createPeriod( new Cal( 2009, 3, 1 ).time() ), periods.get( 3 ) );
+ assertEquals( periodType.createPeriod( new Cal( 2009, 5, 1 ).time() ), periods.get( 4 ) );
+ assertEquals( periodType.createPeriod( new Cal( 2009, 7, 1 ).time() ), periods.get( 5 ) );
+ }
@Test
public void testGenerateLast5Years()
=== modified file 'dhis-2/dhis-api/src/test/java/org/hisp/dhis/period/RelativePeriodTest.java'
--- dhis-2/dhis-api/src/test/java/org/hisp/dhis/period/RelativePeriodTest.java 2011-10-23 12:03:50 +0000
+++ dhis-2/dhis-api/src/test/java/org/hisp/dhis/period/RelativePeriodTest.java 2011-11-01 17:57:03 +0000
@@ -31,8 +31,8 @@
import static junit.framework.Assert.assertTrue;
import java.util.Calendar;
-import java.util.Collection;
import java.util.Date;
+import java.util.List;
import org.hisp.dhis.i18n.I18nFormat;
import org.hisp.dhis.mock.MockI18nFormat;
@@ -58,9 +58,9 @@
@Test
public void getRelativePeriods()
{
- RelativePeriods periods = new RelativePeriods( true, true, true, true, true, true, true, true, true, true, true, true );
+ RelativePeriods periods = new RelativePeriods( true, true, true, true, true, true, true, true, true, true, true, true, true, true );
- Collection<Period> relatives = periods.getRelativePeriods( getDate( 2001, 1, 1 ), i18nFormat, false );
+ List<Period> relatives = periods.getRelativePeriods( getDate( 2001, 1, 1 ), i18nFormat, false );
assertTrue( relatives.contains( new Period( new MonthlyPeriodType(), getDate( 2001, 1, 1 ), getDate( 2001, 1, 31 ) ) ) );
assertTrue( relatives.contains( new Period( new MonthlyPeriodType(), getDate( 2001, 2, 1 ), getDate( 2001, 2, 28 ) ) ) );
@@ -73,13 +73,23 @@
assertTrue( relatives.contains( new Period( new MonthlyPeriodType(), getDate( 2001, 9, 1 ), getDate( 2001, 9, 30 ) ) ) );
assertTrue( relatives.contains( new Period( new MonthlyPeriodType(), getDate( 2001, 10, 1 ), getDate( 2001, 10, 31 ) ) ) );
assertTrue( relatives.contains( new Period( new MonthlyPeriodType(), getDate( 2001, 11, 1 ), getDate( 2001, 11, 30 ) ) ) );
- assertTrue( relatives.contains( new Period( new MonthlyPeriodType(), getDate( 2001, 12, 1 ), getDate( 2001, 12, 31 ) ) ) );
+ assertTrue( relatives.contains( new Period( new MonthlyPeriodType(), getDate( 2001, 12, 1 ), getDate( 2001, 12, 31 ) ) ) );
+
+ assertTrue( relatives.contains( new Period( new BiMonthlyPeriodType(), getDate( 2000, 3, 1 ), getDate( 2000, 4, 30 ) ) ) );
+ assertTrue( relatives.contains( new Period( new BiMonthlyPeriodType(), getDate( 2000, 5, 1 ), getDate( 2000, 6, 30 ) ) ) );
+ assertTrue( relatives.contains( new Period( new BiMonthlyPeriodType(), getDate( 2000, 7, 1 ), getDate( 2000, 8, 31 ) ) ) );
+ assertTrue( relatives.contains( new Period( new BiMonthlyPeriodType(), getDate( 2000, 9, 1 ), getDate( 2000, 10, 31 ) ) ) );
+ assertTrue( relatives.contains( new Period( new BiMonthlyPeriodType(), getDate( 2000, 11, 1 ), getDate( 2000, 12, 31 ) ) ) );
+ assertTrue( relatives.contains( new Period( new BiMonthlyPeriodType(), getDate( 2001, 1, 1 ), getDate( 2001, 2, 28 ) ) ) );
assertTrue( relatives.contains( new Period( new QuarterlyPeriodType(), getDate( 2001, 1, 1 ), getDate( 2001, 3, 31 ) ) ) );
assertTrue( relatives.contains( new Period( new QuarterlyPeriodType(), getDate( 2001, 4, 1 ), getDate( 2001, 6, 30 ) ) ) );
assertTrue( relatives.contains( new Period( new QuarterlyPeriodType(), getDate( 2001, 7, 1 ), getDate( 2001, 9, 30 ) ) ) );
assertTrue( relatives.contains( new Period( new QuarterlyPeriodType(), getDate( 2001, 10, 1 ), getDate( 2001, 12, 31 ) ) ) );
+ assertTrue( relatives.contains( new Period( new SixMonthlyPeriodType(), getDate( 2000, 7, 1 ), getDate( 2000, 12, 31 ) ) ) );
+ assertTrue( relatives.contains( new Period( new SixMonthlyPeriodType(), getDate( 2001, 1, 1 ), getDate( 2001, 6, 30 ) ) ) );
+
assertTrue( relatives.contains( new Period( new YearlyPeriodType(), getDate( 2001, 1, 1 ), getDate( 2001, 12, 31 ) ) ) );
assertTrue( relatives.contains( new Period( new MonthlyPeriodType(), getDate( 2000, 1, 1 ), getDate( 2000, 1, 31 ) ) ) );
@@ -108,6 +118,6 @@
assertTrue( relatives.contains( new Period( new YearlyPeriodType(), getDate( 2000, 1, 1 ), getDate( 2000, 12, 31 ) ) ) );
assertTrue( relatives.contains( new Period( new YearlyPeriodType(), getDate( 2001, 1, 1 ), getDate( 2001, 12, 31 ) ) ) );
- assertEquals( 58, relatives.size() );
+ assertEquals( 66, relatives.size() );
}
}
=== modified file 'dhis-2/dhis-api/src/test/java/org/hisp/dhis/period/SixMonthlyPeriodTypeTest.java'
--- dhis-2/dhis-api/src/test/java/org/hisp/dhis/period/SixMonthlyPeriodTypeTest.java 2011-10-12 17:32:39 +0000
+++ dhis-2/dhis-api/src/test/java/org/hisp/dhis/period/SixMonthlyPeriodTypeTest.java 2011-11-01 17:37:42 +0000
@@ -44,7 +44,7 @@
private Cal startCal;
private Cal endCal;
private Cal testCal;
- private CalendarPeriodType periodType;
+ private SixMonthlyPeriodType periodType;
@Before
public void before()
@@ -122,6 +122,18 @@
assertEquals( periodType.createPeriod( new Cal( 2009, 1, 1 ).time() ), periods.get( 0 ) );
assertEquals( periodType.createPeriod( new Cal( 2009, 7, 1 ).time() ), periods.get( 1 ) );
}
+
+ @Test
+ public void testGenerateRollingPeriods()
+ {
+ testCal.set( 2009, 4, 15 );
+
+ List<Period> periods = periodType.generateRollingPeriods( testCal.time() );
+
+ assertEquals( 2, periods.size() );
+ assertEquals( periodType.createPeriod( new Cal( 2008, 7, 1 ).time() ), periods.get( 0 ) );
+ assertEquals( periodType.createPeriod( new Cal( 2009, 1, 1 ).time() ), periods.get( 1 ) );
+ }
@Test
public void testGenerateLast5Years()
=== modified file 'dhis-2/dhis-services/dhis-service-datamart-default/src/test/java/org/hisp/dhis/datamart/DataMartExportStoreTest.java'
--- dhis-2/dhis-services/dhis-service-datamart-default/src/test/java/org/hisp/dhis/datamart/DataMartExportStoreTest.java 2011-10-23 12:03:50 +0000
+++ dhis-2/dhis-services/dhis-service-datamart-default/src/test/java/org/hisp/dhis/datamart/DataMartExportStoreTest.java 2011-11-01 17:57:03 +0000
@@ -134,7 +134,7 @@
periods.add( periodA );
periods.add( periodB );
- relatives = new RelativePeriods( true, true, true, true, true, true, false, false, false, false, false, false );
+ relatives = new RelativePeriods( true, true, true, true, true, true, false, false, false, false, false, false, false, false );
exportA = new DataMartExport( "ExportA", dataElements, indicators, organisationUnits, periods, relatives );
exportB = new DataMartExport( "ExportB", dataElements, indicators, organisationUnits, periods, relatives );
=== modified file 'dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/scheduling/DataMartTask.java'
--- dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/scheduling/DataMartTask.java 2011-10-23 12:03:50 +0000
+++ dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/scheduling/DataMartTask.java 2011-11-01 18:02:50 +0000
@@ -70,7 +70,7 @@
Collection<Integer> indicatorIds = ConversionUtils.getIdentifiers( Indicator.class, indicatorService.getAllIndicators() );
Collection<Integer> organisationUnitIds = ConversionUtils.getIdentifiers( OrganisationUnit.class, organisationUnitService.getAllOrganisationUnits() );
- RelativePeriods relatives = new RelativePeriods( false, false, false, true, true, true, false, false, false, false, false, false );
+ RelativePeriods relatives = new RelativePeriods( false, false, false, true, true, true, false, false, false, false, false, false, false, false );
dataMartService.export( dataElementIds, indicatorIds, new HashSet<Integer>(), organisationUnitIds, relatives, true );
}
=== modified file 'dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/scheduling/DataSetCompletenessTask.java'
--- dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/scheduling/DataSetCompletenessTask.java 2011-10-23 12:03:50 +0000
+++ dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/scheduling/DataSetCompletenessTask.java 2011-11-01 18:02:50 +0000
@@ -63,7 +63,7 @@
Collection<Integer> dataSetIds = ConversionUtils.getIdentifiers( DataSet.class, dataSetService.getAllDataSets() );
Collection<Integer> organisationUnitIds = ConversionUtils.getIdentifiers( OrganisationUnit.class, organisationUnitService.getAllOrganisationUnits() );
- RelativePeriods relatives = new RelativePeriods( false, false, false, true, true, true, false, false, false, false, false, false );
+ RelativePeriods relatives = new RelativePeriods( false, false, false, true, true, true, false, false, false, false, false, false, false, false );
completenessService.exportDataSetCompleteness( dataSetIds, relatives, organisationUnitIds );
}
=== modified file 'dhis-2/dhis-web/dhis-web-datamart/src/main/java/org/hisp/dhis/datamart/action/SaveDataMartExportAction.java'
--- dhis-2/dhis-web/dhis-web-datamart/src/main/java/org/hisp/dhis/datamart/action/SaveDataMartExportAction.java 2011-10-23 12:03:50 +0000
+++ dhis-2/dhis-web/dhis-web-datamart/src/main/java/org/hisp/dhis/datamart/action/SaveDataMartExportAction.java 2011-11-01 18:02:50 +0000
@@ -208,7 +208,7 @@
RelativePeriods relatives = new RelativePeriods( reportingMonth, reportingBimonth, reportingQuarter,
monthsThisYear, quartersThisYear, thisYear,
- monthsLastYear, quartersLastYear, lastYear, false, false, false );
+ monthsLastYear, quartersLastYear, lastYear, false, false, false, false, false );
export.setName( name );
export.setDataElements( getSet( dataElementService.getDataElements( getIntegerCollection( selectedDataElements ) ) ) );
=== 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-10-23 12:03:50 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/chart/action/SaveChartAction.java 2011-11-01 18:02:50 +0000
@@ -375,7 +375,7 @@
chart.setOrganisationUnits( organisationUnits );
RelativePeriods relatives = new RelativePeriods( reportingMonth, reportingBimonth, reportingQuarter,
- monthsThisYear, quartersThisYear, thisYear, monthsLastYear, quartersLastYear, lastYear, false, false, false );
+ monthsThisYear, quartersThisYear, thisYear, monthsLastYear, quartersLastYear, lastYear, false, false, false, false, false );
chart.setRelatives( relatives );
=== modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/tablecreator/action/SaveTableAction.java'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/tablecreator/action/SaveTableAction.java 2011-10-27 12:08:07 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/tablecreator/action/SaveTableAction.java 2011-11-01 18:02:50 +0000
@@ -386,7 +386,7 @@
RelativePeriods relatives = new RelativePeriods( reportingMonth, reportingBimonth, reportingQuarter,
monthsThisYear, quartersThisYear, thisYear,
monthsLastYear, quartersLastYear, lastYear,
- last5years, last12Months, last4Quarters );
+ last5years, last12Months, false, last4Quarters, false );
ReportParams reportParams = new ReportParams();