=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElement.java' --- dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElement.java 2015-09-02 05:21:56 +0000 +++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElement.java 2015-09-02 16:15:15 +0000 @@ -322,16 +322,6 @@ } /** - * Returns whether aggregation should be skipped for this data element, based - * on the setting of the data set which this data element is a members of, - * if any. - */ - public boolean isSkipAggregation() - { - return dataSets != null && dataSets.size() > 0 && dataSets.iterator().next().isSkipAggregation(); - } - - /** * Returns the data set of this data element. If this data element has * multiple data sets, the data set with the highest collection frequency is * returned. === modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataset/DataSet.java' --- dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataset/DataSet.java 2015-07-15 09:45:45 +0000 +++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataset/DataSet.java 2015-09-02 16:15:15 +0000 @@ -155,11 +155,6 @@ private int timelyDays; /** - * Indicating whether aggregation should be skipped. - */ - private boolean skipAggregation; - - /** * User group which will receive notifications when data set is marked * complete. */ @@ -634,19 +629,6 @@ @JsonProperty @JsonView( { DetailedView.class, ExportView.class } ) @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 ) - public boolean isSkipAggregation() - { - return skipAggregation; - } - - public void setSkipAggregation( boolean skipAggregation ) - { - this.skipAggregation = skipAggregation; - } - - @JsonProperty - @JsonView( { DetailedView.class, ExportView.class } ) - @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 ) public UserGroup getNotificationRecipients() { return notificationRecipients; @@ -829,7 +811,6 @@ renderAsTabs = dataSet.isRenderAsTabs(); renderHorizontally = dataSet.isRenderHorizontally(); expiryDays = dataSet.getExpiryDays(); - skipAggregation = dataSet.isSkipAggregation(); openFuturePeriods = dataSet.getOpenFuturePeriods(); fieldCombinationRequired = dataSet.isFieldCombinationRequired(); mobile = dataSet.isMobile(); === 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 2015-09-02 14:22:03 +0000 +++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java 2015-09-02 16:15:15 +0000 @@ -158,6 +158,7 @@ executeSql( "ALTER TABLE indicator DROP COLUMN numeratoraggregationtype" ); executeSql( "ALTER TABLE indicator DROP COLUMN denominatoraggregationtype" ); executeSql( "ALTER TABLE dataset DROP COLUMN locked" ); + executeSql( "ALTER TABLE dataset DROP COLUMN skipaggregation" ); executeSql( "ALTER TABLE configuration DROP COLUMN completenessrecipientsid" ); executeSql( "ALTER TABLE dataelement DROP COLUMN alternativename" ); executeSql( "ALTER TABLE indicator DROP COLUMN alternativename" ); === modified file 'dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/dataset/hibernate/DataSet.hbm.xml' --- dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/dataset/hibernate/DataSet.hbm.xml 2015-06-10 20:22:17 +0000 +++ dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/dataset/hibernate/DataSet.hbm.xml 2015-09-02 16:15:15 +0000 @@ -70,8 +70,6 @@ - - === modified file 'dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/DataSetBatchHandler.java' --- dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/DataSetBatchHandler.java 2015-06-10 20:22:17 +0000 +++ dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/DataSetBatchHandler.java 2015-09-02 16:15:15 +0000 @@ -107,7 +107,6 @@ statementBuilder.setColumn( "timelydays" ); statementBuilder.setColumn( "notifycompletinguser" ); statementBuilder.setColumn( "approvedata" ); - statementBuilder.setColumn( "skipaggregation" ); statementBuilder.setColumn( "fieldcombinationrequired" ); statementBuilder.setColumn( "validcompleteonly" ); statementBuilder.setColumn( "novaluerequirescomment" ); @@ -132,7 +131,6 @@ statementBuilder.setValue( dataSet.getTimelyDays() ); statementBuilder.setValue( dataSet.isNotifyCompletingUser() ); statementBuilder.setValue( dataSet.isApproveData() ); - statementBuilder.setValue( dataSet.isSkipAggregation() ); statementBuilder.setValue( dataSet.isFieldCombinationRequired() ); statementBuilder.setValue( dataSet.isValidCompleteOnly() ); statementBuilder.setValue( dataSet.isNoValueRequiresComment() ); === removed file 'dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/filter/DataElementWithAggregationFilter.java' --- dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/filter/DataElementWithAggregationFilter.java 2015-07-04 13:26:05 +0000 +++ dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/filter/DataElementWithAggregationFilter.java 1970-01-01 00:00:00 +0000 @@ -1,47 +0,0 @@ -package org.hisp.dhis.system.filter; - -/* - * Copyright (c) 2004-2015, University of Oslo - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * Neither the name of the HISP project nor the names of its contributors may - * be used to endorse or promote products derived from this software without - * specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -import org.hisp.dhis.dataelement.DataElement; -import org.hisp.dhis.commons.filter.Filter; - -/** - * @author Lars Helge Overland - */ -public class DataElementWithAggregationFilter - implements Filter -{ - public static final DataElementWithAggregationFilter INSTANCE = new DataElementWithAggregationFilter(); - - @Override - public boolean retain( DataElement element ) - { - return element != null && !element.isSkipAggregation(); - } -} === removed file 'dhis-2/dhis-support/dhis-support-system/src/test/java/org/hisp/dhis/system/filter/DataElementWithAggregationFilterTest.java' --- dhis-2/dhis-support/dhis-support-system/src/test/java/org/hisp/dhis/system/filter/DataElementWithAggregationFilterTest.java 2015-08-03 12:34:03 +0000 +++ dhis-2/dhis-support/dhis-support-system/src/test/java/org/hisp/dhis/system/filter/DataElementWithAggregationFilterTest.java 1970-01-01 00:00:00 +0000 @@ -1,77 +0,0 @@ -package org.hisp.dhis.system.filter; - -/* - * Copyright (c) 2004-2015, University of Oslo - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * Neither the name of the HISP project nor the names of its contributors may - * be used to endorse or promote products derived from this software without - * specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; - -import java.util.List; - -import org.hisp.dhis.DhisConvenienceTest; -import org.hisp.dhis.commons.filter.FilterUtils; -import org.hisp.dhis.dataelement.DataElement; -import org.hisp.dhis.dataset.DataSet; -import org.hisp.dhis.period.MonthlyPeriodType; -import org.junit.Test; - -import com.google.common.collect.Lists; - -/** - * @author Lars Helge Overland - */ -public class DataElementWithAggregationFilterTest - extends DhisConvenienceTest -{ - @Test - public void filter() - { - DataElement elA = createDataElement( 'A' ); - DataElement elB = createDataElement( 'B' ); - DataElement elC = createDataElement( 'C' ); - DataElement elD = createDataElement( 'D' ); - - DataSet dataSetA = createDataSet( 'A', new MonthlyPeriodType() ); - dataSetA.setSkipAggregation( false ); - dataSetA.addDataElement( elA ); - dataSetA.addDataElement( elC ); - - DataSet dataSetB = createDataSet( 'A', new MonthlyPeriodType() ); - dataSetB.setSkipAggregation( true ); - dataSetB.addDataElement( elB ); - dataSetB.addDataElement( elD ); - - List list = Lists.newArrayList( elA, elB, elC, elD ); - - FilterUtils.filter( list, new DataElementWithAggregationFilter() ); - - assertEquals( 2, list.size() ); - assertTrue( list.contains( elA ) ); - assertTrue( list.contains( elC ) ); - } -} === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/AddDataSetAction.java' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/AddDataSetAction.java 2015-06-10 20:22:17 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/AddDataSetAction.java 2015-09-02 16:15:15 +0000 @@ -183,13 +183,6 @@ this.approveData = approveData; } - private boolean skipAggregation; - - public void setSkipAggregation( boolean skipAggregation ) - { - this.skipAggregation = skipAggregation; - } - private String frequencySelect; public void setFrequencySelect( String frequencySelect ) @@ -316,7 +309,6 @@ dataSet.setExpiryDays( expiryDays ); dataSet.setTimelyDays( timelyDays ); - dataSet.setSkipAggregation( skipAggregation ); for ( String id : deSelected ) { === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/UpdateDataSetAction.java' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/UpdateDataSetAction.java 2015-06-16 17:38:26 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/UpdateDataSetAction.java 2015-09-02 16:15:15 +0000 @@ -195,13 +195,6 @@ this.approveData = approveData; } - private boolean skipAggregation; - - public void setSkipAggregation( boolean skipAggregation ) - { - this.skipAggregation = skipAggregation; - } - private String frequencySelect; public void setFrequencySelect( String frequencySelect ) @@ -344,7 +337,6 @@ dataSet.setExpiryDays( expiryDays ); dataSet.setTimelyDays( timelyDays ); - dataSet.setSkipAggregation( skipAggregation ); if ( !( equalsNullSafe( name, dataSet.getName() ) && periodType.equals( dataSet.getPeriodType() ) && === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/addDataSet.vm' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/addDataSet.vm 2015-06-15 06:40:45 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/addDataSet.vm 2015-09-02 16:15:15 +0000 @@ -122,15 +122,6 @@ - - - - - - === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/editDataSet.vm' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/editDataSet.vm 2015-06-15 06:40:45 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/editDataSet.vm 2015-09-02 16:15:15 +0000 @@ -126,15 +126,6 @@ - - - - - -