dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #14656
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 5054: Added new relative periods to report table
Merge authors:
Lars Helge Øverland (larshelge)
------------------------------------------------------------
revno: 5054 [merge]
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2011-10-27 18:28:51 +0200
message:
Added new relative periods to report table
modified:
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java
dhis-2/dhis-services/dhis-service-datamart-default/src/main/java/org/hisp/dhis/datamart/engine/DefaultDataMartEngine.java
dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/reporttable/hibernate/ReportTable.hbm.xml
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/commons.js
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-reporting/src/main/webapp/dhis-web-reporting/addTableForm.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 2011-10-12 12:42:13 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java 2011-10-27 12:08:07 +0000
@@ -233,7 +233,6 @@
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 last12months" );
executeSql( "ALTER TABLE reporttable DROP COLUMN sofarthisyear" );
executeSql( "ALTER TABLE reporttable DROP COLUMN sofarthisfinancialyear" );
executeSql( "ALTER TABLE reporttable DROP COLUMN last3to6months" );
=== modified file 'dhis-2/dhis-services/dhis-service-datamart-default/src/main/java/org/hisp/dhis/datamart/engine/DefaultDataMartEngine.java'
--- dhis-2/dhis-services/dhis-service-datamart-default/src/main/java/org/hisp/dhis/datamart/engine/DefaultDataMartEngine.java 2011-10-22 08:41:00 +0000
+++ dhis-2/dhis-services/dhis-service-datamart-default/src/main/java/org/hisp/dhis/datamart/engine/DefaultDataMartEngine.java 2011-10-27 12:46:11 +0000
@@ -260,21 +260,19 @@
clock.logTime( "Dropped potential indexes" );
// ---------------------------------------------------------------------
- // Delete existing aggregated data
+ // Delete existing aggregated datavalues
// ---------------------------------------------------------------------
if ( completeExport )
{
aggregatedDataValueService.deleteAggregatedDataValues( periodIds );
- aggregatedDataValueService.deleteAggregatedIndicatorValues( periodIds );
}
else
{
aggregatedDataValueService.deleteAggregatedDataValues( dataElementIds, periodIds, organisationUnitIds );
- aggregatedDataValueService.deleteAggregatedIndicatorValues( indicatorIds, periodIds, organisationUnitIds );
}
- clock.logTime( "Deleted existing aggregated data" );
+ clock.logTime( "Deleted existing aggregated datavalues" );
// ---------------------------------------------------------------------
// Export data element values
@@ -305,6 +303,21 @@
crossTabService.dropCrossTabTable( key );
clock.logTime( "Dropped crosstab table" );
+
+ // ---------------------------------------------------------------------
+ // Delete existing aggregated indicatorvalues
+ // ---------------------------------------------------------------------
+
+ if ( completeExport )
+ {
+ aggregatedDataValueService.deleteAggregatedIndicatorValues( periodIds );
+ }
+ else
+ {
+ aggregatedDataValueService.deleteAggregatedIndicatorValues( indicatorIds, periodIds, organisationUnitIds );
+ }
+
+ clock.logTime( "Deleted existing aggregated indicatorvalues" );
// ---------------------------------------------------------------------
// Export indicator values
=== 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 2011-09-16 09:29:21 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/reporttable/hibernate/ReportTable.hbm.xml 2011-10-27 12:08:07 +0000
@@ -78,6 +78,9 @@
<property name="monthsLastYear" />
<property name="quartersLastYear" />
<property name="lastYear" />
+ <property name="last5Years" />
+ <property name="last12Months" />
+ <property name="last4Quarters" />
</component>
<component name="reportParams">
=== 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 2011-10-06 15:39:08 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/commons.js 2011-10-27 12:08:07 +0000
@@ -1394,7 +1394,10 @@
isChecked( "thisYear" ) ||
isChecked( "monthsLastYear" ) ||
isChecked( "quartersLastYear" ) ||
- isChecked( "lastYear" ) )
+ isChecked( "lastYear" ) ||
+ isChecked( "last5Years" ) ||
+ isChecked( "last12Months" ) ||
+ isChecked( "last4Quarters" ) )
{
return true;
}
=== 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-23 12:03:50 +0000
+++ 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
@@ -270,12 +270,33 @@
this.quartersLastYear = quartersLastYear;
}
+ private boolean last5years;
+
+ public void setLast5years( boolean last5years )
+ {
+ this.last5years = last5years;
+ }
+
private boolean lastYear;
public void setLastYear( boolean lastYear )
{
this.lastYear = lastYear;
}
+
+ private boolean last12Months;
+
+ public void setLast12Months( boolean last12Months )
+ {
+ this.last12Months = last12Months;
+ }
+
+ private boolean last4Quarters;
+
+ public void setLast4Quarters( boolean last4Quarters )
+ {
+ this.last4Quarters = last4Quarters;
+ }
private boolean paramReportingMonth;
@@ -364,7 +385,8 @@
RelativePeriods relatives = new RelativePeriods( reportingMonth, reportingBimonth, reportingQuarter,
monthsThisYear, quartersThisYear, thisYear,
- monthsLastYear, quartersLastYear, lastYear, false, false, false );
+ monthsLastYear, quartersLastYear, lastYear,
+ last5years, last12Months, last4Quarters );
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 2011-10-20 11:23:55 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/resources/org/hisp/dhis/reporting/i18n_module.properties 2011-10-27 12:08:07 +0000
@@ -401,4 +401,7 @@
reporting_bimonth = Reporting bimonth
reporting_quarter = Reporting quarter
include_organisation_unit_group_sets = Include org unit group sets param
-reporting_period = Reporting period
\ No newline at end of file
+reporting_period = Reporting period
+last_5_years = Last 5 years
+last_12_months = Last 12 months
+last_4_quarters = Last 4 quarters
\ No newline at end of file
=== modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/addTableForm.vm'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/addTableForm.vm 2011-09-16 09:29:21 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/addTableForm.vm 2011-10-27 12:08:07 +0000
@@ -426,7 +426,14 @@
<label for="quartersLastYear">$i18n.getString( "quarters_last_year" )</label>
<input type="checkbox" id="quartersLastYear" name="quartersLastYear" value="true"#if( $reportTable.relatives.isQuartersLastYear() ) checked#end>
<label for="lastYear">$i18n.getString( "last_year" )</label>
- <input type="checkbox" id="lastYear" name="lastYear" value="true"#if( $reportTable.relatives.isLastYear() ) checked#end>
+ <input type="checkbox" id="lastYear" name="lastYear" value="true"#if( $reportTable.relatives.isLastYear() ) checked#end><br><br>
+
+ <label for="last5years">$i18n.getString( "last_5_years" )</label>
+ <input type="checkbox" id="last5years" name="last5years" value="true"#if( $reportTable.relatives.isLast5Years() ) checked#end>
+ <label for="last12Months">$i18n.getString( "last_12_months" )</label>
+ <input type="checkbox" id="last12Months" name="last12Months" value="true"#if( $reportTable.relatives.isLast12Months() ) checked#end>
+ <label for="last4Quarters">$i18n.getString( "last_4_quarters" )</label>
+ <input type="checkbox" id="last4Quarters" name="last4Quarters" value="true"#if( $reportTable.relatives.isLast4Quarters() ) checked#end>
</td>
</tr>
<tr>
@@ -449,11 +456,8 @@
<label for="paramLeafParentOrganisationUnit">$i18n.getString( "leaf_parent_organisation_unit" )</label>
<input type="checkbox" id="paramLeafParentOrganisationUnit" name="paramLeafParentOrganisationUnit" value="true"#if( $reportTable.reportParams.isParamLeafParentOrganisationUnit() ) checked#end>
<label for="paramGrandParentOrganisationUnit">$i18n.getString( "grand_parent_organisation_unit" )</label>
- <input type="checkbox" id="paramGrandParentOrganisationUnit" name="paramGrandParentOrganisationUnit" value="true"#if( $reportTable.reportParams.isParamGrandParentOrganisationUnit() ) checked#end>
- </td>
- </tr>
- <tr>
- <td>
+ <input type="checkbox" id="paramGrandParentOrganisationUnit" name="paramGrandParentOrganisationUnit" value="true"#if( $reportTable.reportParams.isParamGrandParentOrganisationUnit() ) checked#end><br><br>
+
<label for="paramParentOrganisationUnit">$i18n.getString( "parent_organisation_unit" )</label>
<input type="checkbox" id="paramParentOrganisationUnit" name="paramParentOrganisationUnit" value="true"#if( $reportTable.reportParams.isParamParentOrganisationUnit() ) checked#end>
<label for="paramOrganisationUnit">$i18n.getString( "organisation_unit" )</label>