dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #41021
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 20880: Fixed relative period bug in standard report
------------------------------------------------------------
revno: 20880
committer: John Francis Mukulu<john.f.mukulu@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2015-10-27 11:48:36 +0300
message:
Fixed relative period bug in standard report
modified:
dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/AbstractRelativePeriodsAction.java
dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/generateReport.js
dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/relativePeriodsInput.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-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/AbstractRelativePeriodsAction.java'
--- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/AbstractRelativePeriodsAction.java 2015-04-08 22:57:51 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/AbstractRelativePeriodsAction.java 2015-10-27 08:48:36 +0000
@@ -65,6 +65,12 @@
this.lastSixMonth = lastSixMonth;
}
+ protected boolean thisSixMonth;
+
+ public void setThisSixMonth( boolean thisSixMonth )
+ {
+ this.thisSixMonth = thisSixMonth;
+ }
protected boolean monthsThisYear;
public void setMonthsThisYear( boolean monthsThisYear )
@@ -207,7 +213,7 @@
protected RelativePeriods getRelativePeriods()
{
- RelativePeriods relatives = new RelativePeriods( false, reportingMonth, false, reportingBimonth, false, reportingQuarter, false, lastSixMonth,
+ RelativePeriods relatives = new RelativePeriods( reportingMonth, false, reportingBimonth, false, reportingQuarter, false, thisSixMonth, false,
monthsThisYear, quartersThisYear, thisYear,
monthsLastYear, quartersLastYear, lastYear,
last5Years, last12Months, last6Months, last3Months, last6BiMonths, last4Quarters, last2SixMonths,
=== modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/generateReport.js'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/generateReport.js 2013-04-30 09:09:08 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/generateReport.js 2015-10-27 08:48:36 +0000
@@ -39,7 +39,7 @@
if ( MODE_REPORT == mode )
{
- if ( TYPE_HTML == type )
+ if ( TYPE_HTML == type.toLowerCase() )
{
window.location.href= "generateHtmlReport.action?uid=" + uid + "&" + getUrlParams();
}
=== modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/relativePeriodsInput.vm'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/relativePeriodsInput.vm 2013-03-17 14:52:32 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/relativePeriodsInput.vm 2015-10-27 08:48:36 +0000
@@ -1,11 +1,11 @@
<label for="reportingMonth">$i18n.getString( "reporting_month" )</label>
-<input type="checkbox" id="reportingMonth" name="reportingMonth" value="true"#if( $relatives.isReportingMonth() ) checked#end>
+<input type="checkbox" id="reportingMonth" name="reportingMonth" value="true"#if( $relatives.isThisMonth() ) checked#end>
<label for="reportingBimonth">$i18n.getString( "reporting_bimonth" )</label>
-<input type="checkbox" id="reportingBimonth" name="reportingBimonth" value="true"#if( $relatives.isReportingBimonth() ) checked#end>
+<input type="checkbox" id="reportingBimonth" name="reportingBimonth" value="true"#if( $relatives.isThisBimonth() ) checked#end>
<label for="reportingQuarter">$i18n.getString( "reporting_quarter" )</label>
-<input type="checkbox" id="reportingQuarter" name="reportingQuarter" value="true"#if( $relatives.isReportingQuarter() ) checked#end>
-<label for="lastSixMonth">$i18n.getString( "reporting_sixmonth" )</label>
-<input type="checkbox" id="lastSixMonth" name="lastSixMonth" value="true"#if( $relatives.isLastSixMonth() ) checked#end><br><br>
+<input type="checkbox" id="reportingQuarter" name="reportingQuarter" value="true"#if( $relatives.isThisQuarter() ) checked#end>
+<label for="thisSixMonth">$i18n.getString( "reporting_sixmonth" )</label>
+<input type="checkbox" id="thisSixMonth" name="thisSixMonth" value="true"#if( $relatives.isThisSixMonth() ) checked#end><br><br>
<label for="monthsThisYear">$i18n.getString( "months_this_year" )</label>
<input type="checkbox" id="monthsThisYear" name="monthsThisYear" value="true""#if( $relatives.isMonthsThisYear() ) checked#end>