=== 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 2012-09-18 16:20:20 +0000 +++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataset/DataSet.java 2012-09-19 16:14:28 +0000 @@ -153,6 +153,11 @@ */ private boolean fieldCombinationRequired; + /** + * Property indicating that all validation rules must pass before the form can be completed. + */ + private boolean validCompleteOnly; + // ------------------------------------------------------------------------- // Contructors // ------------------------------------------------------------------------- @@ -567,6 +572,19 @@ this.fieldCombinationRequired = fieldCombinationRequired; } + @JsonProperty + @JsonView( {DetailedView.class, ExportView.class} ) + @JacksonXmlProperty( namespace = Dxf2Namespace.NAMESPACE ) + public boolean isValidCompleteOnly() + { + return validCompleteOnly; + } + + public void setValidCompleteOnly( boolean validCompleteOnly ) + { + this.validCompleteOnly = validCompleteOnly; + } + @Override public void mergeWith( IdentifiableObject other ) { === modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataanalysis/MinMaxOutlierAnalysisService.java' --- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataanalysis/MinMaxOutlierAnalysisService.java 2012-08-13 09:06:44 +0000 +++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataanalysis/MinMaxOutlierAnalysisService.java 2012-09-19 16:14:28 +0000 @@ -103,7 +103,7 @@ categoryOptionCombos.addAll( dataElement.getCategoryCombo().getOptionCombos() ); } - log.info( "Starting min-max analysis, no of data elements: " + elements.size() + ", no of org units: " + organisationUnits.size() ); + log.debug( "Starting min-max analysis, no of data elements: " + elements.size() + ", no of org units: " + organisationUnits.size() ); return dataAnalysisStore.getMinMaxViolations( elements, categoryOptionCombos, periods, organisationUnits, MAX_OUTLIERS ); } @@ -111,13 +111,13 @@ public void generateMinMaxValues( Collection organisationUnits, Collection dataElements, Double stdDevFactor ) { - log.info( "Starting min-max value generation, no of data elements: " + dataElements.size() + ", no of org units: " + organisationUnits.size() ); + log.debug( "Starting min-max value generation, no of data elements: " + dataElements.size() + ", no of org units: " + organisationUnits.size() ); Set orgUnitIds = new HashSet( ConversionUtils.getIdentifiers( OrganisationUnit.class, organisationUnits ) ); minMaxDataElementService.removeMinMaxDataElements( dataElements, organisationUnits ); - log.info( "Deleted existing min-max values" ); + log.debug( "Deleted existing min-max values" ); BatchHandler batchHandler = batchHandlerFactory.createBatchHandler( MinMaxDataElementBatchHandler.class ).init(); === 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 2012-09-18 16:20:20 +0000 +++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java 2012-09-19 16:14:28 +0000 @@ -387,6 +387,7 @@ executeSql( "update indicatortype set indicatornumber = false where indicatornumber is null" ); executeSql( "update dataset set mobile = false where mobile is null" ); executeSql( "update dataset set allowfutureperiods = false where allowfutureperiods is null" ); + executeSql( "update dataset set validcompleteonly = false where validcompleteonly is null" ); executeSql( "update dataelement set zeroissignificant = false where zeroissignificant is null" ); executeSql( "update organisationunit set haspatients = false where haspatients is null" ); executeSql( "update dataset set expirydays = 0 where expirydays is null" ); === 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 2012-09-18 16:20:20 +0000 +++ dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/dataset/hibernate/DataSet.hbm.xml 2012-09-19 16:14:28 +0000 @@ -72,6 +72,8 @@ + + === modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/commons.ajax.js' --- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/commons.ajax.js 2011-08-19 09:04:34 +0000 +++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/commons.ajax.js 2012-09-19 16:14:28 +0000 @@ -202,70 +202,65 @@ this.params = params; this.jQuerySelectionString = jQuerySelectionString; - jQuery - .postJSON( - '../dhis-web-commons-ajax-json/getOperands.action', - this.params, - function( json ) - { - if ( json.operands.length == 0 ) - { - setInnerHTML( 'formulaText', "No dataelements to select" ); - return; - } - - jQuery.each( json.operands, function( i, item ) - { - target.append( '' ); - } ); - - if ( params.usePaging ) - { - var numberOfPages = json.paging.numberOfPages; - var currentPage = json.paging.currentPage; - var pageSize = json.paging.pageSize; - var startPage = json.paging.startPage; - - var html = '
'; - - if ( numberOfPages > 1 ) - { - html += 'Page: '; - - if ( currentPage == startPage ) - { - html += ''; - html += ''; - } else if ( currentPage == numberOfPages ) - { - html += ''; - html += ''; - } else - { - html += ''; - html += ''; - } - } - - html += 'Size:
'; - jQuery( '#operandPaging_div' ).remove(); - jQuery( html ).insertAfter( target ); - } - } ); + jQuery.postJSON( + '../dhis-web-commons-ajax-json/getOperands.action', + this.params, + function( json ) + { + jQuery.each( json.operands, function( i, item ) + { + target.append( '' ); + } ); + + if ( params.usePaging ) + { + var numberOfPages = json.paging.numberOfPages; + var currentPage = json.paging.currentPage; + var pageSize = json.paging.pageSize; + var startPage = json.paging.startPage; + + var html = '
'; + + if ( numberOfPages > 1 ) + { + html += 'Page: '; + + if ( currentPage == startPage ) + { + html += ''; + html += ''; + } + else if ( currentPage == numberOfPages ) + { + html += ''; + html += ''; + } + else + { + html += ''; + html += ''; + } + } + + html += 'Size:
'; + jQuery( '#operandPaging_div' ).remove(); + jQuery( html ).insertAfter( target ); + } + } ); }; } === modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ouwt/orgunittreesearch.vm' --- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ouwt/orgunittreesearch.vm 2011-07-18 10:46:40 +0000 +++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ouwt/orgunittreesearch.vm 2012-09-19 11:41:19 +0000 @@ -1,19 +1,27 @@ - + -