← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 4835: added description/compulsory to dataelement/indicator groupsets, also ui

 

------------------------------------------------------------
revno: 4835
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2011-10-05 12:06:16 +0200
message:
  added description/compulsory to dataelement/indicator groupsets, also ui
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementGroupSet.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementService.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/indicator/IndicatorGroupSet.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/indicator/IndicatorService.java
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataelement/DefaultDataElementService.java
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/indicator/DefaultIndicatorService.java
  dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/dataelement/hibernate/DataElementGroupSet.hbm.xml
  dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/indicator/hibernate/IndicatorGroupSet.hbm.xml
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/validationRules.js
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/dataelementgroupset/AddDataElementGroupSetAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/dataelementgroupset/UpdateDataElementGroupSetAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/indicatorgroupset/AddIndicatorGroupSetAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/indicatorgroupset/UpdateIndicatorGroupSetAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/org/hisp/dhis/dd/i18n_module.properties
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/addDataElementGroupSet.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/addIndicatorGroupSet.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/updateDataElementGroupSet.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/updateIndicatorGroupSet.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/addOrganisationUnitGroupSetForm.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/updateOrganisationUnitGroupSetForm.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/dataelement/DataElementGroupSet.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementGroupSet.java	2011-05-05 21:14:56 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementGroupSet.java	2011-10-05 10:06:16 +0000
@@ -34,9 +34,9 @@
 import org.hisp.dhis.common.AbstractIdentifiableObject;
 
 /**
- * DataElementGroupSet is a set of DataElementGroups. It is by default exclusive,
- * in the sense that a DataElement can only be a member of one or zero of the 
- * DataElementGroups in a DataElementGroupSet.
+ * DataElementGroupSet is a set of DataElementGroups. It is by default
+ * exclusive, in the sense that a DataElement can only be a member of one or
+ * zero of the DataElementGroups in a DataElementGroupSet.
  * 
  * @author Lars Helge Overland
  */
@@ -48,6 +48,10 @@
      */
     private static final long serialVersionUID = -2118690320625221749L;
 
+    private String description;
+
+    private Boolean compulsory = false;
+
     private List<DataElementGroup> members = new ArrayList<DataElementGroup>();
 
     // -------------------------------------------------------------------------
@@ -55,12 +59,26 @@
     // -------------------------------------------------------------------------
 
     public DataElementGroupSet()
-    {   
+    {
     }
-    
+
     public DataElementGroupSet( String name )
     {
         this.name = name;
+        this.compulsory = false;
+    }
+
+    public DataElementGroupSet( String name, Boolean compulsory )
+    {
+        this.name = name;
+        this.compulsory = compulsory;
+    }
+
+    public DataElementGroupSet( String name, String description, Boolean compulsory )
+    {
+        this.name = name;
+        this.description = description;
+        this.compulsory = compulsory;
     }
 
     // -------------------------------------------------------------------------
@@ -70,15 +88,15 @@
     public Collection<DataElement> getDataElements()
     {
         List<DataElement> dataElements = new ArrayList<DataElement>();
-        
+
         for ( DataElementGroup group : members )
         {
             dataElements.addAll( group.getMembers() );
         }
-        
+
         return dataElements;
     }
-    
+
     public DataElementGroup getGroup( DataElement dataElement )
     {
         for ( DataElementGroup group : members )
@@ -88,10 +106,28 @@
                 return group;
             }
         }
-        
+
         return null;
     }
-    
+
+    public Boolean isMemberOfDataElementGroups( DataElement dataElement )
+    {
+        for ( DataElementGroup group : members )
+        {
+            if ( group.getMembers().contains( dataElement ) )
+            {
+                return true;
+            }
+        }
+
+        return false;
+    }
+
+    public Boolean hasDataElementGroups()
+    {
+        return members != null && members.size() > 0;
+    }
+
     // -------------------------------------------------------------------------
     // equals and hashCode
     // -------------------------------------------------------------------------
@@ -115,7 +151,7 @@
             return false;
         }
 
-        if ( !( o instanceof DataElementGroupSet ) )
+        if ( !(o instanceof DataElementGroupSet) )
         {
             return false;
         }
@@ -135,6 +171,26 @@
     // Getters and setters
     // -------------------------------------------------------------------------
 
+    public String getDescription()
+    {
+        return description;
+    }
+
+    public void setDescription( String description )
+    {
+        this.description = description;
+    }
+
+    public Boolean isCompulsory()
+    {
+        return compulsory;
+    }
+
+    public void setCompulsory( Boolean compulsory )
+    {
+        this.compulsory = compulsory;
+    }
+
     public List<DataElementGroup> getMembers()
     {
         return members;
@@ -143,5 +199,5 @@
     public void setMembers( List<DataElementGroup> members )
     {
         this.members = members;
-    }    
+    }
 }

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementService.java	2011-09-10 08:40:27 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementService.java	2011-10-05 10:06:16 +0000
@@ -93,7 +93,7 @@
 
     /**
      * Returns the DataElement with the given code.
-     *
+     * 
      * @param code the code.
      * @return the DataElement with the given code, or null if no match.
      */
@@ -115,14 +115,16 @@
      *         match.
      */
     DataElement getDataElementByAlternativeName( String alternativeName );
-    
+
     /**
      * Returns List of DataElements with a given key.
      * 
      * @param key the name of the DataElement to return.
-     * @return List of DataElements with a given key, or all dataelements if no match.
+     * @return List of DataElements with a given key, or all dataelements if no
+     *         match.
      */
     Collection<DataElement> searchDataElementsByName( String key );
+
     /**
      * Returns a DataElement with a given short name.
      * 
@@ -199,7 +201,7 @@
      * @return a Collection of DataElements.
      */
     Collection<DataElement> getDataElementsByPeriodType( PeriodType periodType );
-    
+
     /**
      * Returns all DataElements with the given category combo.
      * 
@@ -243,7 +245,7 @@
      * @return all DataElements which are not member of any DataElementGroups.
      */
     Collection<DataElement> getDataElementsWithoutGroups();
-    
+
     /**
      * Returns all DataElements which are not assigned to any DataSets.
      * 
@@ -257,7 +259,7 @@
      * @return all DataElements which are assigned to at least one DataSet.
      */
     Collection<DataElement> getDataElementsWithDataSets();
