← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 7678: Add new relative last-3-months period and include it in report table and data visualizer.

 

------------------------------------------------------------
revno: 7678
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2012-07-24 11:04:14 +0700
message:
  Add new relative last-3-months period and include it in report table and data visualizer.
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/period/RelativePeriods.java
  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/java/org/hisp/dhis/scheduling/SchedulingManager.java
  dhis-2/dhis-services/dhis-service-reporting/src/main/resources/META-INF/dhis/beans.xml
  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/reporttable/hibernate/ReportTable.hbm.xml
  dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/relativePeriods.xsl
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/commons.js
  dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/compareToExistingForm.vm
  dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/matchToExistingForm.vm
  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/resources/org/hisp/dhis/reporting/i18n_module.properties
  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/InitializeAction.java
  dhis-2/dhis-web/dhis-web-visualizer/src/main/resources/org/hisp/dhis/visualizer/i18n_module.properties
  dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/scripts/app.js
  dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/i18n.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-api/src/main/java/org/hisp/dhis/period/RelativePeriods.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/period/RelativePeriods.java	2012-07-23 19:02:02 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/period/RelativePeriods.java	2012-07-24 04:04:14 +0000
@@ -102,6 +102,11 @@
         "month11",
         "month12"};
 
+    public static final String[] MONTHS_LAST_3 = {
+        "lastmonth1",
+        "lastmonth2",
+        "lastmonth3"};
+
     public static final String[] BIMONTHS_LAST_6 = {
         "bimonth1",
         "bimonth2",
@@ -172,6 +177,8 @@
     private boolean last5Years = false;
 
     private boolean last12Months = false;
+    
+    private boolean last3Months = false;
 
     private boolean last6BiMonths = false;
 
@@ -207,6 +214,7 @@
      * @param lastYear         last year
      * @param last5Years       last 5 years
      * @param last12Months     last 12 months
+     * @param last3Months      last 3 months
      * @param last6BiMonths    last 6 bi-months
      * @param last4Quarters    last 4 quarters
      * @param last2SixMonths   last 2 six-months
@@ -214,7 +222,7 @@
     public RelativePeriods( boolean reportingMonth, boolean reportingBimonth, boolean reportingQuarter, boolean lastSixMonth,
                             boolean monthsThisYear, boolean quartersThisYear, boolean thisYear,
                             boolean monthsLastYear, boolean quartersLastYear, boolean lastYear, boolean last5Years,
-                            boolean last12Months, boolean last6BiMonths, boolean last4Quarters, boolean last2SixMonths,
+                            boolean last12Months, boolean last3Months, boolean last6BiMonths, boolean last4Quarters, boolean last2SixMonths,
                             boolean thisFinancialYear, boolean lastFinancialYear, boolean last5FinancialYears, boolean last52Weeks )
     {
         this.reportingMonth = reportingMonth;
@@ -229,6 +237,7 @@
         this.lastYear = lastYear;
         this.last5Years = last5Years;
         this.last12Months = last12Months;
+        this.last3Months = last3Months;
         this.last6BiMonths = last6BiMonths;
         this.last4Quarters = last4Quarters;
         this.last2SixMonths = last2SixMonths;
@@ -259,6 +268,7 @@
         this.lastYear = false;
         this.last5Years = false;
         this.last12Months = false;
+        this.last3Months = false;
         this.last6BiMonths = false;
         this.last4Quarters = false;
         this.last2SixMonths = false;
@@ -282,7 +292,7 @@
             return PeriodType.getPeriodTypeByName( WeeklyPeriodType.NAME );
         }
         
-        if ( isReportingMonth() || isLast12Months() )
+        if ( isReportingMonth() || isLast12Months() || isLast3Months() )
         {
             return PeriodType.getPeriodTypeByName( MonthlyPeriodType.NAME );
         }
@@ -472,6 +482,11 @@
             periods.addAll( getRollingRelativePeriodList( new MonthlyPeriodType(), MONTHS_LAST_12, date, dynamicNames, format ) );
         }
 
