← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 13852: minor

 

------------------------------------------------------------
revno: 13852
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2014-01-27 11:34:27 +0700
message:
  minor
modified:
  dhis-2/dhis-support/dhis-support-hibernate/src/main/java/org/hisp/dhis/hibernate/HibernateEntityInterceptorWiring.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/indicatorgroup/AddIndicatorGroupAction.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 'dhis-2/dhis-support/dhis-support-hibernate/src/main/java/org/hisp/dhis/hibernate/HibernateEntityInterceptorWiring.java'
--- dhis-2/dhis-support/dhis-support-hibernate/src/main/java/org/hisp/dhis/hibernate/HibernateEntityInterceptorWiring.java	2014-01-27 03:27:46 +0000
+++ dhis-2/dhis-support/dhis-support-hibernate/src/main/java/org/hisp/dhis/hibernate/HibernateEntityInterceptorWiring.java	2014-01-27 04:34:27 +0000
@@ -80,7 +80,6 @@
                 {
                     if ( event.getAffectedOwnerOrNull() instanceof IdentifiableObject )
                     {
-                        System.err.println( "is true: " + event.getAffectedOwnerEntityName() );
                         identifiableObjects.add( (IdentifiableObject) event.getAffectedOwnerOrNull() );
                     }
                 }
@@ -134,7 +133,7 @@
                     return;
                 }
 
-                //objectManager.update( new ArrayList<IdentifiableObject>( identifiableObjects ) );
+                // objectManager.update( new ArrayList<IdentifiableObject>( identifiableObjects ) );
                 identifiableObjects.clear();
             }
         } );

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/indicatorgroup/AddIndicatorGroupAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/indicatorgroup/AddIndicatorGroupAction.java	2013-08-23 16:05:01 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/indicatorgroup/AddIndicatorGroupAction.java	2014-01-27 04:34:27 +0000
@@ -28,17 +28,16 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
+import com.opensymphony.xwork2.Action;
 import org.hisp.dhis.attribute.AttributeService;
 import org.hisp.dhis.indicator.IndicatorGroup;
 import org.hisp.dhis.indicator.IndicatorService;
-
-import com.opensymphony.xwork2.Action;
 import org.hisp.dhis.system.util.AttributeUtils;
 
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
 /**
  * @author Torgeir Lorange Ostby
  * @version $Id: AddIndicatorGroupAction.java 3305 2007-05-14 18:55:52Z larshelg $
@@ -81,9 +80,9 @@
     {
         this.groupMembers = groupMembers;
     }
-    
+
     private IndicatorGroup indicatorGroup;
-    
+
     public IndicatorGroup getIndicatorGroup()
     {
         return indicatorGroup;
@@ -99,11 +98,13 @@
     // -------------------------------------------------------------------------
     // Action implementation
     // -------------------------------------------------------------------------
-   
+
     public String execute()
     {
         indicatorGroup = new IndicatorGroup( name );
-        
+
+        indicatorService.addIndicatorGroup( indicatorGroup );
+
         for ( String id : groupMembers )
         {
             indicatorGroup.addIndicator( indicatorService.getIndicator( Integer.parseInt( id ) ) );
@@ -115,7 +116,7 @@
                 attributeService );
         }
 
-        indicatorService.addIndicatorGroup( indicatorGroup );        
+        indicatorService.updateIndicatorGroup( indicatorGroup );
 
         return SUCCESS;
     }