← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 3695: Applied patch from Hieu. Implements function for modifying group membership in compulsory group s...

 

------------------------------------------------------------
revno: 3695
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Sun 2011-05-22 14:19:06 +0200
message:
  Applied patch from Hieu. Implements function for modifying group membership in compulsory group sets in add/update organisation unit screen. Good work.
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnitGroupService.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/reporttable/ReportTable.java
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/organisationunit/DefaultOrganisationUnitGroupService.java
  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/GetOrganisationUnitAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/java/org/hisp/dhis/oum/action/organisationunit/PrepareAddOrganisationUnitAction.java
  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/resources/META-INF/dhis/beans.xml
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/resources/org/hisp/dhis/oum/i18n_module.properties
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/resources/org/hisp/dhis/oum/i18n_module_vi_VN.properties
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/resources/struts.xml
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/addOrganisationUnitForm.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/updateOrganisationUnitForm.vm


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnitGroupService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnitGroupService.java	2010-12-28 17:49:37 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnitGroupService.java	2011-05-22 12:19:06 +0000
@@ -176,6 +176,16 @@
     Collection<OrganisationUnitGroupSet> getCompulsoryOrganisationUnitGroupSets();
 
     /**
+     * Returns all compulsory OrganisationUnitGroupSets which have one ore more
+     * members.
+     * 
+     * @return a collection of all OrganisationUnitGroupSets, or an
+     *         empty collection if there are no compulsory
+     *         OrganisationUnitGroupSets.
+     */
+    Collection<OrganisationUnitGroupSet> getCompulsoryOrganisationUnitGroupSetsWithMembers();
+
+    /**
      * Returns a Collection of compulsory OrganisationUnitGroupSets whichs groups 
      * the given OrganisationUnit is not a member of.
      * 

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/reporttable/ReportTable.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/reporttable/ReportTable.java	2011-05-05 21:14:56 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/reporttable/ReportTable.java	2011-05-22 12:19:06 +0000
@@ -94,11 +94,7 @@
     public static final int NONE = 0;
     
     public static final Map<String, String> PRETTY_COLUMNS = new HashMap<String, String>() {
-        /**
-         * Determines if a de-serialized file is compatible with this class.
-         */
-        private static final long serialVersionUID = 4194194769957136714L;
-    {
+        private static final long serialVersionUID = 4194194769957136714L; {
         put( DATAELEMENT_ID, "Data element ID" );
         put( DATAELEMENT_NAME, "Data element" );
         put( CATEGORYCOMBO_ID, "Category combination ID" );
@@ -117,11 +113,7 @@
     } };
     
     public static final Map<Class<? extends NameableObject>, String> CLASS_ID_MAP = new HashMap<Class<? extends NameableObject>, String>() {
-        /**
-         * Determines if a de-serialized file is compatible with this class.
-         */
-        private static final long serialVersionUID = 4742098364404485991L;
-    {
+        private static final long serialVersionUID = 4742098364404485991L; {
         put( Indicator.class, INDICATOR_ID );
         put( DataElement.class, DATAELEMENT_ID );
         put( DataElementCategoryOptionCombo.class, CATEGORYCOMBO_ID );

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/organisationunit/DefaultOrganisationUnitGroupService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/organisationunit/DefaultOrganisationUnitGroupService.java	2010-12-28 17:49:37 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/organisationunit/DefaultOrganisationUnitGroupService.java	2011-05-22 12:19:06 +0000
@@ -181,6 +181,17 @@
         return groupSets;
     }
 
+    public Collection<OrganisationUnitGroupSet> getCompulsoryOrganisationUnitGroupSetsWithMembers()
+    {
+        return FilterUtils.filter( getAllOrganisationUnitGroupSets(), new Filter<OrganisationUnitGroupSet>()
+            {
+                public boolean retain( OrganisationUnitGroupSet object )
+                {
+                    return object.isCompulsory() && object.hasOrganisationUnitGroups();
+                }
+            } );
+    }
+    
     public OrganisationUnitGroup getOrganisationUnitGroup( OrganisationUnitGroupSet groupSet, OrganisationUnit unit )
     {
         for ( OrganisationUnitGroup group : groupSet.getOrganisationUnitGroups() )

=== 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	2011-05-05 21:15:45 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/java/org/hisp/dhis/oum/action/organisationunit/AddOrganisationUnitAction.java	2011-05-22 12:19:06 +0000
@@ -1,7 +1,7 @@
 package org.hisp.dhis.oum.action.organisationunit;
 
 /*
- * Copyright (c) 2004-2010, University of Oslo
+ * Copyright (c) 2004-2011, University of Oslo
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -37,6 +37,8 @@
 import org.hisp.dhis.dataset.DataSetService;
 import org.hisp.dhis.i18n.I18nFormat;
 import org.hisp.dhis.organisationunit.OrganisationUnit;
+import org.hisp.dhis.organisationunit.OrganisationUnitGroup;
+import org.hisp.dhis.organisationunit.OrganisationUnitGroupService;
 import org.hisp.dhis.organisationunit.OrganisationUnitService;
 import org.hisp.dhis.ouwt.manager.OrganisationUnitSelectionManager;
 
@@ -53,7 +55,7 @@
     // -------------------------------------------------------------------------
     // Dependencies
     // -------------------------------------------------------------------------
-    
+
     private I18nFormat format;
 
     public void setFormat( I18nFormat format )
@@ -68,20 +70,27 @@
         this.organisationUnitService = organisationUnitService;
     }
 
+    private OrganisationUnitGroupService organisationUnitGroupService;
+
+    public void setOrganisationUnitGroupService( OrganisationUnitGroupService organisationUnitGroupService )
+    {
+        this.organisationUnitGroupService = organisationUnitGroupService;
+    }
+
     private OrganisationUnitSelectionManager selectionManager;
 
     public void setSelectionManager( OrganisationUnitSelectionManager selectionManager )
     {
         this.selectionManager = selectionManager;
     }
-    
+
     private DataSetService dataSetService;
 
     public void setDataSetService( DataSetService dataSetService )
     {
         this.dataSetService = dataSetService;
     }
-    
+
     // -------------------------------------------------------------------------
     // Input
     // -------------------------------------------------------------------------
@@ -127,7 +136,7 @@
     {
         this.coordinates = coordinates;
     }
-    
+
     private String featureType;
 
     public void setFeatureType( String featureType )
@@ -169,7 +178,7 @@
     {
         this.phoneNumber = phoneNumber;
     }
-    
+
     private Collection<String> dataSets = new HashSet<String>();
 
     public void setDataSets( Collection<String> dataSets )
@@ -177,6 +186,13 @@
         this.dataSets = dataSets;
     }
 
+    private Collection<String> selectedGroups = new HashSet<String>();
+
+    public void setSelectedGroups( Collection<String> selectedGroups )
+    {
+        this.selectedGroups = selectedGroups;
+    }
+
     // -------------------------------------------------------------------------
     // Output
     // -------------------------------------------------------------------------
@@ -200,7 +216,7 @@
         coordinates = nullIfEmpty( coordinates );
         featureType = nullIfEmpty( featureType );
         url = nullIfEmpty( url );
-        
+
         contactPerson = nullIfEmpty( contactPerson );
         address = nullIfEmpty( address );
         email = nullIfEmpty( email );
@@ -244,10 +260,25 @@
         for ( String id : dataSets )
         {
             DataSet dataSet = dataSetService.getDataSet( Integer.parseInt( id ) );
-            dataSet.getSources().add( organisationUnit );
-            dataSetService.updateDataSet( dataSet );
-        }
-                
+            
+            if ( dataSet != null )
+            {
+                dataSet.getSources().add( organisationUnit );
+                dataSetService.updateDataSet( dataSet );
+            }
+        }
+
+        for ( String id : selectedGroups )
+        {
+            OrganisationUnitGroup group = organisationUnitGroupService.getOrganisationUnitGroup( Integer.parseInt( id ) );
+            
+            if ( group != null )
+            {
+                group.getMembers().add( organisationUnit );
+                organisationUnitGroupService.updateOrganisationUnitGroup( group );
+            }
+        }
+
         return SUCCESS;
     }
 }

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/java/org/hisp/dhis/oum/action/organisationunit/GetOrganisationUnitAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/java/org/hisp/dhis/oum/action/organisationunit/GetOrganisationUnitAction.java	2011-05-05 21:15:45 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/java/org/hisp/dhis/oum/action/organisationunit/GetOrganisationUnitAction.java	2011-05-22 12:19:06 +0000
@@ -1,7 +1,7 @@
 package org.hisp.dhis.oum.action.organisationunit;
 
 /*
- * Copyright (c) 2004-2010, University of Oslo
+ * Copyright (c) 2004-2011, University of Oslo
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -35,13 +35,17 @@
 import org.hisp.dhis.dataset.DataSetService;
 import org.hisp.dhis.dataset.comparator.DataSetNameComparator;
 import org.hisp.dhis.organisationunit.OrganisationUnit;
+import org.hisp.dhis.organisationunit.OrganisationUnitGroupService;
+import org.hisp.dhis.organisationunit.OrganisationUnitGroupSet;
 import org.hisp.dhis.organisationunit.OrganisationUnitService;
+import org.hisp.dhis.organisationunit.comparator.OrganisationUnitGroupSetNameComparator;
 
 import com.opensymphony.xwork2.Action;
 
 /**
  * @author Torgeir Lorange Ostby
- * @version $Id: GetOrganisationUnitAction.java 1898 2006-09-22 12:06:56Z torgeilo $
+ * @version $Id: GetOrganisationUnitAction.java 1898 2006-09-22 12:06:56Z
+ *          torgeilo $
  */
 public class GetOrganisationUnitAction
     implements Action
@@ -57,8 +61,15 @@
         this.organisationUnitService = organisationUnitService;
     }
 
+    private OrganisationUnitGroupService organisationUnitGroupService;
+
+    public void setOrganisationUnitGroupService( OrganisationUnitGroupService organisationUnitGroupService )
+    {
+        this.organisationUnitGroupService = organisationUnitGroupService;
+    }
+
     private DataSetService dataSetService;
-    
+
     public void setDataSetService( DataSetService dataSetService )
     {
         this.dataSetService = dataSetService;
@@ -90,7 +101,7 @@
     }
 
     private List<DataSet> availableDataSets;
-    
+
     public List<DataSet> getAvailableDataSets()
     {
         return availableDataSets;
@@ -103,6 +114,13 @@
         return dataSets;
     }
 
+    private List<OrganisationUnitGroupSet> groupSets;
+
+    public List<OrganisationUnitGroupSet> getGroupSets()
+    {
+        return groupSets;
+    }
+
     // -------------------------------------------------------------------------
     // Action implementation
     // -------------------------------------------------------------------------
@@ -114,14 +132,20 @@
 
         numberOfChildren = organisationUnit.getChildren().size();
 
-        availableDataSets = new ArrayList<DataSet>( dataSetService.getAllDataSets() );        
+        availableDataSets = new ArrayList<DataSet>( dataSetService.getAllDataSets() );
         availableDataSets.removeAll( organisationUnit.getDataSets() );
-        
+
         dataSets = new ArrayList<DataSet>( organisationUnit.getDataSets() );
 
+        groupSets = new ArrayList<OrganisationUnitGroupSet>( organisationUnitGroupService
+            .getCompulsoryOrganisationUnitGroupSetsWithMembers() );
+
         Collections.sort( availableDataSets, new DataSetNameComparator() );
+
         Collections.sort( dataSets, new DataSetNameComparator() );
-        
+
+        Collections.sort( groupSets, new OrganisationUnitGroupSetNameComparator() );
+
         return SUCCESS;
     }
 }

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/java/org/hisp/dhis/oum/action/organisationunit/PrepareAddOrganisationUnitAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/java/org/hisp/dhis/oum/action/organisationunit/PrepareAddOrganisationUnitAction.java	2011-05-05 21:15:45 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/java/org/hisp/dhis/oum/action/organisationunit/PrepareAddOrganisationUnitAction.java	2011-05-22 12:19:06 +0000
@@ -1,7 +1,7 @@
 package org.hisp.dhis.oum.action.organisationunit;
 
 /*
- * Copyright (c) 2004-2010, University of Oslo
+ * Copyright (c) 2004-2011, University of Oslo
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -35,30 +35,49 @@
 import org.hisp.dhis.dataset.DataSet;
 import org.hisp.dhis.dataset.DataSetService;
 import org.hisp.dhis.dataset.comparator.DataSetNameComparator;
+import org.hisp.dhis.organisationunit.OrganisationUnitGroupService;
+import org.hisp.dhis.organisationunit.OrganisationUnitGroupSet;
+import org.hisp.dhis.organisationunit.comparator.OrganisationUnitGroupSetNameComparator;
 import org.hisp.dhis.period.Cal;
 
 import com.opensymphony.xwork2.Action;
 
 /**
  * @author Nguyen Dang Quang
+ * @version $Id$
  */
 public class PrepareAddOrganisationUnitAction
     implements Action
 {
+    // -------------------------------------------------------------------------
+    // Dependencies
+    // -------------------------------------------------------------------------
+
     private DataSetService dataSetService;
-    
+
     public void setDataSetService( DataSetService dataSetService )
     {
         this.dataSetService = dataSetService;
     }
 
+    private OrganisationUnitGroupService organisationUnitGroupService;
+
+    public void setOrganisationUnitGroupService( OrganisationUnitGroupService organisationUnitGroupService )
+    {
+        this.organisationUnitGroupService = organisationUnitGroupService;
+    }
+
+    // -------------------------------------------------------------------------
+    // Output
+    // -------------------------------------------------------------------------
+
     private Date defaultDate;
 
     public Date getDefaultDate()
     {
         return defaultDate;
     }
-    
+
     private List<DataSet> dataSets;
 
     public List<DataSet> getDataSets()
@@ -66,6 +85,13 @@
         return dataSets;
     }
 