+        if ( isLast3Months() )
+        {
+           periods.addAll( getRollingRelativePeriodList( new MonthlyPeriodType(), MONTHS_LAST_3, date, dynamicNames, format ) );
+        }
+        
         if ( isLast6BiMonths() )
         {
             periods.addAll( getRollingRelativePeriodList( new BiMonthlyPeriodType(), BIMONTHS_LAST_6, date, dynamicNames, format ) );
@@ -622,10 +637,10 @@
         List<Period> periods = new ArrayList<Period>();
 
         int c = 0;
-
-        for ( Period period : relatives )
+        int index =  relatives.size() - periodNames.length;
+        for ( int i= index; i< relatives.size();i++ )
         {
-            periods.add( setName( period, periodNames[c++], dynamicNames, format ) );
+            periods.add( setName( relatives.get( i ), periodNames[c++], dynamicNames, format ) );
         }
 
         return periods;
@@ -851,6 +866,18 @@
         this.last12Months = last12Months;
         return this;
     }
+    
+    @JsonProperty
+    @JacksonXmlProperty( namespace = Dxf2Namespace.NAMESPACE )
+    public boolean isLast3Months()
+    {
+        return last3Months;
+    }
+
+    public void setLast3Months( boolean last3Months )
+    {
+        this.last3Months = last3Months;
+    }
 
     @JsonProperty
     @JacksonXmlProperty( namespace = Dxf2Namespace.NAMESPACE )
@@ -966,6 +993,7 @@
         result = prime * result + (lastYear ? 1 : 0);
         result = prime * result + (last5Years ? 1 : 0);
         result = prime * result + (last12Months ? 1 : 0);
+        result = prime * result + (last3Months ? 1 : 0);
         result = prime * result + (last6BiMonths ? 1 : 0);
         result = prime * result + (last4Quarters ? 1 : 0);
         result = prime * result + (last2SixMonths ? 1 : 0);
@@ -1056,6 +1084,11 @@
         {
             return false;
         }