-    
+
     /**
      * Checks whether a DataElement with the given identifier exists.
      * 
@@ -267,7 +269,8 @@
     boolean dataElementExists( int id );
 
     /**
-     * Checks whether a DataElementCategoryOptionCombo with the given identifier exists.
+     * Checks whether a DataElementCategoryOptionCombo with the given identifier
+     * exists.
      * 
      * @param id the DataElementCategoryOptionCombo identifier.
      * @return true or false.
@@ -275,17 +278,17 @@
     boolean dataElementCategoryOptionComboExists( int id );
 
     Collection<DataElement> getDataElementsByDataSets( Collection<DataSet> dataSets );
-    
+
     Collection<DataElement> getDataElementsLikeName( String name );
-    
+
     Collection<DataElement> getDataElementsBetween( int first, int max );
-    
+
     Collection<DataElement> getDataElementsBetweenByName( String name, int first, int max );
-    
+
     int getDataElementCount();
-    
+
     int getDataElementCountByName( String name );
-    
+
     // -------------------------------------------------------------------------
     // DataElementGroup
     // -------------------------------------------------------------------------
@@ -362,7 +365,6 @@
      */
     Collection<DataElementGroup> getGroupsContainingDataElement( DataElement dataElement );
 
-    
     /**
      * Returns data elements with identifier in the given id.
      * 
@@ -372,10 +374,11 @@
     Collection<DataElement> getDataElementsByGroupId( int groupId );
 
     /**
-     * Defines the given data elements as zero is significant. All other data elements
-     * are defined as zero is in-significant.
+     * Defines the given data elements as zero is significant. All other data
+     * elements are defined as zero is in-significant.
      * 
-     * @param dataElementIds identifiers of data elements where zero is significant.
+     * @param dataElementIds identifiers of data elements where zero is
+     *        significant.
      */
     void setZeroIsSignificantForDataElements( Collection<Integer> dataElementIds );
 
@@ -394,16 +397,17 @@
      * @param dataElementGroup is group contain data elements
      * @return a collection of all DataElement
      */
-    Collection<DataElement> getDataElementsByZeroIsSignificantAndGroup( boolean zeroIsSignificant, DataElementGroup dataElementGroup );
+    Collection<DataElement> getDataElementsByZeroIsSignificantAndGroup( boolean zeroIsSignificant,
+        DataElementGroup dataElementGroup );
 
     Collection<DataElementGroup> getDataElementGroupsBetween( int first, int max );
-    
+
     Collection<DataElementGroup> getDataElementGroupsBetweenByName( String name, int first, int max );
-    
+
     int getDataElementGroupCount();
-    
+
     int getDataElementGroupCountByName( String name );
-    
+
     // -------------------------------------------------------------------------
     // DataElementGroupSet
     // -------------------------------------------------------------------------
@@ -418,16 +422,22 @@
 
     DataElementGroupSet getDataElementGroupSetByName( String name );
 
+    Collection<DataElementGroupSet> getCompulsoryDataElementGroupSets();
+
+    Collection<DataElementGroupSet> getCompulsoryDataElementGroupSetsWithMembers();
+
+    Collection<DataElementGroupSet> getCompulsoryDataElementGroupSetsNotAssignedTo( DataElement dataElement );
+
     Collection<DataElementGroupSet> getAllDataElementGroupSets();
 
     Collection<DataElementGroupSet> getDataElementGroupSets( Collection<Integer> identifiers );
-    
+
     Collection<DataElementGroupSet> getDataElementGroupSetsBetween( int first, int max );
-    
+
     Collection<DataElementGroupSet> getDataElementGroupSetsBetweenByName( String name, int first, int max );
-    
+
     int getDataElementGroupSetCount();
-    
+
     int getDataElementGroupSetCountByName( String name );
 
     // -------------------------------------------------------------------------
@@ -443,12 +453,13 @@
     Collection<DataElementOperand> getAllGeneratedOperands();
 
     /**
-     * Returns all generated permutations of Operands for the given collection of
-     * DataElements. Requires the categoryoptioncomboname resource table to be populated.
+     * Returns all generated permutations of Operands for the given collection
+     * of DataElements. Requires the categoryoptioncomboname resource table to
+     * be populated.
      * 
      * @param dataElements the DataElements.
      * @return a collection of all Operands.
      */
     Collection<DataElementOperand> getAllGeneratedOperands( Collection<DataElement> dataElements );
-    
+
 }

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/indicator/IndicatorGroupSet.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/indicator/IndicatorGroupSet.java	2011-05-05 21:14:56 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/indicator/IndicatorGroupSet.java	2011-10-05 10:06:16 +0000
@@ -36,7 +36,7 @@
 /**
  * An IndicatorGroupSet is a set of IndicatorGroups. It is by default exclusive,
  * in the sense that an Indicator can only be a member of one or zero of the
- * IndicatorGroups in a IndicatorGroupSet. 
+ * IndicatorGroups in a IndicatorGroupSet.
  * 
  * @author Lars Helge Overland
  */
@@ -48,6 +48,10 @@
      */
     private static final long serialVersionUID = 3051446168246358150L;
 
+    private String description;
+
+    private Boolean compulsory = false;
+
     private List<IndicatorGroup> members = new ArrayList<IndicatorGroup>();
 
     // -------------------------------------------------------------------------
@@ -55,12 +59,26 @@
     // -------------------------------------------------------------------------
 
     public IndicatorGroupSet()
-    {   
+    {
     }
 
     public IndicatorGroupSet( String name )
     {
         this.name = name;
+        this.compulsory = false;
+    }
+
+    public IndicatorGroupSet( String name, Boolean compulsory )
+    {
+        this.name = name;
+        this.compulsory = compulsory;
+    }
+
+    public IndicatorGroupSet( String name, String description, Boolean compulsory )
+    {
+        this.name = name;
+        this.description = description;
+        this.compulsory = compulsory;
     }
 
     // -------------------------------------------------------------------------
@@ -70,15 +88,15 @@
     public Collection<Indicator> getIndicators()
     {
         List<Indicator> indicators = new ArrayList<Indicator>();
-        
+
         for ( IndicatorGroup group : members )
         {
             indicators.addAll( group.getMembers() );
         }
-        
+
         return indicators;
     }
-    
+
     public IndicatorGroup getGroup( Indicator indicator )
     {
         for ( IndicatorGroup group : members )
@@ -88,10 +106,28 @@
                 return group;
             }
         }
-        
+
         return null;
     }
-    
+
+    public Boolean isMemberOfIndicatorGroups( Indicator indicator )
+    {
+        for ( IndicatorGroup group : members )
+        {
+            if ( group.getMembers().contains( indicator ) )
+            {
+                return true;
+            }
+        }
+
+        return false;
+    }
+
+    public Boolean hasIndicatorGroups()
+    {
+        return members != null && members.size() > 0;
+    }
+
     // -------------------------------------------------------------------------
     // equals and hashCode
     // -------------------------------------------------------------------------
@@ -115,7 +151,7 @@
             return false;
         }
 