+    private List<OrganisationUnitGroupSet> groupSets;
+
+    public List<OrganisationUnitGroupSet> getGroupSets()
+    {
+        return groupSets;
+    }
+
     // -------------------------------------------------------------------------
     // Action implementation
     // -------------------------------------------------------------------------
@@ -73,11 +99,16 @@
     public String execute()
     {
         defaultDate = new Cal().set( 1900, 1, 1 ).time();
-        
+
         dataSets = new ArrayList<DataSet>( dataSetService.getAllDataSets() );
 
+        groupSets = new ArrayList<OrganisationUnitGroupSet>( organisationUnitGroupService
+            .getCompulsoryOrganisationUnitGroupSetsWithMembers() );
+
         Collections.sort( dataSets, new DataSetNameComparator() );
-        
+
+        Collections.sort( groupSets, new OrganisationUnitGroupSetNameComparator() );
+
         return SUCCESS;
     }
 }

=== 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	2011-05-05 21:15:45 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/java/org/hisp/dhis/oum/action/organisationunit/UpdateOrganisationUnitAction.java	2011-05-22 12:19:06 +0000
@@ -1,7 +1,7 @@
 package org.hisp.dhis.oum.action.organisationunit;
 
 /*
- * Copyright (c) 2004-2010, University of Oslo
+ * Copyright (c) 2004-2011, University of Oslo
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -29,21 +29,27 @@
 
 import static org.hisp.dhis.system.util.TextUtils.nullIfEmpty;
 
+import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Date;
 import java.util.HashSet;
+import java.util.List;
 
 import org.hisp.dhis.dataset.DataSet;
 import org.hisp.dhis.dataset.DataSetService;
 import org.hisp.dhis.i18n.I18nFormat;
 import org.hisp.dhis.organisationunit.OrganisationUnit;
+import org.hisp.dhis.organisationunit.OrganisationUnitGroup;
+import org.hisp.dhis.organisationunit.OrganisationUnitGroupService;
+import org.hisp.dhis.organisationunit.OrganisationUnitGroupSet;
 import org.hisp.dhis.organisationunit.OrganisationUnitService;
 
 import com.opensymphony.xwork2.Action;
 
 /**
  * @author Torgeir Lorange Ostby
- * @version $Id: UpdateOrganisationUnitAction.java 1898 2006-09-22 12:06:56Z torgeilo $
+ * @version $Id: UpdateOrganisationUnitAction.java 1898 2006-09-22 12:06:56Z
+ *          torgeilo $
  */
 public class UpdateOrganisationUnitAction
     implements Action
