=== modified file 'dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/importers/DefaultIdentifiableObjectImporter.java' --- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/importers/DefaultIdentifiableObjectImporter.java 2013-08-23 16:05:01 +0000 +++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/importers/DefaultIdentifiableObjectImporter.java 2013-08-28 12:33:54 +0000 @@ -403,7 +403,8 @@ // make sure that the internalId is 0, so that the system will generate a ID object.setId( 0 ); - object.setUser( user ); + // object.setUser( user ); + object.setUser( null ); NonIdentifiableObjects nonIdentifiableObjects = new NonIdentifiableObjects(); nonIdentifiableObjects.extract( object ); === modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/oust/action/SetSelectedOrganisationUnitAction.java' --- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/oust/action/SetSelectedOrganisationUnitAction.java 2013-08-23 16:05:01 +0000 +++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/oust/action/SetSelectedOrganisationUnitAction.java 2013-08-28 12:33:54 +0000 @@ -28,14 +28,13 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -import java.util.Collection; -import java.util.HashSet; - +import com.opensymphony.xwork2.Action; import org.hisp.dhis.organisationunit.OrganisationUnit; import org.hisp.dhis.organisationunit.OrganisationUnitService; import org.hisp.dhis.oust.manager.SelectionTreeManager; -import com.opensymphony.xwork2.Action; +import java.util.Collection; +import java.util.HashSet; /** * @author Torgeir Lorange Ostby @@ -87,6 +86,12 @@ public String execute() throws Exception { + if ( id == 0 ) + { + selectionTreeManager.clearSelectedOrganisationUnits(); + return SUCCESS; + } + OrganisationUnit unit = organisationUnitService.getOrganisationUnit( id ); if ( unit == null ) @@ -94,7 +99,7 @@ throw new RuntimeException( "OrganisationUnit with id " + id + " doesn't exist" ); } - selectedUnits = new HashSet( 1 ); + selectedUnits = new HashSet( 1 ); selectedUnits.add( unit ); selectionTreeManager.setSelectedOrganisationUnits( selectedUnits ); === modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/ouwt/action/SetSelectedOrganisationUnitAction.java' --- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/ouwt/action/SetSelectedOrganisationUnitAction.java 2013-08-23 16:05:01 +0000 +++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/ouwt/action/SetSelectedOrganisationUnitAction.java 2013-08-28 12:33:54 +0000 @@ -28,14 +28,13 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -import java.util.Collection; -import java.util.HashSet; - +import com.opensymphony.xwork2.Action; import org.hisp.dhis.organisationunit.OrganisationUnit; import org.hisp.dhis.organisationunit.OrganisationUnitService; import org.hisp.dhis.ouwt.manager.OrganisationUnitSelectionManager; -import com.opensymphony.xwork2.Action; +import java.util.Collection; +import java.util.HashSet; /** * @author Torgeir Lorange Ostby @@ -87,6 +86,12 @@ public String execute() throws Exception { + if ( id == 0 ) + { + selectionManager.clearSelectedOrganisationUnits(); + return SUCCESS; + } + OrganisationUnit unit = organisationUnitService.getOrganisationUnit( id ); if ( unit == null )