-        if ( !( o instanceof IndicatorGroupSet ) )
+        if ( !(o instanceof IndicatorGroupSet) )
         {
             return false;
         }
@@ -135,6 +171,26 @@
     // Getters and setters
     // -------------------------------------------------------------------------
 
+    public String getDescription()
+    {
+        return description;
+    }
+
+    public void setDescription( String description )
+    {
+        this.description = description;
+    }
+
+    public Boolean isCompulsory()
+    {
+        return compulsory;
+    }
+
+    public void setCompulsory( Boolean compulsory )
+    {
+        this.compulsory = compulsory;
+    }
+
     public List<IndicatorGroup> getMembers()
     {
         return members;
@@ -143,5 +199,5 @@
     public void setMembers( List<IndicatorGroup> members )
     {
         this.members = members;
-    }    
+    }
 }

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/indicator/IndicatorService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/indicator/IndicatorService.java	2011-10-03 15:14:41 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/indicator/IndicatorService.java	2011-10-05 10:06:16 +0000
@@ -36,7 +36,7 @@
 public interface IndicatorService
 {
     String ID = IndicatorService.class.getName();
-    
+
     // -------------------------------------------------------------------------
     // Indicator
     // -------------------------------------------------------------------------
@@ -48,37 +48,37 @@
     void deleteIndicator( Indicator indicator );
 
     Indicator getIndicator( int id );
-    
+
     Indicator getIndicator( String uuid );
-    
+
     Collection<Indicator> getAllIndicators();
-    
+
     Collection<Indicator> getIndicators( Collection<Integer> identifiers );
-    
+
     Indicator getIndicatorByName( String name );
 
     Indicator getIndicatorByShortName( String shortName );
 
     Indicator getIndicatorByAlternativeName( String alternativeName );
-    
+
     Indicator getIndicatorByCode( String code );
 
     Collection<Indicator> getIndicatorsWithGroupSets();
-    
+
     Collection<Indicator> getIndicatorsWithoutGroups();
-    
+
     Collection<Indicator> getIndicatorsWithDataSets();
 
     int getIndicatorCountByName( String name );
-    
+
     Collection<Indicator> getIndicatorsLikeName( String name );
-    
+
     Collection<Indicator> getIndicatorsBetweenByName( String name, int first, int max );
-    
+
     int getIndicatorCount();
-    
-    Collection<Indicator> getIndicatorsBetween(int first, int max );
-    
+
+    Collection<Indicator> getIndicatorsBetween( int first, int max );
+
     // -------------------------------------------------------------------------
     // IndicatorType
     // -------------------------------------------------------------------------
@@ -90,7 +90,7 @@
     void deleteIndicatorType( IndicatorType indicatorType );
 
     IndicatorType getIndicatorType( int id );
-    
+
     Collection<IndicatorType> getIndicatorTypes( Collection<Integer> identifiers );
 
     Collection<IndicatorType> getAllIndicatorTypes();
@@ -98,11 +98,11 @@
     IndicatorType getIndicatorTypeByName( String name );
 
     Collection<IndicatorType> getIndicatorTypesBetween( int first, int max );
-    
+
     Collection<IndicatorType> getIndicatorTypesBetweenByName( String name, int first, int max );
-    
+
     int getIndicatorTypeCount();
-    
+
     int getIndicatorTypeCountByName( String name );
 
     // -------------------------------------------------------------------------
@@ -116,23 +116,23 @@
     void deleteIndicatorGroup( IndicatorGroup indicatorGroup );
 
     IndicatorGroup getIndicatorGroup( int id );
-    
+
     Collection<IndicatorGroup> getIndicatorGroups( Collection<Integer> identifiers );
-    
+
     IndicatorGroup getIndicatorGroup( String uuid );
 
     Collection<IndicatorGroup> getAllIndicatorGroups();
 
     IndicatorGroup getIndicatorGroupByName( String name );
-    
+
     Collection<IndicatorGroup> getGroupsContainingIndicator( Indicator indicator );
 
     Collection<IndicatorGroup> getIndicatorGroupsBetween( int first, int max );
-    
+
     Collection<IndicatorGroup> getIndicatorGroupsBetweenByName( String name, int first, int max );
-    
+
     int getIndicatorGroupCount();
-    
+
     int getIndicatorGroupCountByName( String name );
 
     // -------------------------------------------------------------------------
@@ -140,24 +140,30 @@
     // -------------------------------------------------------------------------
 
     int addIndicatorGroupSet( IndicatorGroupSet groupSet );
-    
+
     void updateIndicatorGroupSet( IndicatorGroupSet groupSet );
-    
+
     void deleteIndicatorGroupSet( IndicatorGroupSet groupSet );
-    
+
     IndicatorGroupSet getIndicatorGroupSet( int id );
-    
+
     IndicatorGroupSet getIndicatorGroupSetByName( String name );
-    
+
+    Collection<IndicatorGroupSet> getCompulsoryIndicatorGroupSets();
+
+    Collection<IndicatorGroupSet> getCompulsoryIndicatorGroupSetsWithMembers();
+
+    Collection<IndicatorGroupSet> getCompulsoryIndicatorGroupSetsNotAssignedTo( Indicator indicator );
+
     Collection<IndicatorGroupSet> getAllIndicatorGroupSets();
-    
+
     Collection<IndicatorGroupSet> getIndicatorGroupSets( Collection<Integer> identifiers );
-    
+
     Collection<IndicatorGroupSet> getIndicatorGroupSetsBetween( int first, int max );
-    
+
     Collection<IndicatorGroupSet> getIndicatorGroupSetsBetweenByName( String name, int first, int max );
-    
+
     int getIndicatorGroupSetCount();
-    
+
     int getIndicatorGroupSetCountByName( String name );
 }

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataelement/DefaultDataElementService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataelement/DefaultDataElementService.java	2011-09-26 15:24:25 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataelement/DefaultDataElementService.java	2011-10-05 10:06:16 +0000
@@ -206,9 +206,10 @@
     {
         return i18n( i18nService, dataElementStore.getDataElementByName( name ) );
     }