@@ -66,19 +72,31 @@
         this.organisationUnitService = organisationUnitService;
     }
 
+    private OrganisationUnitGroupService organisationUnitGroupService;
+
+    public void setOrganisationUnitGroupService( OrganisationUnitGroupService organisationUnitGroupService )
+    {
+        this.organisationUnitGroupService = organisationUnitGroupService;
+    }
+
     private DataSetService dataSetService;
 
     public void setDataSetService( DataSetService dataSetService )
     {
         this.dataSetService = dataSetService;
     }
-    
+
     // -------------------------------------------------------------------------
     // Input
     // -------------------------------------------------------------------------
 
     private Integer id;
 
+    public Integer getOrganisationUnitId()
+    {
+        return id;
+    }
+
     public void setId( Integer id )
     {
         this.id = id;
@@ -139,7 +157,7 @@
     {
         this.coordinates = coordinates;
     }
-    
+
     private String featureType;
 
     public void setFeatureType( String featureType )
@@ -153,7 +171,7 @@
     {
         this.url = url;
     }
-    
+
     private String contactPerson;
 
     public void setContactPerson( String contactPerson )
@@ -189,6 +207,20 @@
         this.dataSets = dataSets;
     }
 
+    private List<String> orgUnitGroupSets = new ArrayList<String>();
+
+    public void setOrgUnitGroupSets( List<String> orgUnitGroupSets )
+    {
+        this.orgUnitGroupSets = orgUnitGroupSets;
+    }
+
+    private List<String> orgUnitGroups = new ArrayList<String>();
+
+    public void setOrgUnitGroups( List<String> orgUnitGroups )
+    {
+        this.orgUnitGroups = orgUnitGroups;
+    }
+
     // -------------------------------------------------------------------------
     // Action implementation
     // -------------------------------------------------------------------------
@@ -201,7 +233,7 @@
         coordinates = nullIfEmpty( coordinates );
         featureType = nullIfEmpty( featureType );
         url = nullIfEmpty( url );
-        
+
         contactPerson = nullIfEmpty( contactPerson );
         address = nullIfEmpty( address );
         email = nullIfEmpty( email );
@@ -241,18 +273,43 @@
         {
             dataSet.getSources().remove( organisationUnit );
         }
-        
+
         organisationUnit.getDataSets().clear();
-        
+
         for ( String id : dataSets ) // Add selected
         {
             DataSet dataSet = dataSetService.getDataSet( Integer.parseInt( id ) );
-            dataSet.getSources().add( organisationUnit );
-            dataSetService.updateDataSet( dataSet );
+            
+            if ( dataSet != null )
+            {
+                dataSet.getSources().add( organisationUnit );
+                dataSetService.updateDataSet( dataSet );
+            }
         }
-        
+
         organisationUnitService.updateOrganisationUnit( organisationUnit );
 
+        for ( int i = 0; i < orgUnitGroupSets.size(); i++ )
+        {
+            OrganisationUnitGroupSet groupSet = organisationUnitGroupService.getOrganisationUnitGroupSet( Integer
+                .parseInt( orgUnitGroupSets.get( i ) ) );
+
+            OrganisationUnitGroup oldGroup = groupSet.getGroup( organisationUnit );
+
+            OrganisationUnitGroup newGroup = organisationUnitGroupService.getOrganisationUnitGroup( Integer
+                .parseInt( orgUnitGroups.get( i ) ) );
+
+            if ( oldGroup != null && oldGroup.getMembers().remove( organisationUnit ) )
+            {
+                organisationUnitGroupService.updateOrganisationUnitGroup( oldGroup );
+            }
+
+            if ( newGroup != null && newGroup.getMembers().add( organisationUnit ) )
+            {
+                organisationUnitGroupService.updateOrganisationUnitGroup( newGroup );
+            }
+        }
+
         return SUCCESS;
     }
 }

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/resources/META-INF/dhis/beans.xml	2011-03-17 10:20:34 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/resources/META-INF/dhis/beans.xml	2011-05-22 12:19:06 +0000
@@ -25,6 +25,9 @@
 		<property name="organisationUnitService">
 			<ref bean="org.hisp.dhis.organisationunit.OrganisationUnitService" />
 		</property>
+		<property name="organisationUnitGroupService">
+			<ref bean="org.hisp.dhis.organisationunit.OrganisationUnitGroupService" />
+		</property>
 		<property name="dataSetService">
 			<ref bean="org.hisp.dhis.dataset.DataSetService"/>
 		</property>
@@ -46,6 +49,9 @@
 		<property name="organisationUnitService">
 			<ref bean="org.hisp.dhis.organisationunit.OrganisationUnitService" />
 		</property>
+		<property name="organisationUnitGroupService">
+			<ref bean="org.hisp.dhis.organisationunit.OrganisationUnitGroupService" />
+		</property>
 		<property name="dataSetService">
 			<ref bean="org.hisp.dhis.dataset.DataSetService"/>
 		</property>
@@ -85,6 +91,9 @@
 		<property name="organisationUnitService">
 			<ref bean="org.hisp.dhis.organisationunit.OrganisationUnitService" />
 		</property>
+		<property name="organisationUnitGroupService">
+			<ref bean="org.hisp.dhis.organisationunit.OrganisationUnitGroupService" />
+		</property>
 		<property name="dataSetService">
 			<ref bean="org.hisp.dhis.dataset.DataSetService"/>
 		</property>
@@ -106,6 +115,9 @@
 		<property name="dataSetService">
 			<ref bean="org.hisp.dhis.dataset.DataSetService"/>
 		</property>
+		<property name="organisationUnitGroupService">
+			<ref bean="org.hisp.dhis.organisationunit.OrganisationUnitGroupService" />
+		</property>
 	</bean>
 
 	<!-- OrganisationUnitGroup -->

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/resources/org/hisp/dhis/oum/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/resources/org/hisp/dhis/oum/i18n_module.properties	2011-03-29 20:21:47 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/resources/org/hisp/dhis/oum/i18n_module.properties	2011-05-22 12:19:06 +0000
@@ -117,4 +117,7 @@
 get_report_as_pdf 									= Download as PDF
 please_wait_while_downloading						= Please wait while downloading report
 please_wait_while_searching							= Please wait while searching
-hierarchy											= Hierarchy
\ No newline at end of file
+hierarchy											= Hierarchy
+data_sets											= Data sets
+organisation_unit_groups							= Organisation unit groups
+select_group										= Select group
\ No newline at end of file

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/resources/org/hisp/dhis/oum/i18n_module_vi_VN.properties'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/resources/org/hisp/dhis/oum/i18n_module_vi_VN.properties	2011-02-22 08:41:34 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/resources/org/hisp/dhis/oum/i18n_module_vi_VN.properties	2011-05-22 12:19:06 +0000
@@ -1,111 +1,112 @@
 which_is_a_member_of_the_same_exclusive_group_set=l\u00e0 th\u00e0nh vi\u00ean c\u1ee7a c\u00f9ng m\u1ed9t lo\u1ea1i nh\u00f3m duy nh\u1ea5t
 vertication_of_the_org_unit_to_move_failed=Ki\u1ec3m tra \u0111\u01a1n v\u1ecb c\u1ea7n di chuy\u1ec3n kh\u00f4ng th\u00e0nh c\u00f4ng v\u1edbi l\u1ed7i sau
 verification_of_the_new_parent_org_unit_failed=Ki\u1ec3m tra \u0111\u01a1n v\u1ecb cha m\u1edbi kh\u00f4ng th\u00e0nh c\u00f4ng v\u1edbi l\u1ed7i sau
