dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #15585
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 5679: Data mart, minor fix related to relative periods
------------------------------------------------------------
revno: 5679
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2012-01-09 08:21:44 +0100
message:
Data mart, minor fix related to relative periods
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/period/RelativePeriods.java
dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/scheduling/DataMartTask.java
dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/util/StreamActionSupport.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/RelativePeriods.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/period/RelativePeriods.java 2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/period/RelativePeriods.java 2012-01-09 07:21:44 +0000
@@ -303,6 +303,16 @@
}
/**
+ * Gets a list of Periods relative to current date.
+ *
+ * @param months the number of months to subtract from the current date.
+ */
+ public List<Period> getRelativePeriods( int months )
+ {
+ return getRelativePeriods( getDate( months, new Date() ), null, false );
+ }
+
+ /**
* Gets a list of Periods based on the given input and the state of this
* RelativePeriods. The current date is set to todays date minus one month.
*
=== 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-12-26 10:07:59 +0000
+++ dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/scheduling/DataMartTask.java 2012-01-09 07:21:44 +0000
@@ -127,7 +127,7 @@
Set<String> periodTypes = (Set<String>) systemSettingManager.getSystemSetting( KEY_SCHEDULED_PERIOD_TYPES, DEFAULT_SCHEDULED_PERIOD_TYPES );
- List<Period> periods = new RelativePeriods().getRelativePeriods( periodTypes ).getRelativePeriods();
+ List<Period> periods = new RelativePeriods().getRelativePeriods( periodTypes ).getRelativePeriods( 0 );
final Date date = new Cal().now().subtract( Calendar.MONTH, 6 ).time();
=== modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/util/StreamActionSupport.java'
--- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/util/StreamActionSupport.java 2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/util/StreamActionSupport.java 2012-01-09 07:21:44 +0000
@@ -65,7 +65,7 @@
ContextUtils.configureResponse( response, contentType, disallowCache, filename, attachment );
- log.info( "Content type: " + contentType + ", disallow cache: " +
+ log.debug( "Content type: " + contentType + ", disallow cache: " +
disallowCache + ", filename: " + filename + ", attachment: " + attachment );
try