-    
-    public Collection<DataElement> searchDataElementsByName( String key ){
-    	return i18n( i18nService, dataElementStore.searchDataElementsByName( key ) );
+
+    public Collection<DataElement> searchDataElementsByName( String key )
+    {
+        return i18n( i18nService, dataElementStore.searchDataElementsByName( key ) );
     }
 
     public DataElement getDataElementByAlternativeName( String alternativeName )
@@ -307,7 +308,7 @@
     {
         return i18n( i18nService, dataElementStore.getDataElementsWithoutDataSets() );
     }
-    
+
     public Collection<DataElement> getDataElementsWithDataSets()
     {
         return i18n( i18nService, dataElementStore.getDataElementsWithDataSets() );
@@ -322,7 +323,7 @@
     {
         return dataElementStore.dataElementCategoryOptionComboExists( id );
     }
-    
+
     public Collection<DataElement> getDataElementsLikeName( String name )
     {
         return dataElementStore.getDataElementsLikeName( name );
@@ -332,7 +333,7 @@
     {
         return dataElementStore.getDataElementsBetween( first, max );
     }
-    
+
     public Collection<DataElement> getDataElementsBetweenByName( String name, int first, int max )
     {
         return dataElementStore.getDataElementsBetweenByName( name, first, max );
@@ -342,17 +343,17 @@
     {
         return dataElementStore.getDataElementCount();
     }
-    
+
     public int getDataElementCountByName( String name )
     {
         return dataElementStore.getDataElementCountByName( name );
     }
-    
+
     public Collection<DataElement> getDataElementsByDataSets( Collection<DataSet> dataSets )
     {
         return i18n( i18nService, dataElementStore.getDataElementsByDataSets( dataSets ) );
     }
-    
+
     // -------------------------------------------------------------------------
     // DataElementGroup
     // -------------------------------------------------------------------------
@@ -444,7 +445,7 @@
     {
         return dataElementGroupStore.getBetween( first, max );
     }
-    
+
     public Collection<DataElementGroup> getDataElementGroupsBetweenByName( String name, int first, int max )
     {
         return dataElementGroupStore.getBetweenByName( name, first, max );
@@ -454,12 +455,12 @@
     {
         return dataElementGroupStore.getCount();
     }
-    
+
     public int getDataElementGroupCountByName( String name )
     {
         return dataElementGroupStore.getCountByName( name );
     }
-    
+
     // -------------------------------------------------------------------------
     // DataElementGroupSet
     // -------------------------------------------------------------------------
@@ -497,6 +498,50 @@
         return i18n( i18nService, dataElementGroupSetStore.getByName( name ) );
     }
 
+    @Override
+    public Collection<DataElementGroupSet> getCompulsoryDataElementGroupSets()
+    {
+        Collection<DataElementGroupSet> groupSets = new ArrayList<DataElementGroupSet>();
+
+        for ( DataElementGroupSet groupSet : getAllDataElementGroupSets() )
+        {
+            if ( groupSet.isCompulsory() )
+            {
+                groupSets.add( groupSet );
+            }
+        }
+
+        return groupSets;
+    }
+
+    @Override
+    public Collection<DataElementGroupSet> getCompulsoryDataElementGroupSetsWithMembers()
+    {
+        return FilterUtils.filter( getAllDataElementGroupSets(), new Filter<DataElementGroupSet>()
+        {
+            public boolean retain( DataElementGroupSet object )
+            {
+                return object.isCompulsory() && object.hasDataElementGroups();
+            }
+        } );
+    }
+
+    @Override
+    public Collection<DataElementGroupSet> getCompulsoryDataElementGroupSetsNotAssignedTo( DataElement dataElement )
+    {
+        Collection<DataElementGroupSet> groupSets = new ArrayList<DataElementGroupSet>();
+
+        for ( DataElementGroupSet groupSet : getCompulsoryDataElementGroupSets() )
+        {
+            if ( !groupSet.isMemberOfDataElementGroups( dataElement ) && groupSet.hasDataElementGroups() )
+            {
+                groupSets.add( groupSet );
+            }
+        }
+
+        return groupSets;
+    }
+
     public Collection<DataElementGroupSet> getAllDataElementGroupSets()
     {
         return i18n( i18nService, dataElementGroupSetStore.getAll() );
@@ -534,6 +579,7 @@
     {
         return dataElementGroupSetStore.getBetweenByName( name, first, max );
     }
+
     // -------------------------------------------------------------------------
     // DataElementOperand
     // -------------------------------------------------------------------------
@@ -548,5 +594,4 @@
         return dataElementStore.getAllGeneratedOperands( dataElements );
     }
 
-
 }

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/indicator/DefaultIndicatorService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/indicator/DefaultIndicatorService.java	2011-10-03 15:14:41 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/indicator/DefaultIndicatorService.java	2011-10-05 10:06:16 +0000
@@ -29,6 +29,7 @@
 
 import static org.hisp.dhis.i18n.I18nUtils.i18n;
 
+import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Date;
 import java.util.Iterator;
@@ -51,16 +52,16 @@
     // -------------------------------------------------------------------------
     // Dependencies
     // -------------------------------------------------------------------------
-    
+
     private IndicatorStore indicatorStore;
 
     public void setIndicatorStore( IndicatorStore indicatorStore )
     {
         this.indicatorStore = indicatorStore;
     }
-    
+
     private GenericIdentifiableObjectStore<IndicatorType> indicatorTypeStore;
-    
+
     public void setIndicatorTypeStore( GenericIdentifiableObjectStore<IndicatorType> indicatorTypeStore )
     {
         this.indicatorTypeStore = indicatorTypeStore;
@@ -90,77 +91,77 @@
     // -------------------------------------------------------------------------
     // Indicator
     // -------------------------------------------------------------------------
-    
+
     public int addIndicator( Indicator indicator )
     {
         if ( indicator.getUuid() == null )
         {
-            indicator.setUuid( UUIdUtils.getUUId() );            
+            indicator.setUuid( UUIdUtils.getUUId() );
         }
-        
+
         indicator.setLastUpdated( new Date() );
-        
+
         int id = indicatorStore.addIndicator( indicator );
-        
+
         i18nService.addObject( indicator );
-        
+
         return id;
     }
 
     public void updateIndicator( Indicator indicator )
     {
         indicator.setLastUpdated( new Date() );
-        
+
         indicatorStore.updateIndicator( indicator );
-        
+
         i18nService.verify( indicator );
     }
-    
+
     public void deleteIndicator( Indicator indicator )
     {
         i18nService.removeObject( indicator );
-        
-        indicatorStore.deleteIndicator( indicator );    
+
+        indicatorStore.deleteIndicator( indicator );
     }
-    
+
     public Indicator getIndicator( int id )
     {
         return i18n( i18nService, indicatorStore.getIndicator( id ) );
     }
-    
+
     public Indicator getIndicator( String uuid )
     {
         return i18n( i18nService, indicatorStore.getIndicator( uuid ) );
     }
-    
+
     public Collection<Indicator> getAllIndicators()
     {
         return i18n( i18nService, indicatorStore.getAllIndicators() );
     }
-    
+
     public Collection<Indicator> getIndicators( final Collection<Integer> identifiers )
     {
         Collection<Indicator> indicators = getAllIndicators();
-        
+
         return identifiers == null ? indicators : FilterUtils.filter( indicators, new Filter<Indicator>()
+        {
+            public boolean retain( Indicator object )
             {
-                public boolean retain( Indicator object )
-                {
-                    return identifiers.contains( object.getId() );
-                }
-            } );
+                return identifiers.contains( object.getId() );
+            }
+        } );
     }
-    
+
     public Indicator getIndicatorByName( String name )
     {
         return i18n( i18nService, indicatorStore.getIndicatorByName( name ) );
     }
-    
+
     public Indicator getIndicatorByShortName( String shortName )
     {
         return i18n( i18nService, indicatorStore.getIndicatorByShortName( shortName ) );
     }
-    
+
     public Indicator getIndicatorByAlternativeName( String alternativeName )
     {
         return i18n( i18nService, indicatorStore.getIndicatorByAlternativeName( alternativeName ) );
@@ -170,17 +171,17 @@
     {
         return i18n( i18nService, indicatorStore.getIndicatorByCode( code ) );
     }
-    
+
     public Collection<Indicator> getIndicatorsWithGroupSets()
     {
         return i18n( i18nService, indicatorStore.getIndicatorsWithGroupSets() );
     }
-    
+
     public Collection<Indicator> getIndicatorsWithoutGroups()
     {
         return i18n( i18nService, indicatorStore.getIndicatorsWithoutGroups() );
     }
-    
+
     public Collection<Indicator> getIndicatorsWithDataSets()
     {
         return i18n( i18nService, indicatorStore.getIndicatorsWithDataSets() );
@@ -200,7 +201,7 @@
     {
         return i18n( i18nService, indicatorStore.getIndicatorsLikeName( name ) );
     }
-    
+
     public Collection<Indicator> getIndicatorsBetween( int first, int max )
     {
         return i18n( i18nService, indicatorStore.getIndicatorsBetween( first, max ) );
@@ -210,7 +211,7 @@
     {
         return i18n( i18nService, indicatorStore.getIndicatorsBetweenByName( name, first, max ) );
     }
-    
+
     // -------------------------------------------------------------------------
     // IndicatorType
     // -------------------------------------------------------------------------
@@ -218,23 +219,23 @@
     public int addIndicatorType( IndicatorType indicatorType )
     {
         int id = indicatorTypeStore.save( indicatorType );
-        
+
         i18nService.addObject( indicatorType );
-        
+
         return id;
     }
-    
+
     public void updateIndicatorType( IndicatorType indicatorType )
     {
         indicatorTypeStore.update( indicatorType );
-        
+
         i18nService.verify( indicatorType );
     }
 
     public void deleteIndicatorType( IndicatorType indicatorType )
     {
         i18nService.removeObject( indicatorType );
-        
+
         indicatorTypeStore.delete( indicatorType );
     }
 
@@ -242,29 +243,29 @@
     {
         return i18n( i18nService, indicatorTypeStore.get( id ) );
     }
-    
+
     public Collection<IndicatorType> getIndicatorTypes( final Collection<Integer> identifiers )
     {
         Collection<IndicatorType> types = getAllIndicatorTypes();
-        
+
         return identifiers == null ? types : FilterUtils.filter( types, new Filter<IndicatorType>()
+        {
+            public boolean retain( IndicatorType object )
             {
-                public boolean retain( IndicatorType object )
-                {
-                    return identifiers.contains( object.getId() );
-                }
-            } );
+                return identifiers.contains( object.getId() );
+            }
+        } );
     }
-    
+
     public Collection<IndicatorType> getAllIndicatorTypes()
     {
         return i18n( i18nService, indicatorTypeStore.getAll() );
     }
-    
+
     public IndicatorType getIndicatorTypeByName( String name )
     {
         return i18n( i18nService, indicatorTypeStore.getByName( name ) );
-    }    
+    }
 
     public int getIndicatorTypeCount()
     {
@@ -296,56 +297,56 @@
         {
             indicatorGroup.setUuid( UUIdUtils.getUUId() );
         }
-        
+
         int id = indicatorGroupStore.save( indicatorGroup );
-        
+
         i18nService.addObject( indicatorGroup );
-        
+
         return id;
     }
-    
+
     public void updateIndicatorGroup( IndicatorGroup indicatorGroup )
     {
         indicatorGroupStore.update( indicatorGroup );
-        
+
         i18nService.verify( indicatorGroup );
     }
-    
+
     public void deleteIndicatorGroup( IndicatorGroup indicatorGroup )
     {
         i18nService.removeObject( indicatorGroup );
-        
+
         indicatorGroupStore.delete( indicatorGroup );
     }
-    
+
     public IndicatorGroup getIndicatorGroup( int id )
     {
         return i18n( i18nService, indicatorGroupStore.get( id ) );
     }
-    
+
     public Collection<IndicatorGroup> getIndicatorGroups( final Collection<Integer> identifiers )
     {
         Collection<IndicatorGroup> groups = getAllIndicatorGroups();
-        
+
         return identifiers == null ? groups : FilterUtils.filter( groups, new Filter<IndicatorGroup>()
+        {
+            public boolean retain( IndicatorGroup object )
             {
-                public boolean retain( IndicatorGroup object )
-                {
-                    return identifiers.contains( object.getId() );
-                }
-            } );
+                return identifiers.contains( object.getId() );
+            }
+        } );
     }