-url=Li\u00EAn k\u1EBFt URL
-this_org_unit_has_no_children=\u0110\u01A1n v\u1ECB n\u00E0y kh\u00F4ng c\u00F3 con
-this_org_unit_cannot_moved=\u0110\u01A1n v\u1ECB n\u00E0y kh\u00F4ng th\u1EC3 di chuy\u1EC3n. Xin ch\u1ECDn m\u1ED9t \u0111\u01A1n v\u1ECB kh\u00E1c \u0111\u1EC3 di chuy\u1EC3n
-there_are_no_org_unit_groups=Kh\u00F4ng t\u1ED3n t\u1EA1i nh\u00F3m \u0111\u01A1n v\u1ECB n\u00E0o
-there_are_no_org_unit_group_sets=Kh\u00F4ng c\u00F3 lo\u1EA1i nh\u00F3m \u0111\u01A1n v\u1ECB n\u00E0o
-the_selected_organisation_unit_will_be_moved_to_root=\u0110\u01A1n v\u1ECB \u0111ang ch\u1ECDn s\u1EBD \u0111\u01B0\u1EE3c di chuy\u1EC3n t\u1EDBi v\u1ECB tr\u00ED g\u1ED1c
-the_selected_organisation_unit_is_already_a_root=\u0110\u01A1n v\u1ECB \u0111ang ch\u1ECDn \u0111\u00E3 l\u00E0 \u0111\u01A1n v\u1ECB g\u1ED1c. Xin ch\u1ECDn m\u1ED9t \u0111\u01A1n v\u1ECB cha kh\u00E1c
-the_org_unit_to_move_is_approved=\u0110\u01A1n v\u1ECB di chuy\u1EC3n \u0111\u01B0\u1EE3c ch\u1EA5p nh\u1EADn
-the_new_parent_org_unit_is_approved=\u0110\u01A1n v\u1ECB cha m\u1EDBi \u0111\u01B0\u1EE3c ch\u1EA5p nh\u1EADn
-the_group_set_can_not_be_creat_bec_it_is_exc_and=Lo\u1EA1i nh\u00F3m kh\u00F4ng th\u1EC3 t\u1EA1o v\u00EC n\u00F3 duy nh\u1EA5t v\u00E0
-specify_an_opening_date=Vui l\u00F2ng ch\u1EC9 \u0111\u1ECBnh ng\u00E0y m\u1EDF
-specify_a_short_name=Vui l\u00F2ng ch\u1EC9 \u0111\u1ECBnh t\u00EAn vi\u1EBFt t\u1EAFt
-specify_a_name=Vui l\u00F2ng ch\u1EC9 \u0111\u1ECBnh t\u00EAn
-specify_a_description=Ch\u1EC9 \u0111\u1ECBnh m\u1ED9t m\u00F4 t\u1EA3
+url=Li\u00ean k\u1ebft URL
+this_org_unit_has_no_children=\u0110\u01a1n v\u1ecb n\u00e0y kh\u00f4ng c\u00f3 con
+this_org_unit_cannot_moved=\u0110\u01a1n v\u1ecb n\u00e0y kh\u00f4ng th\u1ec3 di chuy\u1ec3n. Xin ch\u1ecdn m\u1ed9t \u0111\u01a1n v\u1ecb kh\u00e1c \u0111\u1ec3 di chuy\u1ec3n
+there_are_no_org_unit_groups=Kh\u00f4ng t\u1ed3n t\u1ea1i nh\u00f3m \u0111\u01a1n v\u1ecb n\u00e0o
+there_are_no_org_unit_group_sets=Kh\u00f4ng c\u00f3 lo\u1ea1i nh\u00f3m \u0111\u01a1n v\u1ecb n\u00e0o
+the_selected_organisation_unit_will_be_moved_to_root=\u0110\u01a1n v\u1ecb \u0111ang ch\u1ecdn s\u1ebd \u0111\u01b0\u1ee3c di chuy\u1ec3n t\u1edbi v\u1ecb tr\u00ed g\u1ed1c
+the_selected_organisation_unit_is_already_a_root=\u0110\u01a1n v\u1ecb \u0111ang ch\u1ecdn \u0111\u00e3 l\u00e0 \u0111\u01a1n v\u1ecb g\u1ed1c. Xin ch\u1ecdn m\u1ed9t \u0111\u01a1n v\u1ecb cha kh\u00e1c
+the_org_unit_to_move_is_approved=\u0110\u01a1n v\u1ecb di chuy\u1ec3n \u0111\u01b0\u1ee3c ch\u1ea5p nh\u1eadn
+the_new_parent_org_unit_is_approved=\u0110\u01a1n v\u1ecb cha m\u1edbi \u0111\u01b0\u1ee3c ch\u1ea5p nh\u1eadn
+the_group_set_can_not_be_creat_bec_it_is_exc_and=Lo\u1ea1i nh\u00f3m kh\u00f4ng th\u1ec3 t\u1ea1o v\u00ec n\u00f3 duy nh\u1ea5t v\u00e0
+specify_an_opening_date=Vui l\u00f2ng ch\u1ec9 \u0111\u1ecbnh ng\u00e0y m\u1edf
+specify_a_short_name=Vui l\u00f2ng ch\u1ec9 \u0111\u1ecbnh t\u00ean vi\u1ebft t\u1eaft
+specify_a_name=Vui l\u00f2ng ch\u1ec9 \u0111\u1ecbnh t\u00ean
+specify_a_description=Ch\u1ec9 \u0111\u1ecbnh m\u1ed9t m\u00f4 t\u1ea3
 sort_order=S\u1eafp x\u1ebfp
-short_name_in_use=T\u00EAn vi\u1EBFt t\u1EAFt n\u00E0y \u0111\u00E3 \u0111\u01B0\u1EE3c s\u1EED d\u1EE5ng. Xin ch\u1EC9 \u0111\u1ECBnh m\u1ED9t t\u00EAn vi\u1EBFt t\u1EAFt kh\u00E1c
-selected_groups=C\u00E1c nh\u00F3m \u0111\u00E3 ch\u1ECDn
-select_the_new_parent_org_unit_for_the_one_to_move=Ch\u1ECDn m\u1ED9t \u0111\u01A1n v\u1ECB cha cho \u0111\u01A1n v\u1ECB di chuy\u1EC3n t\u1EDBi
-select_an_org_unit_to_move=Ch\u1ECDn m\u1ED9t \u0111\u01A1n v\u1ECB \u0111\u1EC3 di chuy\u1EC3n
-search_result=K\u1EBFt qu\u1EA3 t\u00ECm ki\u1EBFm
-search=T\u00ECm ki\u1EBFm
-saving_the_org_unit_group_set_failed=Qu\u00E1 tr\u00ECnh l\u01B0u lo\u1EA1i nh\u00F3m \u0111\u01A1n v\u1ECB kh\u00F4ng th\u00E0nh c\u00F4ng v\u1EDBi th\u00F4ng b\u00E1o sau
-saving_the_org_unit_group_failed=L\u01B0u d\u01A1n v\u1ECB kh\u00F4ng th\u00E0nh c\u00F4ng v\u1EDBi th\u00F4ng b\u00E1o sau
-saving_the_org_unit_failed=L\u01B0u \u0111\u01A1n v\u1ECB kh\u00F4ng th\u00E0nh c\u00F4ng v\u1EDBi l\u1ED7i sau
-reset=Thi\u1EBFt l\u1EADp l\u1EA1i
-remove_selected=X\u00F3a c\u00E1c m\u1EE5c ch\u1ECDn
-remove_all=X\u00F3a t\u1EA5t c\u1EA3
+short_name_in_use=T\u00ean vi\u1ebft t\u1eaft n\u00e0y \u0111\u00e3 \u0111\u01b0\u1ee3c s\u1eed d\u1ee5ng. Xin ch\u1ec9 \u0111\u1ecbnh m\u1ed9t t\u00ean vi\u1ebft t\u1eaft kh\u00e1c
+selected_groups=C\u00e1c nh\u00f3m \u0111\u00e3 ch\u1ecdn
+select_the_new_parent_org_unit_for_the_one_to_move=Ch\u1ecdn m\u1ed9t \u0111\u01a1n v\u1ecb cha cho \u0111\u01a1n v\u1ecb di chuy\u1ec3n t\u1edbi
+select_an_org_unit_to_move=Ch\u1ecdn m\u1ed9t \u0111\u01a1n v\u1ecb \u0111\u1ec3 di chuy\u1ec3n
+search_result=K\u1ebft qu\u1ea3 t\u00ecm ki\u1ebfm
+search=T\u00ecm ki\u1ebfm
+saving_the_org_unit_group_set_failed=Qu\u00e1 tr\u00ecnh l\u01b0u lo\u1ea1i nh\u00f3m \u0111\u01a1n v\u1ecb kh\u00f4ng th\u00e0nh c\u00f4ng v\u1edbi th\u00f4ng b\u00e1o sau
+saving_the_org_unit_group_failed=L\u01b0u d\u01a1n v\u1ecb kh\u00f4ng th\u00e0nh c\u00f4ng v\u1edbi th\u00f4ng b\u00e1o sau
+saving_the_org_unit_failed=L\u01b0u \u0111\u01a1n v\u1ecb kh\u00f4ng th\u00e0nh c\u00f4ng v\u1edbi l\u1ed7i sau
+reset=Thi\u1ebft l\u1eadp l\u1ea1i
+remove_selected=X\u00f3a c\u00e1c m\u1ee5c ch\u1ecdn
+remove_all=X\u00f3a t\u1ea5t c\u1ea3
 registers_date=\u0110\u0103ng k\u00ed d\u1eef li\u1ec7u
