=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnit.java' --- dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnit.java 2014-12-19 16:13:54 +0000 +++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnit.java 2015-01-09 12:56:12 +0000 @@ -107,8 +107,6 @@ private Date closedDate; - private boolean active; - private String comment; private String featureType; @@ -178,14 +176,13 @@ * @param comment */ public OrganisationUnit( String name, String shortName, String code, Date openingDate, Date closedDate, - boolean active, String comment ) + String comment ) { this( name ); this.shortName = shortName; this.code = code; this.openingDate = openingDate; this.closedDate = closedDate; - this.active = active; this.comment = comment; } @@ -199,7 +196,7 @@ * @param comment */ public OrganisationUnit( String name, OrganisationUnit parent, String shortName, String code, Date openingDate, - Date closedDate, boolean active, String comment ) + Date closedDate, String comment ) { this( name ); this.parent = parent; @@ -207,7 +204,6 @@ this.code = code; this.openingDate = openingDate; this.closedDate = closedDate; - this.active = active; this.comment = comment; } @@ -876,19 +872,6 @@ @JsonProperty @JsonView( { DetailedView.class, ExportView.class } ) @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 ) - public boolean isActive() - { - return active; - } - - public void setActive( boolean active ) - { - this.active = active; - } - - @JsonProperty - @JsonView( { DetailedView.class, ExportView.class } ) - @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 ) @PropertyRange( min = 2 ) public String getComment() { @@ -1122,7 +1105,6 @@ openingDate = organisationUnit.getOpeningDate() == null ? openingDate : organisationUnit.getOpeningDate(); closedDate = organisationUnit.getClosedDate() == null ? closedDate : organisationUnit.getClosedDate(); - active = organisationUnit.isActive(); comment = organisationUnit.getComment() == null ? comment : organisationUnit.getComment(); featureType = organisationUnit.getFeatureType() == null ? featureType : organisationUnit.getFeatureType(); coordinates = organisationUnit.getCoordinates() == null ? coordinates : organisationUnit.getCoordinates(); === 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-01-02 14:06:24 +0000 +++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java 2015-01-09 12:56:12 +0000 @@ -162,6 +162,7 @@ executeSql( "ALTER TABLE report DROP COLUMN usingorgunitgroupsets" ); executeSql( "ALTER TABLE eventchart DROP COLUMN datatype" ); executeSql( "ALTER TABLE validationrule DROP COLUMN type" ); + executeSql( "ALTER TABLE organisationunit DROP COLUMN active" ); executeSql( "DROP INDEX datamart_crosstab" ); === modified file 'dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/organisationunit/hibernate/OrganisationUnit.hbm.xml' --- dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/organisationunit/hibernate/OrganisationUnit.hbm.xml 2014-02-18 13:11:50 +0000 +++ dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/organisationunit/hibernate/OrganisationUnit.hbm.xml 2015-01-09 12:56:12 +0000 @@ -36,8 +36,6 @@ - - === modified file 'dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/organisationunit/OrganisationUnitServiceTest.java' --- dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/organisationunit/OrganisationUnitServiceTest.java 2014-11-10 11:43:54 +0000 +++ dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/organisationunit/OrganisationUnitServiceTest.java 2015-01-09 12:56:12 +0000 @@ -70,7 +70,7 @@ // Single OrganisationUnit String organisationUnitName1 = "organisationUnitName1"; OrganisationUnit organisationUnit1 = new OrganisationUnit( organisationUnitName1, "shortName1", - "organisationUnitCode1", new Date(), new Date(), true, "comment" ); + "organisationUnitCode1", new Date(), new Date(), "comment" ); int id1 = organisationUnitService.addOrganisationUnit( organisationUnit1 ); @@ -82,7 +82,7 @@ // OrganisationUnit with parent String organisationUnitName2 = "organisationUnitName2"; OrganisationUnit organisationUnit2 = new OrganisationUnit( organisationUnitName2, organisationUnit1, - "shortName2", "organisationUnitCode2", new Date(), new Date(), true, "comment" ); + "shortName2", "organisationUnitCode2", new Date(), new Date(), "comment" ); int id2 = organisationUnitService.addOrganisationUnit( organisationUnit2 ); @@ -104,7 +104,7 @@ String updatedShortName = "updatedShortName"; OrganisationUnit organisationUnit = new OrganisationUnit( name, shortName, "organisationUnitCode", new Date(), - new Date(), true, "comment" ); + new Date(), "comment" ); int id = organisationUnitService.addOrganisationUnit( organisationUnit ); @@ -237,12 +237,9 @@ String oU2Code = "OU2Code"; String oU3Code = "OU3Code"; - OrganisationUnit organisationUnit1 = new OrganisationUnit( oU1Name, null, oU1ShortName, oU1Code, null, null, - true, null ); - OrganisationUnit organisationUnit2 = new OrganisationUnit( oU2Name, null, oU2ShortName, oU2Code, null, null, - true, null ); - OrganisationUnit organisationUnit3 = new OrganisationUnit( oU3Name, null, oU3ShortName, oU3Code, null, null, - false, null ); + OrganisationUnit organisationUnit1 = new OrganisationUnit( oU1Name, null, oU1ShortName, oU1Code, null, null, null ); + OrganisationUnit organisationUnit2 = new OrganisationUnit( oU2Name, null, oU2ShortName, oU2Code, null, null, null ); + OrganisationUnit organisationUnit3 = new OrganisationUnit( oU3Name, null, oU3ShortName, oU3Code, null, null, null ); organisationUnitService.addOrganisationUnit( organisationUnit1 ); organisationUnitService.addOrganisationUnit( organisationUnit2 ); @@ -266,11 +263,11 @@ throws Exception { OrganisationUnit organisationUnit1 = new OrganisationUnit( "Foo", "shortName1", "organisationUnitCode1", - new Date(), new Date(), true, "comment" ); + new Date(), new Date(), "comment" ); OrganisationUnit organisationUnit2 = new OrganisationUnit( "Bar", organisationUnit1, "shortName2", - "organisationUnitCode2", new Date(), new Date(), true, "comment" ); + "organisationUnitCode2", new Date(), new Date(), "comment" ); OrganisationUnit organisationUnit3 = new OrganisationUnit( "Foobar", organisationUnit2, "shortName3", - "organisationUnitCode3", new Date(), new Date(), true, "comment" ); + "organisationUnitCode3", new Date(), new Date(), "comment" ); int orgId1 = organisationUnitService.addOrganisationUnit( organisationUnit1 ); int orgId2 = organisationUnitService.addOrganisationUnit( organisationUnit2 ); @@ -293,11 +290,11 @@ { // creating a tree with two roots ( id1 and id4 ) - OrganisationUnit unit1 = new OrganisationUnit( "OU1name", "OU1sname", "OU1code", null, null, true, null ); - OrganisationUnit unit2 = new OrganisationUnit( "OU2name", unit1, "OU2sname", "OU2code", null, null, true, null ); - OrganisationUnit unit3 = new OrganisationUnit( "OU3name", unit1, "OU3sname", "OU3code", null, null, true, null ); - OrganisationUnit unit4 = new OrganisationUnit( "OU4name", "OU4sname", "OU4code", null, null, true, null ); - OrganisationUnit unit5 = new OrganisationUnit( "OU5name", unit4, "OU5sname", "OU5code", null, null, true, null ); + OrganisationUnit unit1 = new OrganisationUnit( "OU1name", "OU1sname", "OU1code", null, null, null ); + OrganisationUnit unit2 = new OrganisationUnit( "OU2name", unit1, "OU2sname", "OU2code", null, null, null ); + OrganisationUnit unit3 = new OrganisationUnit( "OU3name", unit1, "OU3sname", "OU3code", null, null, null ); + OrganisationUnit unit4 = new OrganisationUnit( "OU4name", "OU4sname", "OU4code", null, null, null ); + OrganisationUnit unit5 = new OrganisationUnit( "OU5name", unit4, "OU5sname", "OU5code", null, null, null ); organisationUnitService.addOrganisationUnit( unit1 ); organisationUnitService.addOrganisationUnit( unit2 ); @@ -633,10 +630,8 @@ { OrganisationUnitGroup organisationUnitGroup = new OrganisationUnitGroup( "OUGname" ); - OrganisationUnit organisationUnit1 = new OrganisationUnit( "OU1name", null, "OU1sname", "OU1code", null, null, - true, null ); - OrganisationUnit organisationUnit2 = new OrganisationUnit( "OU2name", null, "OU2sname", "OU2code", null, null, - true, null ); + OrganisationUnit organisationUnit1 = new OrganisationUnit( "OU1name", null, "OU1sname", "OU1code", null, null, null ); + OrganisationUnit organisationUnit2 = new OrganisationUnit( "OU2name", null, "OU2sname", "OU2code", null, null, null ); organisationUnitGroup.getMembers().add( organisationUnit1 ); organisationUnitGroup.getMembers().add( organisationUnit2 ); @@ -723,17 +718,17 @@ { // creates a tree OrganisationUnit unit1 = new OrganisationUnit( "orgUnitName1", "shortName1", "organisationUnitCode1", - new Date(), new Date(), true, "comment" ); + new Date(), new Date(), "comment" ); OrganisationUnit unit2 = new OrganisationUnit( "orgUnitName2", unit1, "shortName2", "organisationUnitCode2", - new Date(), new Date(), true, "comment" ); + new Date(), new Date(), "comment" ); OrganisationUnit unit3 = new OrganisationUnit( "orgUnitName3", unit1, "shortName3", "organisationUnitCode3", - new Date(), new Date(), true, "comment" ); + new Date(), new Date(), "comment" ); OrganisationUnit unit4 = new OrganisationUnit( "orgUnitName4", unit2, "shortName4", "organisationUnitCode4", - new Date(), new Date(), true, "comment" ); + new Date(), new Date(), "comment" ); OrganisationUnit unit5 = new OrganisationUnit( "orgUnitName5", unit2, "shortName5", "organisationUnitCode5", - new Date(), new Date(), true, "comment" ); + new Date(), new Date(), "comment" ); OrganisationUnit unit6 = new OrganisationUnit( "orgUnitName6", unit5, "shortName6", "organisationUnitCode6", - new Date(), new Date(), true, "comment" ); + new Date(), new Date(), "comment" ); organisationUnitService.addOrganisationUnit( unit1 ); int id2 = organisationUnitService.addOrganisationUnit( unit2 ); === modified file 'dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/csv/DefaultCsvImportService.java' --- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/csv/DefaultCsvImportService.java 2014-10-30 20:26:55 +0000 +++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/csv/DefaultCsvImportService.java 2015-01-09 12:56:12 +0000 @@ -298,7 +298,6 @@ object.setUuid( getSafe( values, 6, null, 36 ) ); object.setOpeningDate( getMediumDate( getSafe( values, 7, "1970-01-01", null ) ) ); object.setClosedDate( getMediumDate( getSafe( values, 8, "1970-01-01", null ) ) ); - object.setActive( true ); object.setComment( getSafe( values, 9, null, null ) ); object.setFeatureType( getSafe( values, 10, null, 50 ) ); object.setCoordinates( getSafe( values, 11, null, null ) ); === modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/xml/converter/OrganisationUnitConverter.java' --- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/xml/converter/OrganisationUnitConverter.java 2014-10-16 06:17:19 +0000 +++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/xml/converter/OrganisationUnitConverter.java 2015-01-09 12:56:12 +0000 @@ -28,6 +28,9 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +import java.util.Collection; +import java.util.Map; + import org.amplecode.staxwax.reader.XMLReader; import org.amplecode.staxwax.writer.XMLWriter; import org.hisp.dhis.importexport.ExportParams; @@ -40,12 +43,6 @@ import org.hisp.dhis.organisationunit.OrganisationUnit; import org.hisp.dhis.organisationunit.OrganisationUnitService; -import java.util.Collection; -import java.util.Map; - -import static org.hisp.dhis.importexport.dhis14.util.Dhis14TypeHandler.convertBooleanFromDhis14; -import static org.hisp.dhis.importexport.dhis14.util.Dhis14TypeHandler.convertBooleanToDhis14; - /** * @author Lars Helge Overland * @version $Id: OrganisationUnitConverter.java 6455 2008-11-24 08:59:37Z @@ -73,8 +70,6 @@ private static final String FIELD_VALID_TO = "ValidTo"; - private static final String FIELD_ACTIVE = "Active"; - private static final String FIELD_COMMENT = "Comment"; private static final String FIELD_LATITUDE = "Latitude"; @@ -171,7 +166,6 @@ writer.writeElement( FIELD_SHORT_NAME, unit.getShortName() ); writer.writeElement( FIELD_VALID_FROM, String.valueOf( VALID_FROM ) ); writer.writeElement( FIELD_VALID_TO, String.valueOf( VALID_TO ) ); - writer.writeElement( FIELD_ACTIVE, convertBooleanToDhis14( unit.isActive() ) ); writer.writeElement( FIELD_COMMENT, unit.getComment() ); writer.writeElement( FIELD_LATITUDE, String.valueOf( 0 ) ); writer.writeElement( FIELD_LONGITUDE, String.valueOf( 0 ) ); @@ -210,7 +204,6 @@ unit.setShortName( values.get( FIELD_SHORT_NAME ) ); unit.setOpeningDate( Dhis14DateUtil.getDate( Integer.parseInt( values.get( FIELD_VALID_FROM ) ) ) ); unit.setClosedDate( Dhis14DateUtil.getDate( Integer.parseInt( values.get( FIELD_VALID_TO ) ) ) ); - unit.setActive( convertBooleanFromDhis14( values.get( FIELD_ACTIVE ) ) ); unit.setComment( values.get( FIELD_COMMENT ) ); unit.setLastUpdated( Dhis14DateUtil.getDate( values.get( FIELD_LAST_UPDATED ) ) ); importObject( unit, params ); === modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/xml/converter/OrganisationUnitGroupMemberConverter.java' --- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/xml/converter/OrganisationUnitGroupMemberConverter.java 2014-10-16 06:17:19 +0000 +++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/xml/converter/OrganisationUnitGroupMemberConverter.java 2015-01-09 12:56:12 +0000 @@ -40,8 +40,6 @@ import org.hisp.dhis.organisationunit.OrganisationUnitGroupService; import org.hisp.dhis.organisationunit.OrganisationUnitService; -import static org.hisp.dhis.importexport.dhis14.util.Dhis14TypeHandler.convertBooleanToDhis14; - /** * @author Lars Helge Overland * @version $Id: OrganisationUnitGroupMemberConverter.java 6455 2008-11-24 08:59:37Z larshelg $ @@ -53,7 +51,6 @@ private static final String FIELD_GROUP_ID = "OrgUnitGroupID"; private static final String FIELD_UNIT_ID = "OrgUnitID"; - private static final String FIELD_ACTIVE = "Active"; private static final String FIELD_LAST_USER = "LastUserID"; private static final String FIELD_LAST_UPDATED = "LastUpdatedID"; @@ -100,7 +97,6 @@ writer.writeElement( FIELD_GROUP_ID, String.valueOf( group.getId() ) ); writer.writeElement( FIELD_UNIT_ID, String.valueOf( unit.getId() ) ); - writer.writeElement( FIELD_ACTIVE, convertBooleanToDhis14( unit.isActive() ) ); writer.writeElement( FIELD_LAST_USER, ""); writer.writeElement( FIELD_LAST_UPDATED, ""); === modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/OrganisationUnitConverter.java' --- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/OrganisationUnitConverter.java 2014-10-16 06:17:19 +0000 +++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/OrganisationUnitConverter.java 2015-01-09 12:56:12 +0000 @@ -65,7 +65,6 @@ private static final String FIELD_CODE = "code"; private static final String FIELD_OPENING_DATE = "openingDate"; private static final String FIELD_CLOSED_DATE = "closedDate"; - private static final String FIELD_ACTIVE = "active"; private static final String FIELD_COMMENT = "comment"; private static final String FIELD_COORDINATES_TUPLE = "coordinatesTuple"; private static final String FIELD_COORDINATES = "coord"; @@ -127,7 +126,6 @@ writer.writeElement( FIELD_CODE, unit.getCode() ); writer.writeElement( FIELD_OPENING_DATE, DateUtils.getMediumDateString( unit.getOpeningDate() ) ); writer.writeElement( FIELD_CLOSED_DATE, DateUtils.getMediumDateString( unit.getClosedDate() ) ); - writer.writeElement( FIELD_ACTIVE, String.valueOf( unit.isActive() ) ); writer.writeElement( FIELD_COMMENT, unit.getComment() ); writer.openElement( FIELD_FEATURE, ATTRIBUTE_TYPE, unit.getFeatureType() ); @@ -192,10 +190,7 @@ reader.moveToStartElement( FIELD_CLOSED_DATE ); unit.setClosedDate( DateUtils.getMediumDate( reader.getElementValue() ) ); - - reader.moveToStartElement( FIELD_ACTIVE ); - unit.setActive( Boolean.parseBoolean( reader.getElementValue() ) ); - + reader.moveToStartElement( FIELD_COMMENT ); unit.setComment( reader.getElementValue() ); === modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/importer/OrganisationUnitImporter.java' --- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/importer/OrganisationUnitImporter.java 2014-03-18 08:10:10 +0000 +++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/importer/OrganisationUnitImporter.java 2015-01-09 12:56:12 +0000 @@ -28,6 +28,10 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +import static org.apache.commons.lang.StringUtils.defaultIfEmpty; + +import java.util.List; + import org.amplecode.quick.BatchHandler; import org.hisp.dhis.importexport.GroupMemberType; import org.hisp.dhis.importexport.ImportParams; @@ -36,10 +40,6 @@ import org.hisp.dhis.organisationunit.OrganisationUnit; import org.hisp.dhis.organisationunit.OrganisationUnitService; -import java.util.List; - -import static org.apache.commons.lang.StringUtils.defaultIfEmpty; - /** * @author Lars Helge Overland * @version $Id: AbstractOrganisationUnitConverter.java 6251 2008-11-10 14:37:05Z larshelg $ @@ -81,7 +81,6 @@ match.setCode( defaultIfEmpty( object.getCode(), match.getCode() ) ); match.setOpeningDate( object.getOpeningDate() ); match.setClosedDate( object.getClosedDate() ); - match.setActive( object.isActive() ); match.setComment( defaultIfEmpty( object.getComment(), match.getComment() ) ); match.setFeatureType( defaultIfEmpty( object.getFeatureType(), match.getFeatureType() ) ); match.setCoordinates( defaultIfEmpty( object.getCoordinates(), match.getCoordinates() ) ); @@ -127,10 +126,6 @@ { return false; } - if ( object.isActive() != existing.isActive() ) - { - return false; - } if ( !isSimiliar( object.getComment(), existing.getComment() ) || (isNotNull( object.getComment(), existing.getComment() ) && !object.getComment().equals( existing.getComment() )) ) { return false; === modified file 'dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/OrganisationUnitBatchHandler.java' --- dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/OrganisationUnitBatchHandler.java 2014-10-16 06:17:19 +0000 +++ dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/OrganisationUnitBatchHandler.java 2015-01-09 12:56:12 +0000 @@ -103,7 +103,6 @@ statementBuilder.setColumn( "description" ); statementBuilder.setColumn( "openingdate" ); statementBuilder.setColumn( "closeddate" ); - statementBuilder.setColumn( "active" ); statementBuilder.setColumn( "comment" ); statementBuilder.setColumn( "featuretype" ); statementBuilder.setColumn( "coordinates" ); @@ -120,7 +119,6 @@ statementBuilder.setValue( unit.getDescription() ); statementBuilder.setValue( unit.getOpeningDate() ); statementBuilder.setValue( unit.getClosedDate() ); - statementBuilder.setValue( unit.isActive() ); statementBuilder.setValue( unit.getComment() ); statementBuilder.setValue( unit.getFeatureType() ); statementBuilder.setValue( unit.getCoordinates() ); === modified file 'dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/ExcelUtils.java' --- dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/ExcelUtils.java 2014-09-23 07:43:22 +0000 +++ dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/ExcelUtils.java 2015-01-09 12:56:12 +0000 @@ -151,7 +151,6 @@ sheet.addCell( new Label( column++, row, unit.getCode(), FORMAT_TEXT ) ); sheet.addCell( new Label( column++, row, unit.getOpeningDate() != null ? i18nFormat.formatDate( unit.getOpeningDate() ) : "", FORMAT_TEXT ) ); sheet.addCell( new Label( column++, row, unit.getClosedDate() != null ? i18nFormat.formatDate( unit.getClosedDate() ) : "", FORMAT_TEXT ) ); - sheet.addCell( new Label( column++, row, i18n.getString( getBoolean().get( unit.isActive() ) ), FORMAT_TEXT ) ); sheet.addCell( new Label( column++, row, unit.getComment(), FORMAT_TEXT ) ); } === modified file 'dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/PDFUtils.java' --- dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/PDFUtils.java 2014-09-23 07:43:22 +0000 +++ dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/PDFUtils.java 2015-01-09 12:56:12 +0000 @@ -530,7 +530,6 @@ } table.addCell( getItalicCell( i18n.getString( "active" ) ) ); - table.addCell( getTextCell( i18n.getString( getBoolean().get( unit.isActive() ) ) ) ); if ( nullIfEmpty( unit.getComment() ) != null ) { === modified file 'dhis-2/dhis-support/dhis-support-test/src/main/java/org/hisp/dhis/DhisConvenienceTest.java' --- dhis-2/dhis-support/dhis-support-test/src/main/java/org/hisp/dhis/DhisConvenienceTest.java 2014-12-27 12:32:35 +0000 +++ dhis-2/dhis-support/dhis-support-test/src/main/java/org/hisp/dhis/DhisConvenienceTest.java 2015-01-09 12:56:12 +0000 @@ -698,7 +698,6 @@ unit.setCode( "OrganisationUnitCode" + uniqueCharacter ); unit.setOpeningDate( date ); unit.setClosedDate( date ); - unit.setActive( true ); unit.setComment( "Comment" + uniqueCharacter ); return unit; === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/java/org/hisp/dhis/oum/action/organisationunit/AddOrganisationUnitAction.java' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/java/org/hisp/dhis/oum/action/organisationunit/AddOrganisationUnitAction.java 2014-10-16 06:17:19 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/java/org/hisp/dhis/oum/action/organisationunit/AddOrganisationUnitAction.java 2015-01-09 12:56:12 +0000 @@ -145,13 +145,6 @@ this.openingDate = openingDate; } - private boolean active; - - public void setActive( boolean active ) - { - this.active = active; - } - private String comment; public void setComment( String comment ) @@ -277,7 +270,7 @@ DateTimeUnit isoOpeningDate = calendarService.getSystemCalendar().toIso( openingDate ); - OrganisationUnit organisationUnit = new OrganisationUnit( name, shortName, code, isoOpeningDate.toJdkCalendar().getTime(), null, active, comment ); + OrganisationUnit organisationUnit = new OrganisationUnit( name, shortName, code, isoOpeningDate.toJdkCalendar().getTime(), null, comment ); organisationUnit.setDescription( description ); organisationUnit.setUrl( url ); === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/java/org/hisp/dhis/oum/action/organisationunit/UpdateOrganisationUnitAction.java' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/java/org/hisp/dhis/oum/action/organisationunit/UpdateOrganisationUnitAction.java 2014-10-16 06:17:19 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/java/org/hisp/dhis/oum/action/organisationunit/UpdateOrganisationUnitAction.java 2015-01-09 12:56:12 +0000 @@ -148,13 +148,6 @@ this.code = code; } - private boolean active; - - public void setActive( boolean active ) - { - this.active = active; - } - private String openingDate; public void setOpeningDate( String openingDate ) @@ -299,7 +292,6 @@ organisationUnit.setShortName( shortName ); organisationUnit.setDescription( description ); organisationUnit.setCode( code ); - organisationUnit.setActive( active ); organisationUnit.setOpeningDate( oDate ); organisationUnit.setClosedDate( cDate ); organisationUnit.setComment( comment ); === modified file 'dhis-2/dhis-web/dhis-web-ohie/src/main/java/org/hisp/dhis/web/ohie/fred/FredSpringWebTest.java' --- dhis-2/dhis-web/dhis-web-ohie/src/main/java/org/hisp/dhis/web/ohie/fred/FredSpringWebTest.java 2014-08-15 07:40:20 +0000 +++ dhis-2/dhis-web/dhis-web-ohie/src/main/java/org/hisp/dhis/web/ohie/fred/FredSpringWebTest.java 2015-01-09 12:56:12 +0000 @@ -150,7 +150,6 @@ organisationUnit.setShortName( organisationUnit.getName() ); organisationUnit.setCreated( new Date() ); organisationUnit.setLastUpdated( organisationUnit.getCreated() ); - organisationUnit.setActive( true ); organisationUnit.setLevel( 1 ); return organisationUnit; === modified file 'dhis-2/dhis-web/dhis-web-ohie/src/main/java/org/hisp/dhis/web/ohie/fred/webapi/v1/controller/FacilityController.java' --- dhis-2/dhis-web/dhis-web-ohie/src/main/java/org/hisp/dhis/web/ohie/fred/webapi/v1/controller/FacilityController.java 2014-08-15 07:40:20 +0000 +++ dhis-2/dhis-web/dhis-web-ohie/src/main/java/org/hisp/dhis/web/ohie/fred/webapi/v1/controller/FacilityController.java 2015-01-09 12:56:12 +0000 @@ -281,7 +281,6 @@ allOrganisationUnits = new ArrayList<>( organisationUnitService.getAllOrganisationUnitsByLastUpdated( lastUpdated ) ); } - filterByActiveList( activeList, allOrganisationUnits ); filterByNameList( nameList, allOrganisationUnits ); filterByUuidList( uuidList, allOrganisationUnits ); filterByPropertiesParent( parentList, allOrganisationUnits ); @@ -474,38 +473,6 @@ } } - private void filterByActiveList( List activeList, List allOrganisationUnits ) - { - if ( activeList == null || activeList.isEmpty() ) - { - return; - } - - Iterator organisationUnitIterator = allOrganisationUnits.iterator(); - - while ( organisationUnitIterator.hasNext() ) - { - OrganisationUnit organisationUnit = organisationUnitIterator.next(); - - boolean shouldRemove = true; - - // see if it matches at least one - for ( Boolean active : activeList ) - { - if ( organisationUnit.isActive() == active ) - { - shouldRemove = false; - break; - } - } - - if ( shouldRemove ) - { - organisationUnitIterator.remove(); - } - } - } - private Integer getLimitValue( String limit, int defaultValue ) { Integer limitValue; @@ -737,7 +704,6 @@ organisationUnit.setFeatureType( organisationUnitUpdate.getFeatureType() ); organisationUnit.setCoordinates( organisationUnitUpdate.getCoordinates() ); organisationUnit.setParent( organisationUnitUpdate.getParent() ); - organisationUnit.setActive( organisationUnitUpdate.isActive() ); organisationUnit.removeAllDataSets(); organisationUnitService.updateOrganisationUnit( organisationUnit ); === modified file 'dhis-2/dhis-web/dhis-web-ohie/src/main/java/org/hisp/dhis/web/ohie/fred/webapi/v1/utils/FacilityToOrganisationUnitConverter.java' --- dhis-2/dhis-web/dhis-web-ohie/src/main/java/org/hisp/dhis/web/ohie/fred/webapi/v1/utils/FacilityToOrganisationUnitConverter.java 2014-03-18 08:10:10 +0000 +++ dhis-2/dhis-web/dhis-web-ohie/src/main/java/org/hisp/dhis/web/ohie/fred/webapi/v1/utils/FacilityToOrganisationUnitConverter.java 2015-01-09 12:56:12 +0000 @@ -72,8 +72,6 @@ organisationUnit.setShortName( facility.getName() ); } - organisationUnit.setActive( facility.getActive() ); - if ( facility.getIdentifiers() != null ) { for ( Identifier identifier : facility.getIdentifiers() ) === modified file 'dhis-2/dhis-web/dhis-web-ohie/src/main/java/org/hisp/dhis/web/ohie/fred/webapi/v1/utils/OrganisationUnitToFacilityConverter.java' --- dhis-2/dhis-web/dhis-web-ohie/src/main/java/org/hisp/dhis/web/ohie/fred/webapi/v1/utils/OrganisationUnitToFacilityConverter.java 2014-08-15 07:40:20 +0000 +++ dhis-2/dhis-web/dhis-web-ohie/src/main/java/org/hisp/dhis/web/ohie/fred/webapi/v1/utils/OrganisationUnitToFacilityConverter.java 2015-01-09 12:56:12 +0000 @@ -61,7 +61,6 @@ Facility facility = new Facility(); facility.setUuid( organisationUnit.getUuid() ); facility.setName( organisationUnit.getDisplayName() ); - facility.setActive( organisationUnit.isActive() ); facility.setCreatedAt( organisationUnit.getCreated() ); facility.setUpdatedAt( organisationUnit.getLastUpdated() ); === modified file 'dhis-2/dhis-web/dhis-web-ohie/src/main/java/org/hisp/dhis/web/ohie/fred/webapi/v1/utils/OrganisationUnitToSimpleFeature.java' --- dhis-2/dhis-web/dhis-web-ohie/src/main/java/org/hisp/dhis/web/ohie/fred/webapi/v1/utils/OrganisationUnitToSimpleFeature.java 2014-03-18 08:10:10 +0000 +++ dhis-2/dhis-web/dhis-web-ohie/src/main/java/org/hisp/dhis/web/ohie/fred/webapi/v1/utils/OrganisationUnitToSimpleFeature.java 2015-01-09 12:56:12 +0000 @@ -77,7 +77,6 @@ featureBuilder.add( organisationUnit.getUid() ); featureBuilder.add( organisationUnit.getName() ); - featureBuilder.add( organisationUnit.isActive() ); return featureBuilder.buildFeature( null ); }