dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #36127
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 18490: Added persistent collapseDataDimensions property to event report and event chart
------------------------------------------------------------
revno: 18490
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2015-03-05 17:29:11 +0100
message:
Added persistent collapseDataDimensions property to event report and event chart
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/EventAnalyticalObject.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/eventchart/EventChart.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/eventreport/EventReport.java
dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/startup/TableAlteror.java
dhis-2/dhis-services/dhis-service-tracker/src/main/resources/org/hisp/dhis/eventchart/EventChart.hbm.xml
dhis-2/dhis-services/dhis-service-tracker/src/main/resources/org/hisp/dhis/eventreport/EventReport.hbm.xml
--
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/common/EventAnalyticalObject.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/EventAnalyticalObject.java 2015-02-18 17:33:23 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/EventAnalyticalObject.java 2015-03-05 16:29:11 +0000
@@ -30,6 +30,7 @@
import java.util.Date;
+import org.hisp.dhis.analytics.AggregationType;
import org.hisp.dhis.analytics.EventOutputType;
import org.hisp.dhis.dataelement.DataElement;
import org.hisp.dhis.program.Program;
@@ -50,9 +51,13 @@
Date getEndDate();
+ AggregationType getAggregationType();
+
EventOutputType getOutputType();
NameableObject getValue();
+
+ boolean isCollapseDataDimensions();
// -------------------------------------------------------------------------
// Base class emulation methods
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/eventchart/EventChart.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/eventchart/EventChart.java 2015-02-26 15:21:29 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/eventchart/EventChart.java 2015-03-05 16:29:11 +0000
@@ -126,6 +126,11 @@
*/
private EventOutputType outputType;
+ /**
+ * Indicates whether to collapse all data dimensions into a single dimension.
+ */
+ private boolean collapseDataDimensions;
+
// -------------------------------------------------------------------------
// Analytical properties
// -------------------------------------------------------------------------
@@ -358,6 +363,19 @@
this.outputType = outputType;
}
+ @JsonProperty
+ @JsonView( { DetailedView.class, ExportView.class, DimensionalView.class } )
+ @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 )
+ public boolean isCollapseDataDimensions()
+ {
+ return collapseDataDimensions;
+ }
+
+ public void setCollapseDataDimensions( boolean collapseDataDimensions )
+ {
+ this.collapseDataDimensions = collapseDataDimensions;
+ }
+
// -------------------------------------------------------------------------
// Analytical properties
// -------------------------------------------------------------------------
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/eventreport/EventReport.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/eventreport/EventReport.java 2015-02-26 15:21:29 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/eventreport/EventReport.java 2015-03-05 16:29:11 +0000
@@ -154,6 +154,11 @@
private EventOutputType outputType;
/**
+ * Indicates whether to collapse all data dimensions into a single dimension.
+ */
+ private boolean collapseDataDimensions;
+
+ /**
* Indicates rendering of empty rows for the table.
*/
private boolean hideEmptyRows;
@@ -471,6 +476,19 @@
@JsonProperty
@JsonView( { DetailedView.class, ExportView.class, DimensionalView.class } )
@JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 )
+ public boolean isCollapseDataDimensions()
+ {
+ return collapseDataDimensions;
+ }
+
+ public void setCollapseDataDimensions( boolean collapseDataDimensions )
+ {
+ this.collapseDataDimensions = collapseDataDimensions;
+ }
+
+ @JsonProperty
+ @JsonView( { DetailedView.class, ExportView.class, DimensionalView.class } )
+ @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 )
public boolean isShowHierarchy()
{
return showHierarchy;
=== modified file 'dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/startup/TableAlteror.java'
--- dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/startup/TableAlteror.java 2015-01-27 13:45:40 +0000
+++ dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/startup/TableAlteror.java 2015-03-05 16:29:11 +0000
@@ -308,6 +308,9 @@
executeSql( "ALTER TABLE period ALTER COLUMN periodid DROP DEFAULT" );
executeSql( "DROP SEQUENCE period_periodid_seq" );
+ executeSql( "update eventreport set collapsedatadimensions = false where collapsedatadimensions is null" );
+ executeSql( "update eventchart set collapsedatadimensions = false where collapsedatadimensions is null" );
+
updateProgramStageList();
updateProgramAttributeList();
=== modified file 'dhis-2/dhis-services/dhis-service-tracker/src/main/resources/org/hisp/dhis/eventchart/EventChart.hbm.xml'
--- dhis-2/dhis-services/dhis-service-tracker/src/main/resources/org/hisp/dhis/eventchart/EventChart.hbm.xml 2015-02-18 17:42:47 +0000
+++ dhis-2/dhis-services/dhis-service-tracker/src/main/resources/org/hisp/dhis/eventchart/EventChart.hbm.xml 2015-03-05 16:29:11 +0000
@@ -144,6 +144,8 @@
</type>
</property>
+ <property name="collapseDataDimensions" />
+
<property name="domainAxisLabel" />
<property name="rangeAxisLabel" />
=== modified file 'dhis-2/dhis-services/dhis-service-tracker/src/main/resources/org/hisp/dhis/eventreport/EventReport.hbm.xml'
--- dhis-2/dhis-services/dhis-service-tracker/src/main/resources/org/hisp/dhis/eventreport/EventReport.hbm.xml 2015-02-18 17:42:47 +0000
+++ dhis-2/dhis-services/dhis-service-tracker/src/main/resources/org/hisp/dhis/eventreport/EventReport.hbm.xml 2015-03-05 16:29:11 +0000
@@ -144,6 +144,8 @@
</type>
</property>
+ <property name="collapseDataDimensions" />
+
<property name="showDimensionLabels" />
<property name="digitGroupSeparator" />