-polygon_coordinates=C\u00E1c t\u1ECDa \u0111\u1ED9 \u0111a gi\u00E1c
-please_specify_a_name=Vui l\u00F2ng ch\u1EC9 \u0111\u1ECBnh t\u00EAn
-please_select_from_tree=H\u00E3y ch\u1ECDn t\u1EEB c\u00E2y th\u01B0 m\u1EE5c (t\u00F9y \u00FD)
-organisation_units=C\u00E1c \u0111\u01A1n v\u1ECB
-organisation_unit_level_management=Qu\u1EA3n l\u00FD c\u1EA5p \u0111\u01A1n v\u1ECB
-organisation_unit_group_set=T\u1EADp c\u00E1c nh\u00F3m \u0111\u01A1n v\u1ECB
-org_unit_with_children_cannot_be_closed=Kh\u00F4ng th\u1EC3 \u0111\u00F3ng m\u1ED9t \u0111\u01A1n v\u1ECB c\u00F3 \u0111\u01A1n v\u1ECB con. Xin x\u00F3a tr\u01B0\u1EDDng ng\u00E0y \u0111\u00F3ng
-org_unit_search_management=T\u00ECm ki\u1EBFm \u0111\u01A1n v\u1ECB
-org_unit_search=T\u00ECm ki\u1EBFm \u0111\u01A1n v\u1ECB
-org_unit_management=Qu\u1EA3n l\u00ED c\u00E1c \u0111\u01A1n v\u1ECB
-org_unit_level=C\u1EA5p \u0111\u01A1n v\u1ECB
-org_unit_group_set_management=Qu\u1EA3n l\u00FD lo\u1EA1i nh\u00F3m \u0111\u01A1n v\u1ECB
-org_unit_group_set=Lo\u1EA1i nh\u00F3m \u0111\u01A1n v\u1ECB
-org_unit_group_management=Qu\u1EA3n l\u00ED nh\u00F3m \u0111\u01A1n v\u1ECB
-org_unit_group=Nh\u00F3m \u0111\u01A1n v\u1ECB
-org_unit_code_in_use=M\u00E3 \u0111\u01A1n v\u1ECB n\u00E0y \u0111\u00E3 \u0111\u01B0\u1EE3c s\u1EED d\u1EE5ng. Xin ch\u1ECDn m\u1ED9t m\u00E3 \u0111\u01A1n v\u1ECB kh\u00E1c
-org_unit_code=M\u00E3 \u0111\u01A1n v\u1ECB
-org_unit=\u0110\u01A1n v\u1ECB
-options=C\u00E1c ch\u1ECDn l\u1EF1a
-operations=Thao t\u00E1c
-object_not_deleted_associated_by_objects=\u0110\u1ED1i t\u01B0\u1EE3ng kh\u00F4ng x\u00F3a \u0111\u01B0\u1EE3c v\u00EC \u0111\u01B0\u1EE3c li\u00EAn k\u1EBFt v\u1EDBi c\u00E1c \u0111\u1ED1i t\u01B0\u1EE3ng ph\u00E2n lo\u1EA1i
+polygon_coordinates=C\u00e1c t\u1ecda \u0111\u1ed9 \u0111a gi\u00e1c
+please_specify_a_name=Vui l\u00f2ng ch\u1ec9 \u0111\u1ecbnh t\u00ean
+please_select_from_tree=H\u00e3y ch\u1ecdn t\u1eeb c\u00e2y th\u01b0 m\u1ee5c (t\u00f9y \u00fd)
+organisation_units=C\u00e1c \u0111\u01a1n v\u1ecb
+organisation_unit_level_management=Qu\u1ea3n l\u00fd c\u1ea5p \u0111\u01a1n v\u1ecb
+organisation_unit_group_set=T\u1eadp c\u00e1c nh\u00f3m \u0111\u01a1n v\u1ecb
+org_unit_with_children_cannot_be_closed=Kh\u00f4ng th\u1ec3 \u0111\u00f3ng m\u1ed9t \u0111\u01a1n v\u1ecb c\u00f3 \u0111\u01a1n v\u1ecb con. Xin x\u00f3a tr\u01b0\u1eddng ng\u00e0y \u0111\u00f3ng
+org_unit_search_management=T\u00ecm ki\u1ebfm \u0111\u01a1n v\u1ecb
+org_unit_search=T\u00ecm ki\u1ebfm \u0111\u01a1n v\u1ecb
+org_unit_management=Qu\u1ea3n l\u00ed c\u00e1c \u0111\u01a1n v\u1ecb
+org_unit_level=C\u1ea5p \u0111\u01a1n v\u1ecb
+org_unit_group_set_management=Qu\u1ea3n l\u00fd lo\u1ea1i nh\u00f3m \u0111\u01a1n v\u1ecb
+org_unit_group_set=Lo\u1ea1i nh\u00f3m \u0111\u01a1n v\u1ecb
+org_unit_group_management=Qu\u1ea3n l\u00ed nh\u00f3m \u0111\u01a1n v\u1ecb
+org_unit_group=Nh\u00f3m \u0111\u01a1n v\u1ecb
+org_unit_code_in_use=M\u00e3 \u0111\u01a1n v\u1ecb n\u00e0y \u0111\u00e3 \u0111\u01b0\u1ee3c s\u1eed d\u1ee5ng. Xin ch\u1ecdn m\u1ed9t m\u00e3 \u0111\u01a1n v\u1ecb kh\u00e1c
+org_unit_code=M\u00e3 \u0111\u01a1n v\u1ecb
+org_unit=\u0110\u01a1n v\u1ecb
+options=C\u00e1c ch\u1ecdn l\u1ef1a
+operations=Thao t\u00e1c
+object_not_deleted_associated_by_objects=\u0110\u1ed1i t\u01b0\u1ee3ng kh\u00f4ng x\u00f3a \u0111\u01b0\u1ee3c v\u00ec \u0111\u01b0\u1ee3c li\u00ean k\u1ebft v\u1edbi c\u00e1c \u0111\u1ed1i t\u01b0\u1ee3ng ph\u00e2n lo\u1ea1i
 number_of_members=S\u1ed1 l\u01b0\u1ee3ng th\u00e0nh vi\u00ean
 number_of_group_members=S\u1ed1 nh\u00f3m th\u00e0nh vi\u00ean
 not_selected_moved_to_root_position=Kh\u00f4ng ch\u1ecdn, di chuy\u1ec3n t\u1edbi v\u1ecb tr\u00ed g\u1ed1c
 not_selected=Kh\u00f4ng \u0111\u01b0\u1ee3c ch\u1ecdn
 name_is_already_in_use=T\u00ean n\u00e0y \u0111\u00e3 \u0111\u01b0\u1ee3c s\u1eed d\u1ee5ng. H\u00e3y ch\u1ecdn m\u1ed9t t\u00ean kh\u00e1c
 name_in_use=T\u00ean n\u00e0y \u0111\u00e3 \u0111\u01b0\u1ee3c s\u1eed d\u1ee5ng. Xin ch\u1ecdn m\u1ed9t t\u00ean kh\u00e1c