+        
+        if ( !last3Months == other.last3Months )
+        {
+            return false;
+        }
 
         if ( !last6BiMonths == other.last6BiMonths )
         {

=== 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-07-23 10:50:58 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java	2012-07-24 04:04:14 +0000
@@ -296,7 +296,6 @@
         
         // remove outdated relative periods
         
-        executeSql( "ALTER TABLE reporttable DROP COLUMN last3months" );
         executeSql( "ALTER TABLE reporttable DROP COLUMN last6months" );
         executeSql( "ALTER TABLE reporttable DROP COLUMN last9months" );
         executeSql( "ALTER TABLE reporttable DROP COLUMN sofarthisyear" );
@@ -308,7 +307,6 @@
         executeSql( "ALTER TABLE reporttable DROP COLUMN individualmonthsthisyear" );
         executeSql( "ALTER TABLE reporttable DROP COLUMN individualquartersthisyear" );
 
-        executeSql( "ALTER TABLE chart DROP COLUMN last3months" );
         executeSql( "ALTER TABLE chart DROP COLUMN last6months" );
         executeSql( "ALTER TABLE chart DROP COLUMN last9months" );
         executeSql( "ALTER TABLE chart DROP COLUMN sofarthisyear" );
@@ -403,6 +401,7 @@
         executeSql( "update reporttable set lastsixmonth = false where lastsixmonth is null" );
         executeSql( "update reporttable set last4quarters = false where last4quarters is null" );
         executeSql( "update reporttable set last12months = false where last12months is null" );
+		executeSql( "update reporttable set last3months = false where last3months is null" );
         executeSql( "update reporttable set last6bimonths = false where last6bimonths is null" );
         executeSql( "update reporttable set last4quarters = false where last4quarters is null" );
         executeSql( "update reporttable set last2sixmonths = false where last2sixmonths is null" );
@@ -422,9 +421,9 @@
         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 last3months = false where last3months 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" );
         executeSql( "update chart set last6bimonths = false where last6bimonths is null" );
         executeSql( "update chart set last4quarters = false where last4quarters is null" );
         executeSql( "update chart set last2sixmonths = false where last2sixmonths is null" );

=== modified file 'dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/scheduling/SchedulingManager.java'
--- dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/scheduling/SchedulingManager.java	2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/scheduling/SchedulingManager.java	2012-07-24 04:04:14 +0000
@@ -35,6 +35,7 @@
 public interface SchedulingManager
 {
     final String TASK_DATAMART_LAST_12_MONTHS = "dataMartLast12MonthsTask";
+    final String TASK_DATAMART_LAST_3_MONTHS = "dataMartLast3MonthsTask";
     final String TASK_DATAMART_LAST_6_MONTS = "dataMartLast6MonthsTask";
     final String TASK_DATAMART_FROM_6_TO_12_MONTS = "dataMartFrom6To12MonthsTask";
     

=== modified file 'dhis-2/dhis-services/dhis-service-reporting/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-services/dhis-service-reporting/src/main/resources/META-INF/dhis/beans.xml	2012-07-20 07:04:42 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/main/resources/META-INF/dhis/beans.xml	2012-07-24 04:04:14 +0000
@@ -267,6 +267,7 @@
     <property name="tasks">
       <map>
         <entry key="dataMartLast12MonthsTask" value-ref="dataMartLast12MonthsTask" />
+		<entry key="dataMartLast3MonthsTask" value-ref="dataMartLast3MonthsTask" />
 		<entry key="dataMartLast6MonthsTask" value-ref="dataMartLast6MonthsTask" />
 		<entry key="dataMartFrom6To12MonthsTask" value-ref="dataMartFrom6To12MonthsTask" />
       </map>
@@ -289,6 +290,10 @@
 	<property name="last6Months" value="true"/>
 	<property name="last6To12Months" value="true"/>
   </bean>
+  
+  <bean id="dataMartLast3MonthsTask" class="org.hisp.dhis.system.scheduling.DataMartTask" parent="abstractDataMartTask">
+	<property name="last6Months" value="true"/>
+  </bean>
     
   <bean id="dataMartLast6MonthsTask" class="org.hisp.dhis.system.scheduling.DataMartTask" parent="abstractDataMartTask">
 	<property name="last6Months" value="true"/>

=== 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-07-23 10:50:58 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/chart/hibernate/Chart.hbm.xml	2012-07-24 04:04:14 +0000
@@ -95,6 +95,7 @@
       <property name="lastSixMonth" />
       <property name="thisYear" />
       <property name="last12Months" />
+      <property name="last3Months" />
       <property name="last4Quarters" />
       <property name="last2SixMonths" />
       <property name="lastYear" />

=== modified file 'dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/reporttable/hibernate/ReportTable.hbm.xml'
--- dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/reporttable/hibernate/ReportTable.hbm.xml	2012-05-17 09:11:30 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/reporttable/hibernate/ReportTable.hbm.xml	2012-07-24 04:04:14 +0000
@@ -90,6 +90,7 @@
       <property name="lastYear" />
       <property name="last5Years" />
       <property name="last12Months" />
+      <property name="last3Months" />
       <property name="last4Quarters" />
       <property name="last2SixMonths" />
       <property name="thisFinancialYear" />

=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/relativePeriods.xsl'
--- dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/relativePeriods.xsl	2012-03-27 20:10:41 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/relativePeriods.xsl	2012-07-24 04:04:14 +0000
@@ -45,6 +45,10 @@
         <td>last12Months</td>
         <td> <xsl:value-of select="d:last12Months"/> </td>
       </tr>
+	  <tr>
+        <td>last3Months</td>
+        <td> <xsl:value-of select="d:last3Months"/> </td>
+      </tr>
       <tr>
         <td>last6BiMonths</td>
         <td> <xsl:value-of select="d:last6BiMonths"/> </td>

=== 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	2012-07-09 08:35:46 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/commons.js	2012-07-24 04:04:14 +0000
@@ -1460,6 +1460,7 @@
          isChecked( "lastYear" ) ||
          isChecked( "last5Years" ) ||
          isChecked( "last12Months" ) ||
+         isChecked( "last3Months" ) ||
          isChecked( "last6BiMonths" ) ||
          isChecked( "last4Quarters" ) ||
          isChecked( "last2SixMonths" ) ||

=== modified file 'dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/compareToExistingForm.vm'
--- dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/compareToExistingForm.vm	2011-04-24 12:47:31 +0000
+++ dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/compareToExistingForm.vm	2012-07-24 04:04:14 +0000
@@ -154,6 +154,7 @@
 	#compareBoolProperty( $importObject.object.last3Months $importObject.compareObject.last3Months "last_3_months" )
 	#compareBoolProperty( $importObject.object.last6Months $importObject.compareObject.last6Months "last_6_months" )
 	#compareBoolProperty( $importObject.object.last12Months $importObject.compareObject.last12Months "last_12_months" )
+	#compareBoolProperty( $importObject.object.last3Months $importObject.compareObject.last12Months "last_3_months" )
 	#compareBoolProperty( $importObject.object.soFarThisYear $importObject.compareObject.soFarThisYear "so_far_this_year" )
 	#compareBoolProperty( $importObject.object.last3To6Months $importObject.compareObject.last3To6Months "last_3_to_6_months" )
 	#compareBoolProperty( $importObject.object.last6To9Months $importObject.compareObject.last6To9Months "last_6_to_9_months" )

=== modified file 'dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/matchToExistingForm.vm'
--- dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/matchToExistingForm.vm	2011-07-14 08:37:00 +0000
+++ dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/matchToExistingForm.vm	2012-07-24 04:04:14 +0000
@@ -147,6 +147,7 @@
 	#displayBoolProperty( "last_3_months" $importObject.object.last3Months )
 	#displayBoolProperty( "last_6_months" $importObject.object.last6Months )
 	#displayBoolProperty( "last_12_months" $importObject.object.last12Months )
+	#displayBoolProperty( "last_3_months" $importObject.object.last3Months )
 	#displayBoolProperty( "so_far_this_year" $importObject.object.soFarThisYear )
 	#displayBoolProperty( "last_3_to_6_months" $importObject.object.last3To6Months )
 	#displayBoolProperty( "last_6_to_9_months" $importObject.object.last3To6Months )

=== 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	2012-05-08 18:53:35 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/tablecreator/action/SaveTableAction.java	2012-07-24 04:04:14 +0000
@@ -362,6 +362,13 @@
     {
         this.paramLeafParentOrganisationUnit = paramLeafParentOrganisationUnit;
     }
+    
+    private boolean last3Months;
+    
+    public void setLast3Months( boolean last3Months )
+    {
+        this.last3Months = last3Months;
+    }
 
     private boolean paramGrandParentOrganisationUnit;
     
@@ -438,7 +445,7 @@
         RelativePeriods relatives = new RelativePeriods( reportingMonth, reportingBimonth, reportingQuarter, lastSixMonth,
             monthsThisYear, quartersThisYear, thisYear, 
             monthsLastYear, quartersLastYear, lastYear, 
-            last5Years, last12Months, false, last4Quarters, last2SixMonths,
+            last5Years, last12Months, last3Months, false, last4Quarters, last2SixMonths,
             thisFinancialYear, lastFinancialYear, last5FinancialYears, false );
         
         ReportParams reportParams = new ReportParams();

=== 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	2012-05-31 20:29:41 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/resources/org/hisp/dhis/reporting/i18n_module.properties	2012-07-24 04:04:14 +0000
@@ -218,4 +218,5 @@
 write_your_interpretation=Write your interpretation
 share=Share
 share_your_interpretation=Share your interpretation
-interpretation_was_shared=Interpretation was shared
\ No newline at end of file
+interpretation_was_shared=Interpretation was shared
+last_3_months = Last 3 months
\ No newline at end of file

=== 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-07-10 20:17:04 +0000
+++ dhis-2/dhis-web/dhis-web-visualizer/src/main/java/org/hisp/dhis/visualizer/action/AddOrUpdateChartAction.java	2012-07-24 04:04:14 +0000
@@ -201,6 +201,13 @@
     {
         this.last12Months = last12Months;
     }
+    
+    private boolean last3Months;
+
+    public void setLast3Months( boolean last3Months )
+    {
+        this.last3Months = last3Months;
+    }
 
     private boolean lastQuarter;
 
@@ -429,12 +436,13 @@
             }
         }
 