-    
+
     public IndicatorGroup getIndicatorGroup( String uuid )
     {
         return i18n( i18nService, indicatorGroupStore.getByUuid( uuid ) );
     }
-    
+
     public Collection<IndicatorGroup> getAllIndicatorGroups()
     {
         return i18n( i18nService, indicatorGroupStore.getAll() );
     }
-    
+
     public IndicatorGroup getIndicatorGroupByName( String name )
     {
         return i18n( i18nService, indicatorGroupStore.getByName( name ) );
@@ -354,20 +355,20 @@
     public Collection<IndicatorGroup> getGroupsContainingIndicator( Indicator indicator )
     {
         Collection<IndicatorGroup> groups = getAllIndicatorGroups();
-        
+
         Iterator<IndicatorGroup> iterator = groups.iterator();
-        
+
         while ( iterator.hasNext() )
         {
             IndicatorGroup group = iterator.next();
-            
+
             if ( !group.getMembers().contains( indicator ) )
             {
                 iterator.remove();
             }
         }
-        
-        return groups;       
+
+        return groups;
     }
 
     public int getIndicatorGroupCount()
@@ -397,26 +398,26 @@
     public int addIndicatorGroupSet( IndicatorGroupSet groupSet )
     {
         int id = indicatorGroupSetStore.save( groupSet );
-        
+
         i18nService.addObject( groupSet );
-        
+
         return id;
     }
-    
+
     public void updateIndicatorGroupSet( IndicatorGroupSet groupSet )
     {
         indicatorGroupSetStore.update( groupSet );
-        
+
         i18nService.verify( groupSet );
     }
-    
+
     public void deleteIndicatorGroupSet( IndicatorGroupSet groupSet )
     {
         i18nService.removeObject( groupSet );
-        
+
         indicatorGroupSetStore.delete( groupSet );
     }
-    
+
     public IndicatorGroupSet getIndicatorGroupSet( int id )
     {
         return i18n( i18nService, indicatorGroupSetStore.get( id ) );
@@ -426,23 +427,67 @@
     {
         return i18n( i18nService, indicatorGroupSetStore.getByName( name ) );
     }
-    
+
+    @Override
+    public Collection<IndicatorGroupSet> getCompulsoryIndicatorGroupSets()
+    {
+        Collection<IndicatorGroupSet> groupSets = new ArrayList<IndicatorGroupSet>();
+
+        for ( IndicatorGroupSet groupSet : getAllIndicatorGroupSets() )
+        {
+            if ( groupSet.isCompulsory() )
+            {
+                groupSets.add( groupSet );
+            }
+        }
+
+        return groupSets;
+    }
+
+    @Override
+    public Collection<IndicatorGroupSet> getCompulsoryIndicatorGroupSetsWithMembers()
+    {
+        return FilterUtils.filter( getAllIndicatorGroupSets(), new Filter<IndicatorGroupSet>()
+        {
+            public boolean retain( IndicatorGroupSet object )
+            {
+                return object.isCompulsory() && object.hasIndicatorGroups();
+            }
+        } );
+    }
+
+    @Override
+    public Collection<IndicatorGroupSet> getCompulsoryIndicatorGroupSetsNotAssignedTo( Indicator indicator )
+    {
+        Collection<IndicatorGroupSet> groupSets = new ArrayList<IndicatorGroupSet>();
+
+        for ( IndicatorGroupSet groupSet : getCompulsoryIndicatorGroupSets() )
+        {
+            if ( !groupSet.isMemberOfIndicatorGroups( indicator ) && groupSet.hasIndicatorGroups() )
+            {
+                groupSets.add( groupSet );
+            }
+        }
+
+        return groupSets;
+    }
+
     public Collection<IndicatorGroupSet> getAllIndicatorGroupSets()
     {
         return i18n( i18nService, indicatorGroupSetStore.getAll() );
     }
-    
+
     public Collection<IndicatorGroupSet> getIndicatorGroupSets( final Collection<Integer> identifiers )
     {
         Collection<IndicatorGroupSet> groupSets = getAllIndicatorGroupSets();
-        
+
         return identifiers == null ? groupSets : FilterUtils.filter( groupSets, new Filter<IndicatorGroupSet>()
+        {
+            public boolean retain( IndicatorGroupSet object )
             {
-                public boolean retain( IndicatorGroupSet object )
-                {
-                    return identifiers.contains( object.getId() );
-                }
-            } );     
+                return identifiers.contains( object.getId() );
+            }
+        } );
     }
 
     public int getIndicatorGroupSetCountByName( String name )

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/dataelement/hibernate/DataElementGroupSet.hbm.xml'
--- dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/dataelement/hibernate/DataElementGroupSet.hbm.xml	2011-05-28 21:25:46 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/dataelement/hibernate/DataElementGroupSet.hbm.xml	2011-10-05 10:06:16 +0000
@@ -20,9 +20,13 @@
       <column name="name" not-null="true" unique="true" length="230" />
     </property>
 