-move_selected=Di chuy\u1EC3n c\u00E1c m\u1EE5c \u0111\u00E3 ch\u1ECDn
-move_all=Di chuy\u1EC3n t\u1EA5t c\u1EA3
-members_of_the_group=C\u00E1c th\u00E0nh vi\u00EAn trong nh\u00F3m
-longitude=kinh tuy\u1EBFn
-loading=\u0110ang n\u1EA1p
-level=C\u1EA5p
-latitude=V\u0129 \u0111\u1ED9
-last_updated=C\u1EADp nh\u1EADt cu\u1ED1i
-is_a_member_of_more_than_one_selected_group=L\u00E0 th\u00E0nh vi\u00EAn c\u1EE7a h\u01A1n m\u1ED9t nh\u00F3m \u0111\u01B0\u1EE3c ch\u1ECDn
-intro_org_unit_search=T\u00ECm ki\u1EBFm c\u00E1c \u0111\u01A1n v\u1ECB d\u1EF1a v\u00E0o t\u00EAn v\u00E0 t\u1EADp h\u1EE3p. Xem th\u00F4ng tin chi ti\u1EBFt cho t\u1EEBng \u0111\u01A1n v\u1ECB.
-intro_org_unit_level=T\u1EA1o, ch\u1EC9nh s\u1EEDa, xem v\u00E0 x\u00F3a c\u00E1c t\u00EAn \u0111\u1EB7c tr\u01B0ng cho c\u00E1c c\u1EA5p c\u1EE7a \u0111\u01A1n v\u1ECB trong h\u1EC7 th\u1ED1ng
-intro_org_unit_group_set=T\u1EA1o, ch\u1EC9nh s\u1EEDa, xem v\u00E0 x\u00F3a c\u00E1c t\u1EADp c\u00E1c nh\u00F3m c\u1EE7a \u0111\u01A1n v\u1ECB. C\u00E1c t\u1EADp c\u1EE7a nh\u00F3m \u0111\u01A1n v\u1ECB \u0111\u01B0\u1EE3c d\u00F9ng cho ph\u00E2n t\u00EDch n\u00E2ng cao.
-intro_org_unit_group=T\u1EA1o, ch\u1EC9nh s\u1EEDa, xem v\u00E0 x\u00F3a c\u00E1c t\u1EADp \u0111\u01A1n v\u1ECB. C\u00E1c nh\u00F3m \u0111\u01B0\u1EE3c d\u00F9ng cho ph\u00E2n t\u00EDch n\u00E2ng cao.
-intro_org_unit=T\u1EA1o, ch\u1EC9nh s\u1EEDa, xem v\u00E0 x\u00F3a c\u00E1c \u0111\u01A1n v\u1ECB m\u00E0 ch\u00FAng l\u00E0 c\u00E1c ban ng\u00E0nh, v\u0103n ph\u00F2ng tr\u1EE5 s\u1EDF, b\u1EC7nh vi\u1EC7n v\u00E0 tr\u1EA1m Y t\u1EBF.
-intro_hierarchy_operations_menu=Di chuy\u1EC3n c\u00E1c \u0111\u01A1n v\u1ECB trong c\u00E2y th\u01B0 m\u1EE5c. T\u1EA5t c\u1EA3 c\u00E1c \u0111\u01A1n v\u1ECB con s\u1EBD \u0111\u01B0\u1EE3c l\u1EA5y ra kh\u1ECFi c\u00F9ng v\u1EDBi \u0111\u01A1n v\u1ECB cha.
+move_selected=Di chuy\u1ec3n c\u00e1c m\u1ee5c \u0111\u00e3 ch\u1ecdn
+move_all=Di chuy\u1ec3n t\u1ea5t c\u1ea3
+members_of_the_group=C\u00e1c th\u00e0nh vi\u00ean trong nh\u00f3m
+longitude=kinh tuy\u1ebfn
+loading=\u0110ang n\u1ea1p
+level=C\u1ea5p
+latitude=V\u0129 \u0111\u1ed9
+last_updated=C\u1eadp nh\u1eadt cu\u1ed1i
+is_a_member_of_more_than_one_selected_group=L\u00e0 th\u00e0nh vi\u00ean c\u1ee7a h\u01a1n m\u1ed9t nh\u00f3m \u0111\u01b0\u1ee3c ch\u1ecdn
+intro_org_unit_search=T\u00ecm ki\u1ebfm c\u00e1c \u0111\u01a1n v\u1ecb d\u1ef1a v\u00e0o t\u00ean v\u00e0 t\u1eadp h\u1ee3p. Xem th\u00f4ng tin chi ti\u1ebft cho t\u1eebng \u0111\u01a1n v\u1ecb.
+intro_org_unit_level=T\u1ea1o, ch\u1ec9nh s\u1eeda, xem v\u00e0 x\u00f3a c\u00e1c t\u00ean \u0111\u1eb7c tr\u01b0ng cho c\u00e1c c\u1ea5p c\u1ee7a \u0111\u01a1n v\u1ecb trong h\u1ec7 th\u1ed1ng
+intro_org_unit_group_set=T\u1ea1o, ch\u1ec9nh s\u1eeda, xem v\u00e0 x\u00f3a c\u00e1c t\u1eadp c\u00e1c nh\u00f3m c\u1ee7a \u0111\u01a1n v\u1ecb. C\u00e1c t\u1eadp c\u1ee7a nh\u00f3m \u0111\u01a1n v\u1ecb \u0111\u01b0\u1ee3c d\u00f9ng cho ph\u00e2n t\u00edch n\u00e2ng cao.
+intro_org_unit_group=T\u1ea1o, ch\u1ec9nh s\u1eeda, xem v\u00e0 x\u00f3a c\u00e1c t\u1eadp \u0111\u01a1n v\u1ecb. C\u00e1c nh\u00f3m \u0111\u01b0\u1ee3c d\u00f9ng cho ph\u00e2n t\u00edch n\u00e2ng cao.
+intro_org_unit=T\u1ea1o, ch\u1ec9nh s\u1eeda, xem v\u00e0 x\u00f3a c\u00e1c \u0111\u01a1n v\u1ecb m\u00e0 ch\u00fang l\u00e0 c\u00e1c ban ng\u00e0nh, v\u0103n ph\u00f2ng tr\u1ee5 s\u1edf, b\u1ec7nh vi\u1ec7n v\u00e0 tr\u1ea1m Y t\u1ebf.
+intro_hierarchy_operations_menu=Di chuy\u1ec3n c\u00e1c \u0111\u01a1n v\u1ecb trong c\u00e2y th\u01b0 m\u1ee5c. T\u1ea5t c\u1ea3 c\u00e1c \u0111\u01a1n v\u1ecb con s\u1ebd \u0111\u01b0\u1ee3c l\u1ea5y ra kh\u1ecfi c\u00f9ng v\u1edbi \u0111\u01a1n v\u1ecb cha.
 hierarchy_operations_menu=Thao t\u00e1c c\u1ea5u tr\u00fac
 hierarchy_operations=Thao t\u00e1c c\u1ea5u tr\u00fac
