=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementCategoryOptionCombo.java' --- dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementCategoryOptionCombo.java 2015-03-10 14:11:07 +0000 +++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementCategoryOptionCombo.java 2015-04-07 10:51:20 +0000 @@ -77,6 +77,11 @@ */ @Scanned private Set categoryOptions = new HashSet<>(); + + /** + * Indicates whether to ignore data approval. + */ + private boolean ignoreApproval; // ------------------------------------------------------------------------- // Transient properties @@ -361,7 +366,7 @@ @Override public void setShortName( String shortName ) { - // throw new UnsupportedOperationException( "Cannot set shortName on DataElementCategoryOptionCombo: " + shortName ); + // Not supported } @JsonProperty @@ -393,6 +398,18 @@ this.categoryOptions = categoryOptions; } + @JsonProperty + @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 ) + public boolean isIgnoreApproval() + { + return ignoreApproval; + } + + public void setIgnoreApproval( boolean ignoreApproval ) + { + this.ignoreApproval = ignoreApproval; + } + @Override public void mergeWith( IdentifiableObject other, MergeStrategy strategy ) { === 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-04-03 15:32:17 +0000 +++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java 2015-04-07 10:51:20 +0000 @@ -809,6 +809,8 @@ executeSql( "UPDATE attributevalue SET lastupdated=now() WHERE lastupdated IS NULL" ); executeSql( "update dashboarditem set shape = 'normal' where shape is null" ); + + executeSql( "update categoryoptioncombo set ignoreapproval = false where ignoreapproval is null" ); upgradeDataValuesWithAttributeOptionCombo(); upgradeCompleteDataSetRegistrationsWithAttributeOptionCombo(); === modified file 'dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/dataelement/hibernate/DataElementCategoryOptionCombo.hbm.xml' --- dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/dataelement/hibernate/DataElementCategoryOptionCombo.hbm.xml 2014-03-11 11:05:18 +0000 +++ dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/dataelement/hibernate/DataElementCategoryOptionCombo.hbm.xml 2015-04-07 10:51:20 +0000 @@ -27,6 +27,8 @@ foreign-key="fk_categoryoptioncombo_categoryoptionid" /> + + === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/category/UpdateCategoryOptionComboAction.java' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/category/UpdateCategoryOptionComboAction.java 2015-03-11 11:01:16 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/category/UpdateCategoryOptionComboAction.java 2015-04-07 10:51:20 +0000 @@ -71,6 +71,13 @@ this.code = code; } + private boolean ignoreApproval; + + public void setIgnoreApproval( boolean ignoreApproval ) + { + this.ignoreApproval = ignoreApproval; + } + // ------------------------------------------------------------------------- // Action implementation // ------------------------------------------------------------------------- @@ -81,6 +88,7 @@ DataElementCategoryOptionCombo optionCombo = categoryService.getDataElementCategoryOptionCombo( id ); optionCombo.setCode( StringUtils.trimToNull( code ) ); + optionCombo.setIgnoreApproval( ignoreApproval ); categoryService.updateDataElementCategoryOptionCombo( optionCombo ); === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/org/hisp/dhis/dd/i18n_module.properties' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/org/hisp/dhis/dd/i18n_module.properties 2015-01-24 11:55:10 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/org/hisp/dhis/dd/i18n_module.properties 2015-04-07 10:51:20 +0000 @@ -239,4 +239,5 @@ average_sum_in_org_unit_hierarchy=Average (sum in org unit hierarchy) approve_data=Approve data decimals_in_data_output=Decimals in data output -categories = Categories \ No newline at end of file +categories = Categories +ignore_data_approval=Ignore data approval \ No newline at end of file === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/multidimensional/updateCategoryOptionCombo.vm' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/multidimensional/updateCategoryOptionCombo.vm 2014-09-12 14:17:36 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/multidimensional/updateCategoryOptionCombo.vm 2015-04-07 10:51:20 +0000 @@ -28,6 +28,15 @@ + + + + + +