+    <property name="description" />
+
+    <property name="compulsory" />
+
     <list name="members" table="dataelementgroupsetmembers">
       <cache usage="read-write" />
-      <key column="dataelementgroupsetid" foreign-key="fk_dataelementgroupsetmembers_dataelementgroupsetid"/>
+      <key column="dataelementgroupsetid" foreign-key="fk_dataelementgroupsetmembers_dataelementgroupsetid" />
       <list-index column="sort_order" base="1" />
       <many-to-many class="org.hisp.dhis.dataelement.DataElementGroup" column="dataelementgroupid" unique="true"
         foreign-key="fk_dataelementgroupset_dataelementgroupid" />

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/indicator/hibernate/IndicatorGroupSet.hbm.xml'
--- dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/indicator/hibernate/IndicatorGroupSet.hbm.xml	2011-05-28 21:25:46 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/indicator/hibernate/IndicatorGroupSet.hbm.xml	2011-10-05 10:06:16 +0000
@@ -20,6 +20,10 @@
       <column name="name" not-null="true" unique="true" length="230" />
     </property>
 
+    <property name="description" />
+
+    <property name="compulsory" />
+
     <list name="members" table="indicatorgroupsetmembers">
       <cache usage="read-write" />
       <key column="indicatorgroupsetid" foreign-key="fk_indicatorgroupsetmembers_indicatorgroupsetid" />

=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/validationRules.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/validationRules.js	2011-10-05 07:03:07 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/validationRules.js	2011-10-05 10:06:16 +0000
@@ -256,6 +256,10 @@
         "name" : {
             "required" : true,
             "rangelength" : [ 2, 230 ]
+        },
+        "description" : {
+            "required" : true,
+            "rangelength" : [ 2, 255 ]
         }
     },
     "dataDictionary" : {
@@ -323,6 +327,10 @@
         "name" : {
             "required" : true,
             "rangelength" : [ 2, 230 ]
+        },
+        "description" : {
+            "required" : true,
+            "rangelength" : [ 2, 255 ]
         }
     },
     "indicatorType" : {

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/dataelementgroupset/AddDataElementGroupSetAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/dataelementgroupset/AddDataElementGroupSetAction.java	2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/dataelementgroupset/AddDataElementGroupSetAction.java	2011-10-05 10:06:16 +0000
@@ -67,6 +67,20 @@
         this.name = name;
     }
 
+    private String description;
+
+    public void setDescription( String description )
+    {
+        this.description = description;
+    }
+
+    private boolean compulsory;
+
+    public void setCompulsory( boolean compulsory )
+    {
+        this.compulsory = compulsory;
+    }
+
     private List<String> groupMembers = new ArrayList<String>();
 
     public void setGroupMembers( List<String> groupMembers )