-hide_warning=\u1EA8n khuy\u1EBFn c\u00E1o
-group_members=C\u00E1c th\u00E0nh vi\u00EAn nh\u00F3m
-found=\u0110\u00E3 t\u00ECm th\u1EA5y
-filter_by_name=L\u1ECDc theo t\u00EAn
-failed_get_organisation_unit_with_id=Kh\u00F4ng th\u1EC3 truy xu\u1EA5t \u0111\u01A1n v\u1ECB c\u00F3 id l\u00E0
-exclusive=Duy nh\u1EA5t
-enter_a_valid_opening_date=Vui l\u00F2ng ch\u1EC9 \u0111\u1ECBnh ng\u00E0y m\u1EDF h\u1EE3p l\u1EC7
-enter_a_valid_close_date=vui l\u00F2ng nh\u1EADp m\u1ED9t ng\u00E0y \u0111\u00F3ng h\u1EE3p l\u1EC7
-edit_org_unit_group_set=Ch\u1EC9nh s\u1EEDa lo\u1EA1i nh\u00F3m \u0111\u01A1n v\u1ECB
-edit_org_unit_group=Ch\u1EC9nh s\u1EEDa nh\u00F3m \u0111\u01A1n v\u1ECB
-edit_org_unit=Ch\u1EC9nh s\u1EEDa \u0111\u01A1n v\u1ECB
-details=Chi ti\u1EBFt
-criteria=Ti\u00EAu chu\u1EA9n
-create_new_org_unit_group_set=T\u1EA1o m\u1EDBi lo\u1EA1i nh\u00F3m \u0111\u01A1n v\u1ECB
+hide_warning=\u1ea8n khuy\u1ebfn c\u00e1o
+group_members=C\u00e1c th\u00e0nh vi\u00ean nh\u00f3m
+found=\u0110\u00e3 t\u00ecm th\u1ea5y
+filter_by_name=L\u1ecdc theo t\u00ean
+failed_get_organisation_unit_with_id=Kh\u00f4ng th\u1ec3 truy xu\u1ea5t \u0111\u01a1n v\u1ecb c\u00f3 id l\u00e0
+exclusive=Duy nh\u1ea5t
+enter_a_valid_opening_date=Vui l\u00f2ng ch\u1ec9 \u0111\u1ecbnh ng\u00e0y m\u1edf h\u1ee3p l\u1ec7
+enter_a_valid_close_date=vui l\u00f2ng nh\u1eadp m\u1ed9t ng\u00e0y \u0111\u00f3ng h\u1ee3p l\u1ec7
+edit_org_unit_group_set=Ch\u1ec9nh s\u1eeda lo\u1ea1i nh\u00f3m \u0111\u01a1n v\u1ecb
+edit_org_unit_group=Ch\u1ec9nh s\u1eeda nh\u00f3m \u0111\u01a1n v\u1ecb
+edit_org_unit=Ch\u1ec9nh s\u1eeda \u0111\u01a1n v\u1ecb
+details=Chi ti\u1ebft
+criteria=Ti\u00eau chu\u1ea9n
+create_new_org_unit_group_set=T\u1ea1o m\u1edbi lo\u1ea1i nh\u00f3m \u0111\u01a1n v\u1ecb
 create_new_org_unit=T\u1ea1o m\u1edbi \u0111\u01a1n v\u1ecb
 crease_new_org_unit_group=T\u1ea1o m\u1edbi nh\u00f3m \u0111\u01a1n v\u1ecb
-coordinates=H\u1EC7 t\u1ECDa \u0111\u1ED9
+coordinates=H\u1ec7 t\u1ecda \u0111\u1ed9
 confirm_to_delete_org_unit_group_set=B\u1ea1n c\u00f3 ch\u1eafc mu\u1ed1n x\u00f3a lo\u1ea1i nh\u00f3m \u0111\u01a1n v\u1ecb?
 confirm_to_delete_org_unit_group=B\u1ea1n c\u00f3 mu\u1ed1n x\u00f3a nh\u00f3m \u0111\u01a1n v\u1ecb n\u00e0y?
 confirm_to_delete_org_unit=B\u1ea1n c\u00f3 mu\u1ed1n x\u00f3a \u0111\u01a1n v\u1ecb n\u00e0y?
 confirm=X\u00e1c nh\u1eadn
 compulsory_must_have_member=Nh\u00f3m b\u1eaft bu\u1ed9c c\u00f3 \u00edt nh\u1ea5t m\u1ed9t th\u00e0nh vi\u00ean
 compulsory=B\u1eaft bu\u1ed9c
-code=M\u00E3 s\u1ED1
-closed_date_cannot_be_before_opening_date=Ng\u00E0y \u0111\u00F3ng kh\u00F4ng th\u1EC3 tr\u01B0\u1EDBc ng\u00E0y m\u1EDF
+code=M\u00e3 s\u1ed1
+closed_date_cannot_be_before_opening_date=Ng\u00e0y \u0111\u00f3ng kh\u00f4ng th\u1ec3 tr\u01b0\u1edbc ng\u00e0y m\u1edf
 can_not_be_a_member_because_member_of=Kh\u00f4ng th\u1ec3 l\u00e0 th\u00e0nh vi\u00ean c\u1ee7a nh\u00f3m hi\u1ec7n th\u1eddi v\u00ec n\u00f3 l\u00e0 th\u00e0nh vi\u00ean c\u1ee7a
-available_organisation_units=C\u00E1c \u0111\u01A1n v\u1ECB c\u00F3 s\u1EB5n
-available_groups=Nh\u00F3m c\u00F3 s\u1EB5n
-assign_to_compulsory_group_set=G\u00E1n t\u1EADp nh\u00F3m \u0111\u01A1n v\u1ECB b\u1EAFt bu\u1ED9c
-as_the_current_group=Nh\u00F3m hi\u1EC7n t\u1EA1i
-any=B\u1EA5t k\u1EF3
-an_organisation_unit_cannot_be_moved_to_itself=M\u1ED9t \u0111\u01A1n v\u1ECB kh\u00F4ng th\u1EC3 di chuy\u1EC3n t\u1EDBi ch\u00EDnh n\u00F3. Xin ch\u1ECDn m\u1ED9t \u0111\u01A1n v\u1ECB cha m\u1EDBi
-an_org_unit_cannot_be_moved_to_be_its_own_child=M\u1ED9t \u0111\u01A1n v\u1ECB kh\u00F4ng th\u1EC3 di chuy\u1EC3n \u0111\u1EBFn con c\u1EE7a ch\u00EDnh n\u00F3. Xin ch\u1ECDn m\u1ED9t \u0111\u01A1n v\u1ECB cha m\u1EDBi
-all=T\u1EA5t c\u1EA3
-adding_the_org_unit_group_failed=Th\u00EAm m\u1EDBi \u0111\u01A1n v\u1ECB kh\u00F4ng th\u00E0nh c\u00F4ng v\u1EDBi l\u1ED7i sau
-adding_the_org_unit_failed=Th\u00EAm m\u1EDBi \u0111\u01A1n v\u1ECB kh\u00F4ng th\u00E0nh c\u00F4ng v\u1EDBi l\u1ED7i sau
\ No newline at end of file
+available_organisation_units=C\u00e1c \u0111\u01a1n v\u1ecb c\u00f3 s\u1eb5n
+available_groups=Nh\u00f3m c\u00f3 s\u1eb5n
+assign_to_compulsory_group_set=G\u00e1n t\u1eadp nh\u00f3m \u0111\u01a1n v\u1ecb b\u1eaft bu\u1ed9c
+as_the_current_group=Nh\u00f3m hi\u1ec7n t\u1ea1i
+any=B\u1ea5t k\u1ef3
+an_organisation_unit_cannot_be_moved_to_itself=M\u1ed9t \u0111\u01a1n v\u1ecb kh\u00f4ng th\u1ec3 di chuy\u1ec3n t\u1edbi ch\u00ednh n\u00f3. Xin ch\u1ecdn m\u1ed9t \u0111\u01a1n v\u1ecb cha m\u1edbi
+an_org_unit_cannot_be_moved_to_be_its_own_child=M\u1ed9t \u0111\u01a1n v\u1ecb kh\u00f4ng th\u1ec3 di chuy\u1ec3n \u0111\u1ebfn con c\u1ee7a ch\u00ednh n\u00f3. Xin ch\u1ecdn m\u1ed9t \u0111\u01a1n v\u1ecb cha m\u1edbi
+all=T\u1ea5t c\u1ea3
+adding_the_org_unit_group_failed=Th\u00eam m\u1edbi \u0111\u01a1n v\u1ecb kh\u00f4ng th\u00e0nh c\u00f4ng v\u1edbi l\u1ed7i sau
+adding_the_org_unit_failed=Th\u00EAm m\u1EDBi \u0111\u01A1n v\u1ECB kh\u00F4ng th\u00E0nh c\u00F4ng v\u1EDBi l\u1ED7i sau
+assign_to_data_set=G\u00e1n t\u1eadp h\u1ee3p d\u1eef li\u1ec7u cho \u0111\u01a1n v\u1ecb
\ No newline at end of file

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/resources/struts.xml'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/resources/struts.xml	2011-03-31 02:27:05 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/resources/struts.xml	2011-05-22 12:19:06 +0000
@@ -49,7 +49,7 @@
 
 		<action name="addOrganisationUnit"
 			class="org.hisp.dhis.oum.action.organisationunit.AddOrganisationUnitAction">
