← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 9998: local vn - Update feature in adding a new department

 

------------------------------------------------------------
revno: 9998
committer: Hieu <hieu.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2013-03-06 10:54:14 +0700
message:
  local vn - Update feature in adding a new department
modified:
  local/vn/dhis-web-spreadsheet-reporting/src/main/java/org/hisp/dhis/reportsheet/organisationunit/action/AddDepartmentAction.java


--
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 'local/vn/dhis-web-spreadsheet-reporting/src/main/java/org/hisp/dhis/reportsheet/organisationunit/action/AddDepartmentAction.java'
--- local/vn/dhis-web-spreadsheet-reporting/src/main/java/org/hisp/dhis/reportsheet/organisationunit/action/AddDepartmentAction.java	2013-01-03 10:00:51 +0000
+++ local/vn/dhis-web-spreadsheet-reporting/src/main/java/org/hisp/dhis/reportsheet/organisationunit/action/AddDepartmentAction.java	2013-03-06 03:54:14 +0000
@@ -32,6 +32,7 @@
 import java.util.Date;
 import java.util.HashSet;
 
+import org.hisp.dhis.dataset.DataSet;
 import org.hisp.dhis.i18n.I18nFormat;
 import org.hisp.dhis.organisationunit.OrganisationUnit;
 import org.hisp.dhis.organisationunit.OrganisationUnitGroup;
@@ -164,6 +165,12 @@
             if ( group != null )
             {
                 group.addOrganisationUnit( organisationUnit );
+
+                for ( DataSet ds : group.getDataSets() )
+                {
+                    organisationUnit.addDataSet( ds );
+                }
+
                 organisationUnitGroupService.updateOrganisationUnitGroup( group );
             }
         }