@@ -81,8 +95,8 @@
     public String execute()
         throws Exception
     {
-        DataElementGroupSet dataElementGroupSet = new DataElementGroupSet( name );
-        
+        DataElementGroupSet dataElementGroupSet = new DataElementGroupSet( name, description, compulsory );
+
         dataElementGroupSet.setUuid( UUIdUtils.getUUId() );
 
         List<DataElementGroup> dataElementGroups = new ArrayList<DataElementGroup>();

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/dataelementgroupset/UpdateDataElementGroupSetAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/dataelementgroupset/UpdateDataElementGroupSetAction.java	2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/dataelementgroupset/UpdateDataElementGroupSetAction.java	2011-10-05 10:06:16 +0000
@@ -72,6 +72,20 @@
         this.name = name;
     }
 
+    private String description;
+
+    public void setDescription( String description )
+    {
+        this.description = description;
+    }
+
+    private boolean compulsory;
+
+    public void setCompulsory( boolean compulsory )
+    {
+        this.compulsory = compulsory;
+    }
+
     private List<String> groupMembers = new ArrayList<String>();
 
     public void setGroupMembers( List<String> groupMembers )
@@ -89,12 +103,14 @@
         DataElementGroupSet dataElementGroupSet = dataElementService.getDataElementGroupSet( id );
 
         dataElementGroupSet.setName( name );
+        dataElementGroupSet.setDescription( description );
+        dataElementGroupSet.setCompulsory( compulsory );
 
         dataElementGroupSet.getMembers().clear();
 
         for ( String id : groupMembers )
         {
-            DataElementGroup dataElementGroup = dataElementService.getDataElementGroup( Integer.parseInt( id ) );           
+            DataElementGroup dataElementGroup = dataElementService.getDataElementGroup( Integer.parseInt( id ) );
 
             dataElementGroupSet.getMembers().add( dataElementGroup );
         }

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/indicatorgroupset/AddIndicatorGroupSetAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/indicatorgroupset/AddIndicatorGroupSetAction.java	2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/indicatorgroupset/AddIndicatorGroupSetAction.java	2011-10-05 10:06:16 +0000
@@ -66,6 +66,20 @@
         this.name = name;
     }
 
+    private String description;
+
+    public void setDescription( String description )
+    {
+        this.description = description;
+    }
+
+    private boolean compulsory;
+
+    public void setCompulsory( boolean compulsory )
+    {
+        this.compulsory = compulsory;
+    }
+
     private List<String> groupMembers = new ArrayList<String>();
 
     public void setGroupMembers( List<String> groupMembers )
@@ -79,7 +93,7 @@
 
     public String execute()
     {
-        IndicatorGroupSet indicatorGroupSet = new IndicatorGroupSet( name );
+        IndicatorGroupSet indicatorGroupSet = new IndicatorGroupSet( name, description, compulsory );
 
         indicatorGroupSet.setUuid( UUIdUtils.getUUId() );
 

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/indicatorgroupset/UpdateIndicatorGroupSetAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/indicatorgroupset/UpdateIndicatorGroupSetAction.java	2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/indicatorgroupset/UpdateIndicatorGroupSetAction.java	2011-10-05 10:06:16 +0000
@@ -73,6 +73,20 @@
         this.name = name;
     }
 
+    private String description;
+
+    public void setDescription( String description )
+    {
+        this.description = description;
+    }
+
+    private boolean compulsory;
+
+    public void setCompulsory( boolean compulsory )
+    {
+        this.compulsory = compulsory;
+    }
+    
     private List<String> groupMembers = new ArrayList<String>();
 
     public void setGroupMembers( List<String> groupMembers )
@@ -91,7 +105,9 @@
         IndicatorGroupSet indicatorGroupSet = indicatorService.getIndicatorGroupSet( id );
 
         indicatorGroupSet.setName( name.trim() );
-
+        indicatorGroupSet.setDescription( description );
+        indicatorGroupSet.setCompulsory( compulsory );
+        
         indicatorGroupSet.getMembers().clear();
 
         for ( String id : groupMembers )

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/org/hisp/dhis/dd/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/org/hisp/dhis/dd/i18n_module.properties	2011-09-27 17:05:48 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/org/hisp/dhis/dd/i18n_module.properties	2011-10-05 10:06:16 +0000
@@ -352,4 +352,5 @@
 view_1											= View 1
 view_2											= View 2
 store_zero_data_values							= Store Zero Data Value
-form_name										= Form name
\ No newline at end of file
+form_name										= Form name
+compulsory										= Compulsory

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/addDataElementGroupSet.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/addDataElementGroupSet.vm	2011-06-10 11:09:36 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/addDataElementGroupSet.vm	2011-10-05 10:06:16 +0000
@@ -29,8 +29,24 @@
 	</tr>
 	<tr>
 		<td><label for="name">$i18n.getString( "name" ) <em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
-		<td><input type="text" id="name" name="name" style="width:20em"/></td>
-	</tr>
+		<td><input type="text" id="name" name="name" style="width:250px"/></td>
+	</tr>
+
+	<tr>
+		<td><label for="description" style="width:100%">$i18n.getString( "description" ) <em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
+		<td><input type="text" id="description" name="description" style="width:250px"></td>
+	</tr>
+
+	<tr>
+		<td><label for="compulsory" style="width:100%">$i18n.getString( "compulsory" ) <em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
+		<td>
+			<select id="compulsory" name="compulsory" style="width:254px" onchange="changeCompulsory(this.value)">
+				<option value="true" selected="selected">$i18n.getString( "yes" )</option>
+				<option value="false">$i18n.getString( "no" )</option>
+			</select>
+		</td>
+	</tr>
+
 	<tr>
 		<td colspan="2" height="15px"></td>
 	</tr>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/addIndicatorGroupSet.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/addIndicatorGroupSet.vm	2011-06-10 11:09:36 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/addIndicatorGroupSet.vm	2011-10-05 10:06:16 +0000
@@ -29,8 +29,24 @@
 	</tr>
 	<tr>
 		<td><label for="name">$i18n.getString( "name" ) <em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
-		<td><input type="text" id="name" name="name" style="width:20em"/></td>
-	</tr>
+		<td><input type="text" id="name" name="name" style="width:250px"/></td>
+	</tr>
+
+	<tr>
+		<td><label for="description" style="width:100%">$i18n.getString( "description" ) <em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
+		<td><input type="text" id="description" name="description" style="width:250px"></td>
+	</tr>
+
+	<tr>
+		<td><label for="compulsory" style="width:100%">$i18n.getString( "compulsory" ) <em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
+		<td>
+			<select id="compulsory" name="compulsory" style="width:254px" onchange="changeCompulsory(this.value)">
+				<option value="true" selected="selected">$i18n.getString( "yes" )</option>
+				<option value="false">$i18n.getString( "no" )</option>
+			</select>
+		</td>
+	</tr>
+
 	<tr>
 		<td colspan="2" height="15px"></td>
 	</tr>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/updateDataElementGroupSet.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/updateDataElementGroupSet.vm	2011-06-10 11:09:36 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/updateDataElementGroupSet.vm	2011-10-05 10:06:16 +0000