-        if ( lastMonth || last12Months || lastQuarter || last4Quarters || lastSixMonth || last2SixMonths || thisYear
+        if ( lastMonth || last12Months|| last3Months || lastQuarter || last4Quarters || lastSixMonth || last2SixMonths || thisYear
             || lastYear || last5Years )
         {
             RelativePeriods rp = new RelativePeriods();
             rp.setReportingMonth( lastMonth );
             rp.setLast12Months( last12Months );
+            rp.setLast3Months( last3Months );
             rp.setReportingQuarter( lastQuarter );
             rp.setLast4Quarters( last4Quarters );
             rp.setLastSixMonth( lastSixMonth );

=== modified file 'dhis-2/dhis-web/dhis-web-visualizer/src/main/java/org/hisp/dhis/visualizer/action/InitializeAction.java'
--- dhis-2/dhis-web/dhis-web-visualizer/src/main/java/org/hisp/dhis/visualizer/action/InitializeAction.java	2012-06-26 11:51:38 +0000
+++ dhis-2/dhis-web/dhis-web-visualizer/src/main/java/org/hisp/dhis/visualizer/action/InitializeAction.java	2012-07-24 04:04:14 +0000
@@ -112,6 +112,13 @@
     {
         return last12Months;
     }
+    
+    private List<Period> last3Months;
+
+    public List<Period> getLast3Months()
+    {
+        return last3Months;
+    }
 
     private List<Period> lastQuarter;
 
@@ -186,6 +193,9 @@
         rp.clear().setLast12Months( true );
         last12Months = periodService.reloadPeriods( setNames( rp.getRelativePeriods() ) );
 
+        rp.clear().setLast3Months( true );
+        last3Months = periodService.reloadPeriods( setNames( rp.getRelativePeriods() ) );
+
         rp.clear().setReportingQuarter( true );
         lastQuarter = periodService.reloadPeriods( setNames( rp.getRelativePeriods() ) );
 

=== modified file 'dhis-2/dhis-web/dhis-web-visualizer/src/main/resources/org/hisp/dhis/visualizer/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-visualizer/src/main/resources/org/hisp/dhis/visualizer/i18n_module.properties	2012-07-18 14:27:53 +0000
+++ dhis-2/dhis-web/dhis-web-visualizer/src/main/resources/org/hisp/dhis/visualizer/i18n_module.properties	2012-07-24 04:04:14 +0000
@@ -135,4 +135,5 @@
 groups_replace_orgunits = Note: Groups will replace the selected organisation units
 fixed_periods = Fixed periods
 relative_periods = Relative periods
-select_type = Select type
\ No newline at end of file
+select_type = Select type
+last_3_months = Last 3 months
\ No newline at end of file

=== modified file 'dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/scripts/app.js'
--- dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/scripts/app.js	2012-07-23 11:46:49 +0000
+++ dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/scripts/app.js	2012-07-24 04:04:14 +0000
@@ -195,6 +195,7 @@
 			lastYear: 1,
 			last5Years: 5,
 			last12Months: 12,
+			last3Months: 3,
 			last4Quarters: 4,
 			last2SixMonths: 2,
 			reportingMonth: 1,
@@ -3178,13 +3179,18 @@
 																paramName: 'last12Months',
 																boxLabel: DV.i18n.last_12_months,
 																checked: true
+															},
+															{
+																xtype: 'checkbox',
+																paramName: 'last3Months',
+																boxLabel: DV.i18n.last_3_months
 															}
 														]
 													},
 													{
 														xtype: 'panel',
 														layout: 'anchor',
-														bodyStyle: 'border-style:none; padding:0 0 0 32px',
+														bodyStyle: 'border-style:none; padding:0 0 0 15px',
 														defaults: {
 															labelSeparator: '',
 															listeners: {
@@ -3216,7 +3222,7 @@
 													{
 														xtype: 'panel',
 														layout: 'anchor',
-														bodyStyle: 'border-style:none; padding:0 0 0 32px',
+														bodyStyle: 'border-style:none; padding:0 0 0 15px',
 														defaults: {
 															labelSeparator: '',
 															listeners: {
@@ -3292,7 +3298,7 @@
 													{
 														xtype: 'panel',
 														layout: 'anchor',
-														bodyStyle: 'border-style:none; padding:5px 0 0 46px',
+														bodyStyle: 'border-style:none; padding:5px 0 0 15px',
 														defaults: {
 															labelSeparator: ''
 														},

=== modified file 'dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/i18n.vm'
--- dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/i18n.vm	2012-07-10 20:17:04 +0000
+++ dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/i18n.vm	2012-07-24 04:04:14 +0000
@@ -134,6 +134,6 @@
 groups_replace_orgunits:'$encoder.jsEscape($i18n.getString( 'groups_replace_orgunits' ) , "'")',
 fixed_periods:'$encoder.jsEscape($i18n.getString( 'fixed_periods' ) , "'")',
 relative_periods:'$encoder.jsEscape($i18n.getString( 'relative_periods' ) , "'")',
-select_type:'$encoder.jsEscape($i18n.getString( 'select_type' ) , "'")'
-
+select_type:'$encoder.jsEscape($i18n.getString( 'select_type' ) , "'")',
+last_3_months:'$encoder.jsEscape($i18n.getString( 'last_3_months' ) , "'")'
 };