-			<result name="success" type="redirect">getCompulsoryGroupSet.action?organisationUnitId=${organisationUnitId}
+			<result name="success" type="redirect">organisationUnit.action
 			</result>
 			<param name="requiredAuthorities">F_ORGANISATIONUNIT_ADD</param>
 		</action>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/addOrganisationUnitForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/addOrganisationUnitForm.vm	2011-03-31 02:27:05 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/addOrganisationUnitForm.vm	2011-05-22 12:19:06 +0000
@@ -45,6 +45,12 @@
     <tr>
         <td><label for="url">$i18n.getString( "url" )</label></td>
         <td><input type="text" id="url" name="url" style="width:20em"/></td>
+    </tr>	
+	<tr>
+		<td style="height:15px" colspan="2">
+	</tr>
+    <tr>
+		<th colspan="2">$i18n.getString( "contact_details" )</th>
     </tr>
 	<tr>
 		<td><label for="contactPerson">$i18n.getString( "contact_person" ) </label></td>
@@ -61,6 +67,12 @@
     <tr>
         <td><label for="phoneNumber">$i18n.getString( "phone_number" )</label></td>
         <td><input type="text" id="phoneNumber" name="phoneNumber" style="width:20em"/></td>
+    </tr>	
+	<tr>
+		<td style="height:15px" colspan="2">
+	</tr>
+	<tr>
+		<th colspan="2">$i18n.getString( "data_sets" )</th>
     </tr>
     <tr>
     	<td><label for="availableDataSets">$i18n.getString( "available_data_sets" )</label></td>
@@ -82,6 +94,25 @@
     	<td><select multiple id="dataSets" name="dataSets" size="5" style="width:20em" ondblclick="moveSelectedById( 'dataSets', 'availableDataSets' )"></select></td>
     </tr>
 	<tr>
+		<td style="height:15px" colspan="2">
+	</tr>
+    <tr>
+		<th colspan="2">$i18n.getString( "organisation_unit_groups" )</th>
+    </tr>
+	#foreach ( $groupSet in $groupSets )
+    <tr>
+		<td>$encoder.htmlEncode( $groupSet.name )</td>			
+		<td>
+			<select id="selectedGroups" name="selectedGroups">
+				<option value="-1">[ $i18n.getString( "select_group" ) ]</option>
+				#foreach ( $group in $groupSet.organisationUnitGroups )
+				<option value="$group.id">$group.name</option>
+				#end
+			</select>
+		</td>
+    </tr>
+	#end
+	<tr>
 		<td></td>
 		<td>
 			<input type="submit" value="$i18n.getString( 'add' )" style="width:10em"/><input type="button" value="$i18n.getString( 'cancel' )" onclick="window.location.href='organisationUnit.action'" style="width:10em"/>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/updateOrganisationUnitForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/updateOrganisationUnitForm.vm	2011-03-31 02:27:05 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/updateOrganisationUnitForm.vm	2011-05-22 12:19:06 +0000
@@ -67,7 +67,6 @@
 	</tr>
     <tr>
         <td><label for="coordinates">$i18n.getString( "coordinates" )</label></td>
-
         <!-- onkeyup="setFeatureType(document.updateOrganisationUnitForm.featureType, this.value)" -->
         <td><textarea id="coordinates" name="coordinates" style="width:20em; height:5em">$!encoder.htmlEncode( $organisationUnit.coordinates )</textarea></td>
     </tr>
@@ -78,6 +77,12 @@
     <tr>
         <td><label for="url">$i18n.getString( "url" )</label></td>
         <td><input type="text" id="url" name="url" value="$!encoder.htmlEncode( $organisationUnit.url )" style="width:20em"></td>
+    </tr>    
+	<tr>
+		<td style="height:15px" colspan="2">
+	</tr>
+	<tr>
+		<th colspan="2">$i18n.getString( "contact_details" )</th>
     </tr>
 	<tr>
 		<td><label for="contactPerson">$i18n.getString( "contact_person" ) </label></td>
@@ -95,13 +100,21 @@
         <td><label for="phoneNumber">$i18n.getString( "phone_number" )</label></td>
         <td><input type="text" id="phoneNumber" name="phoneNumber" value="$!encoder.htmlEncode( $organisationUnit.phoneNumber )" style="width:20em"></td>
     </tr>
+	<tr>
+		<td style="height:15px" colspan="2">
+	</tr>
+    <tr>
+		<th colspan="2">$i18n.getString( "assign_to_data_set" )</th>
+    </tr>
     <tr>
     	<td><label for="availableDataSets">$i18n.getString( "available_data_sets" )</label></td>
-    	<td><select multiple id="availableDataSets" size="5" style="width:20em" ondblclick="moveSelectedById( 'availableDataSets', 'dataSets' )">
-    	#foreach( $dataSet in $availableDataSets )
-    	<option value="${dataSet.id}">$encoder.htmlEncode( $dataSet.name )</option>
-	    #end
-    	</select></td>
+    	<td>
+			<select multiple id="availableDataSets" size="5" style="width:20em" ondblclick="moveSelectedById( 'availableDataSets', 'dataSets' )">
+			#foreach( $dataSet in $availableDataSets )
+				<option value="${dataSet.id}">$encoder.htmlEncode( $dataSet.name )</option>
+			#end
+			</select>
+		</td>
     </tr>
     <tr>
     	<td></td>
@@ -111,13 +124,35 @@
 		</td>
     </tr>
     <tr>
-    	<td><label for="dataSets">$i18n.getString( "selected_data_sets" )</label></td>
-    	<td><select multiple id="dataSets" name="dataSets" size="5" style="width:20em" ondblclick="moveSelectedById( 'dataSets', 'availableDataSets' )">
-    	#foreach( $dataSet in $dataSets )
-    	<option value="${dataSet.id}">$encoder.htmlEncode( $dataSet.name )</option>
-	    #end
-    	</select></td>
-    </tr>
+    	<td><label for="dataSets">$i18n.getString( "data_sets" )</label></td>
+    	<td>
+			<select multiple id="dataSets" name="dataSets" size="5" style="width:20em" ondblclick="moveSelectedById( 'dataSets', 'availableDataSets' )">
+			#foreach( $dataSet in $dataSets )
+				<option value="${dataSet.id}">$encoder.htmlEncode( $dataSet.name )</option>
+			#end
+			</select>
+		</td>
+    </tr>
+	<tr>
+		<td style="height:15px" colspan="2">
+	</tr>
+	<tr>
+		<th colspan="2">$i18n.getString( "organisation_unit_groups" )</th>
+    </tr>
+	#foreach ( $groupSet in $groupSets )
+    <tr>
+		<td>$encoder.htmlEncode( $groupSet.name )</td>
+		<td>
+			<select id="orgUnitGroups" name="orgUnitGroups">
+				<option value="-1">[ $i18n.getString( "select_group" ) ]</option>
+				#foreach ( $group in $groupSet.organisationUnitGroups )
+				<option value="$group.id" #if( $group.members.contains( $organisationUnit ) ) selected="selected" #end>$group.name</option>
+				#end
+			</select>
+		</td>
+		<td><input type="hidden" name="orgUnitGroupSets" value="$groupSet.id"/></td>
+    </tr>
+	#end
 	<tr>
 		<td></td>
 		<td><input type="submit" value="$i18n.getString( 'save' )" style="width:10em"/><input type="button" value="$i18n.getString( 'cancel' )" onclick="window.location.href='organisationUnit.action'" style="width:10em"/></td>