@@ -31,8 +31,24 @@
 	</tr>
 	<tr>
 		<td><label for="name">$i18n.getString( "name" ) <em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
-		<td><input type="text" id="name" name="name" style="width:20em" value="$encoder.htmlEncode( $dataElementGroupSet.name )"/></td>
-	</tr>
+		<td><input type="text" id="name" name="name" style="width:250px" value="$encoder.htmlEncode( $dataElementGroupSet.name )"/></td>
+	</tr>
+
+	<tr>
+		<td><label for="description">$i18n.getString( "description" ) <em title="$i18n.getString( "required" )" class="required">*</em></label></td>
+		<td><input type="text" id="description" name="description" value="#if( $dataElementGroupSet.description)$encoder.htmlEncode( $dataElementGroupSet.description )#end" style="width:250px"></td>
+	</tr>
+
+	<tr>
+		<td><label for="compulsory">$i18n.getString( "compulsory" ) <em title="$i18n.getString( "required" )" class="required">*</em></label></td>
+		<td>
+			<select id="compulsory" name="compulsory" style="width:254px" onchange="changeCompulsory( this.value )">
+				<option value="true" #if( $dataElementGroupSet.compulsory ) selected="selected" #end>$i18n.getString( "yes" )</option>
+				<option value="false" #if( !$dataElementGroupSet.compulsory ) selected="selected" #end>$i18n.getString( "no" )</option>
+			</select>
+		</td>
+	</tr>
+
 	<tr>
 		<td colspan="2" height="15px"></td>
 	</tr>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/updateIndicatorGroupSet.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/updateIndicatorGroupSet.vm	2011-06-10 11:09:36 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/updateIndicatorGroupSet.vm	2011-10-05 10:06:16 +0000
@@ -31,8 +31,24 @@
 	</tr>
 	<tr>
 		<td><label for="name">$i18n.getString( "name" ) <em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
-		<td><input type="text" id="name" name="name" style="width:20em" value="$encoder.htmlEncode( $indicatorGroupSet.name )"/></td>
-	</tr>
+		<td><input type="text" id="name" name="name" style="width:250px" value="$encoder.htmlEncode( $indicatorGroupSet.name )"/></td>
+	</tr>
+
+	<tr>
+		<td><label for="description">$i18n.getString( "description" ) <em title="$i18n.getString( "required" )" class="required">*</em></label></td>
+		<td><input type="text" id="description" name="description" value="#if( $indicatorGroupSet.description)$encoder.htmlEncode( $indicatorGroupSet.description )#end" style="width:250px"></td>
+	</tr>
+
+	<tr>
+		<td><label for="compulsory">$i18n.getString( "compulsory" ) <em title="$i18n.getString( "required" )" class="required">*</em></label></td>
+		<td>
+			<select id="compulsory" name="compulsory" style="width:254px" onchange="changeCompulsory( this.value )">
+				<option value="true" #if( $indicatorGroupSet.compulsory ) selected="selected" #end>$i18n.getString( "yes" )</option>
+				<option value="false" #if( !$indicatorGroupSet.compulsory ) selected="selected" #end>$i18n.getString( "no" )</option>
+			</select>
+		</td>
+	</tr>
+
 	<tr>
 		<td colspan="2" height="15px"></td>
 	</tr>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/addOrganisationUnitGroupSetForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/addOrganisationUnitGroupSetForm.vm	2011-08-18 15:12:34 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/addOrganisationUnitGroupSetForm.vm	2011-10-05 10:06:16 +0000
@@ -30,18 +30,18 @@
 
 	<tr>
 		<td><label for="name" style="width:100%">$i18n.getString( "name" ) <em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
-		<td><input type="text" id="name" name="name" style="width:20em"></td>
+		<td><input type="text" id="name" name="name" style="width:250px"></td>
 	</tr>
 
 	<tr>
 		<td><label for="description" style="width:100%">$i18n.getString( "description" ) <em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
-		<td><input type="text" id="description" name="description" style="width:20em"></td>
+		<td><input type="text" id="description" name="description" style="width:250px"></td>
 	</tr>
 
 	<tr>
 		<td><label for="compulsory" style="width:100%">$i18n.getString( "compulsory" ) <em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
 		<td>
-			<select id="compulsory" name="compulsory" style="width:20em" onchange="changeCompulsory(this.value)">
+			<select id="compulsory" name="compulsory" style="width:254px" onchange="changeCompulsory(this.value)">
 				<option value="true" selected="selected">$i18n.getString( "yes" )</option>
 				<option value="false">$i18n.getString( "no" )</option>
 			</select>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/updateOrganisationUnitGroupSetForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/updateOrganisationUnitGroupSetForm.vm	2011-08-18 15:12:34 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/updateOrganisationUnitGroupSetForm.vm	2011-10-05 10:06:16 +0000
@@ -38,18 +38,18 @@
 	
 	<tr>
 		<td><label for="name">$i18n.getString( "name" ) <em title="$i18n.getString( "required" )" class="required">*</em></label></td>
-		<td><input type="text" id="name" name="name" value="$encoder.htmlEncode( $organisationUnitGroupSet.name )" style="width:20em"></td>
+		<td><input type="text" id="name" name="name" value="!$encoder.htmlEncode( $organisationUnitGroupSet.name )" style="width:250px"></td>
 	</tr>
 	
 	<tr>
 		<td><label for="description">$i18n.getString( "description" ) <em title="$i18n.getString( "required" )" class="required">*</em></label></td>
-		<td><input type="text" id="description" name="description" value="$encoder.htmlEncode( $organisationUnitGroupSet.description )" style="width:20em"></td>
+		<td><input type="text" id="description" name="description" value="$encoder.htmlEncode( $organisationUnitGroupSet.description )" style="width:250px"></td>
 	</tr>
 	
 	<tr>
 		<td><label for="compulsory">$i18n.getString( "compulsory" ) <em title="$i18n.getString( "required" )" class="required">*</em></label></td>
 		<td>
-			<select id="compulsory" name="compulsory" style="width:20em" onchange="changeCompulsory( this.value )">
+			<select id="compulsory" name="compulsory" style="width:254px" onchange="changeCompulsory( this.value )">
 				<option value="true" #if( $organisationUnitGroupSet.compulsory ) selected="selected" #end>$i18n.getString( "yes" )</option>
 				<option value="false" #if( !$organisationUnitGroupSet.compulsory ) selected="selected" #end>$i18n.getString( "no" )</option>
 			</select>