← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 6182: DataSet and OrganisationUnit - Added "description" field back

 

------------------------------------------------------------
revno: 6182
committer: Hieu <hieu.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2012-03-06 10:17:52 +0700
message:
  DataSet and OrganisationUnit - Added "description" field back
modified:
  dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/dataset/hibernate/DataSet.hbm.xml
  dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/organisationunit/hibernate/OrganisationUnit.hbm.xml
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonDataSet.vm
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonOrganisationUnit.vm
  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-dataset/src/main/java/org/hisp/dhis/dataset/action/AddDataSetAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/UpdateDataSetAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/addDataSet.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/dataSetList.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/editDataSet.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/javascript/dataSet.js
  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/UpdateOrganisationUnitAction.java
  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/javascript/organisationUnit.js
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/organisationUnit.vm
  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-reporting/src/main/webapp/dhis-web-reporting/viewDataCompletenessForm.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-services/dhis-service-core/src/main/resources/org/hisp/dhis/dataset/hibernate/DataSet.hbm.xml'
--- dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/dataset/hibernate/DataSet.hbm.xml	2012-02-17 13:25:29 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/dataset/hibernate/DataSet.hbm.xml	2012-03-06 03:17:52 +0000
@@ -17,6 +17,8 @@
 
     <property name="shortName" unique="true" length="50" />
 
+    <property name="description" type="text" />
+
     <many-to-one name="periodType" lazy="false" class="org.hisp.dhis.period.PeriodType" column="periodtypeid"
         not-null="true" foreign-key="fk_dataset_periodtypeid" />
 

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/organisationunit/hibernate/OrganisationUnit.hbm.xml'
--- dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/organisationunit/hibernate/OrganisationUnit.hbm.xml	2011-11-23 18:07:35 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/organisationunit/hibernate/OrganisationUnit.hbm.xml	2012-03-06 03:17:52 +0000
@@ -26,6 +26,8 @@
 
     <property name="shortName" column="shortname" not-null="true" unique="false" length="50" />
 
+	<property name="description" type="text" />
+
     <property name="openingDate" column="openingdate" type="date" />
 
     <property name="closedDate" column="closeddate" type="date" />

=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonDataSet.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonDataSet.vm	2012-02-21 12:53:55 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonDataSet.vm	2012-03-06 03:17:52 +0000
@@ -3,6 +3,7 @@
     "id": $!{dataSet.id},
     "name": "$!encoder.jsonEncode( ${dataSet.displayName} )",
     "shortName": "$!encoder.jsonEncode( ${dataSet.displayShortName} )",
+    "description": "$!encoder.jsonEncode( ${dataSet.description} )",
     "periodTypeId": "$!{dataSet.periodTypeId}",
 	"frequency": "$i18n.getString( $!{dataSet.periodType.name} )",
     "dataElementCount": "$!{dataSet.dataElements.size()}",

=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonOrganisationUnit.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonOrganisationUnit.vm	2010-12-22 15:06:42 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonOrganisationUnit.vm	2012-03-06 03:17:52 +0000
@@ -3,6 +3,7 @@
     "id": $!{organisationUnit.id},
     "name": "$!encoder.jsonEncode( ${organisationUnit.name} )",
     "shortName": "$!encoder.jsonEncode( ${organisationUnit.shortName} )",
+    "description": "$!encoder.jsonEncode( ${organisationUnit.description} )",
     "code": "$!encoder.jsonEncode( ${organisationUnit.code} )",
     "openingDate": "$!{organisationUnit.openingDate}",
     "closedDate": "$!{organisationUnit.closedDate}",

=== 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	2012-02-05 13:27:40 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/validationRules.js	2012-03-06 03:17:52 +0000
@@ -69,6 +69,9 @@
             "required" : true,
             "rangelength" : [ 2, 25 ]
         },
+        "description" : {
+            "required" : true
+        },
         "code" : {
             "rangelength" : [ 0, 25 ],
             "alphanumericwithbasicpuncspaces" : true,
@@ -147,6 +150,9 @@
             "alphanumericwithbasicpuncspaces" : true,
             "rangelength" : [ 2, 25 ]
         },
+        "description" : {
+            "required" : true
+        },
         "code" : {
             "alphanumericwithbasicpuncspaces" : true,
             "notOnlyDigits" : false,

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/AddDataSetAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/AddDataSetAction.java	2012-02-21 19:20:15 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/AddDataSetAction.java	2012-03-06 03:17:52 +0000
@@ -27,6 +27,8 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+import static org.hisp.dhis.system.util.TextUtils.nullIfEmpty;
+
 import java.util.Collection;
 import java.util.HashSet;
 import java.util.Set;
@@ -105,6 +107,13 @@
         this.code = code;
     }
 
+    private String description;
+
+    public void setDescription( String description )
+    {
+        this.description = description;
+    }
+
     private int expiryDays;
 
     public void setExpiryDays( int expiryDays )
@@ -150,23 +159,17 @@
         // ---------------------------------------------------------------------
         // Prepare values
         // ---------------------------------------------------------------------
-
-        if ( shortName != null && shortName.trim().length() == 0 )
-        {
-            shortName = null;
-        }
-
-        if ( code != null && code.trim().length() == 0 )
-        {
-            code = null;
-        }
         
+        code = nullIfEmpty( code );
+        shortName = nullIfEmpty( shortName );
+        description = nullIfEmpty( description );
+
         PeriodType periodType = PeriodType.getPeriodTypeByName( frequencySelect );
 
         DataSet dataSet = new DataSet( name, shortName, code, periodType );
 
         dataSet.setExpiryDays( expiryDays );
-        
+
         for ( String id : dataElementsSelectedList )
         {
             dataSet.addDataElement( dataElementService.getDataElement( Integer.parseInt( id ) ) );
@@ -179,9 +182,10 @@
             indicators.add( indicatorService.getIndicator( Integer.parseInt( id ) ) );
         }
 
+        dataSet.setVersion( 1 );
         dataSet.setMobile( mobile );
-        dataSet.setVersion( 1 );
         dataSet.setIndicators( indicators );
+        dataSet.setDescription( description );
 
         dataSetService.addDataSet( dataSet );
 

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/UpdateDataSetAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/UpdateDataSetAction.java	2012-02-21 19:20:15 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/UpdateDataSetAction.java	2012-03-06 03:17:52 +0000
@@ -43,6 +43,7 @@
 import com.opensymphony.xwork2.Action;
 
 import static org.hisp.dhis.system.util.TextUtils.equalsNullSafe;
+import static org.hisp.dhis.system.util.TextUtils.nullIfEmpty;
 
 /**
  * @author Kristian
@@ -82,7 +83,7 @@
     {
         this.indicatorService = indicatorService;
     }
-    
+
     // -------------------------------------------------------------------------
     // Input & output
     // -------------------------------------------------------------------------
@@ -108,6 +109,13 @@
         this.code = code;
     }
 
+    private String description;
+
+    public void setDescription( String description )
+    {
+        this.description = description;
+    }
+
     private int expiryDays;
 
     public void setExpiryDays( int expiryDays )
@@ -154,15 +162,9 @@
         // Prepare values
         // ---------------------------------------------------------------------
 
-        if ( shortName != null && shortName.trim().length() == 0 )
-        {
-            shortName = null;
-        }
-
-        if ( code != null && code.trim().length() == 0 )
-        {
-            code = null;
-        }
+        code = nullIfEmpty( code );
+        shortName = nullIfEmpty( shortName );
+        description = nullIfEmpty( description );
 
         Set<DataElement> dataElements = new HashSet<DataElement>();
 
@@ -184,14 +186,15 @@
 
         dataSet.setExpiryDays( expiryDays );
 
-        if ( !( equalsNullSafe( name, dataSet.getName() ) && periodType.equals( dataSet.getPeriodType() ) && 
-            dataElements.equals( dataSet.getDataElements() ) && indicators.equals( dataSet.getIndicators() ) ) )
+        if ( !(equalsNullSafe( name, dataSet.getName() ) && periodType.equals( dataSet.getPeriodType() )
+            && dataElements.equals( dataSet.getDataElements() ) && indicators.equals( dataSet.getIndicators() )) )
         {
-            dataSet.increaseVersion(); // Check if version must be updated            
+            dataSet.increaseVersion(); // Check if version must be updated
         }
-        
+
         dataSet.setName( name );
         dataSet.setShortName( shortName );
+        dataSet.setDescription( description );
         dataSet.setCode( code );
         dataSet.setPeriodType( periodService.getPeriodTypeByClass( periodType.getClass() ) );
         dataSet.updateDataElements( dataElements );

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/addDataSet.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/addDataSet.vm	2012-02-05 13:27:40 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/addDataSet.vm	2012-03-06 03:17:52 +0000
@@ -61,19 +61,23 @@
     <tbody>
       <tr>
         <td><label>$i18n.getString( "name" ) <em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
-        <td><input type="text" id="name" name="name" onchange="nameChanged()" style="width:20em"></td>
+        <td><input type="text" id="name" name="name" onchange="nameChanged()" style="width:20em"/></td>
       </tr>
       <tr>
         <td><label>$i18n.getString( "short_name" ) <em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
-        <td><input type="text" id="shortName" name="shortName" style="width:20em"></td>
+        <td><input type="text" id="shortName" name="shortName" style="width:20em"/></td>
+      </tr>
+      <tr>
+        <td><label>$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>
       </tr>
       <tr>
         <td><label>$i18n.getString( "code" )</label></td>
-        <td><input type="text" id="code" name="code" style="width:20em"></td>
+        <td><input type="text" id="code" name="code" style="width:20em"/></td>
       </tr>
       <tr>
         <td><label>$i18n.getString( "expiry_days" )</label></td>
-        <td><input type="text" id="expiryDays" name="expiryDays" style="width:20em"></td>
+        <td><input type="text" id="expiryDays" name="expiryDays" style="width:20em"/></td>
       </tr>
       <tr>
         <td><label>$i18n.getString( "frequency" ) <em title="$i18n.getString( 'required' )" class="required">*</em></label></td>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/dataSetList.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/dataSetList.vm	2011-03-18 14:20:18 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/dataSetList.vm	2012-03-06 03:17:52 +0000
@@ -71,6 +71,7 @@
 					<a href="javascript:hideDetails()" title="$i18n.getString( 'hide_details' )"><img src="../images/close.png" alt="$i18n.getString( 'hide_details' )"/></a>
 				</div>
 				<p><label>$i18n.getString( "name" ):</label><br/><span id="nameField"></span></p>
+				<p><label>$i18n.getString( "description" ):</label><br/><span id="descriptionField"></span></p>
 				<p><label>$i18n.getString( "frequency" ):</label><br/><span id="frequencyField"></span></p>
 				<p><label>$i18n.getString( "number_of_data_elements" ):</label><br/><span id="dataElementCountField"></span></p>
 				<p><label>$i18n.getString( "dataentryform" ):</label><br/><span id="dataEntryFormField"></span></p>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/editDataSet.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/editDataSet.vm	2012-02-05 13:27:40 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/editDataSet.vm	2012-03-06 03:17:52 +0000
@@ -61,19 +61,23 @@
     <tbody>
       <tr>
         <td><label>$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( $dataSet.name )"></td>
+        <td><input type="text" id="name" name="name" style="width:20em" value="$!encoder.htmlEncode( $dataSet.name )"/></td>
       </tr>
       <tr>
         <td><label>$i18n.getString( "short_name" ) <em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
-        <td><input type="text" id="shortName" name="shortName" style="width:20em" value="$!encoder.htmlEncode( $dataSet.shortName )"></td>
-      </tr>     
+        <td><input type="text" id="shortName" name="shortName" style="width:20em" value="$!encoder.htmlEncode( $dataSet.shortName )"/></td>
+      </tr>
+      <tr>
+        <td><label>$i18n.getString( "description" ) <em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
+        <td><input type="text" id="description" name="description" style="width:20em" value="$!encoder.htmlEncode( $dataSet.description )"/></td>
+      </tr>
       <tr>
         <td><label>$i18n.getString( "code" )</label></td>
-        <td><input type="text" id="code" name="code" style="width:20em" value="$!encoder.htmlEncode( $dataSet.code )"></td>
+        <td><input type="text" id="code" name="code" style="width:20em" value="$!encoder.htmlEncode( $dataSet.code )"/></td>
       </tr>
       <tr>
         <td><label>$i18n.getString( "expiry_days" )</label></td>
-        <td><input type="text" id="expiryDays" name="expiryDays" style="width:20em" value="$!encoder.htmlEncode( $dataSet.expiryDays )"></td>
+        <td><input type="text" id="expiryDays" name="expiryDays" style="width:20em" value="$!encoder.htmlEncode( $dataSet.expiryDays )"/></td>
       </tr>
       <tr>
         <td><label>$i18n.getString( "frequency" ) <em title="$i18n.getString( 'required' )" class="required">*</em></label></td>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/javascript/dataSet.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/javascript/dataSet.js	2012-03-04 13:46:17 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/javascript/dataSet.js	2012-03-06 03:17:52 +0000
@@ -9,6 +9,7 @@
     }, function( json )
     {
         setInnerHTML( 'nameField', json.dataSet.name );
+        setInnerHTML( 'descriptionField', json.dataSet.description );
         setInnerHTML( 'frequencyField', json.dataSet.frequency );
         setInnerHTML( 'dataElementCountField', json.dataSet.dataElementCount );
         setInnerHTML( 'dataEntryFormField', json.dataSet.dataentryform );

=== 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	2012-02-22 12:01:02 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/java/org/hisp/dhis/oum/action/organisationunit/AddOrganisationUnitAction.java	2012-03-06 03:17:52 +0000
@@ -117,6 +117,13 @@
         this.shortName = shortName;
     }
 
+    private String description;
+
+    public void setDescription( String description )
+    {
+        this.description = description;
+    }
+
     private String code;
 
     public void setCode( String code )
@@ -231,6 +238,7 @@
     {
         code = nullIfEmpty( code );
         comment = nullIfEmpty( comment );
+        description = nullIfEmpty( description );
         longitude = nullIfEmpty( longitude );
         latitude = nullIfEmpty( latitude );
         url = nullIfEmpty( url );
@@ -263,6 +271,7 @@
 
         OrganisationUnit organisationUnit = new OrganisationUnit( name, shortName, code, date, null, active, comment );
 
+        organisationUnit.setDescription( description );
         organisationUnit.setUrl( url );
         organisationUnit.setParent( parent );
         organisationUnit.setContactPerson( contactPerson );
@@ -288,19 +297,19 @@
         if ( longitude != null && latitude != null )
         {
             String coordinates = ValidationUtils.getCoordinate( longitude, latitude );
-                
+
             if ( ValidationUtils.coordinateIsValid( coordinates ) )
             {
                 organisationUnit.setCoordinates( coordinates );
                 organisationUnit.setFeatureType( OrganisationUnit.FEATURETYPE_POINT );
-            }            
+            }
         }
-        
+
         // ---------------------------------------------------------------------
         // Must persist org unit before adding data sets because association are
         // updated on both sides (and this side is inverse)
         // ---------------------------------------------------------------------
-        
+
         organisationUnitId = organisationUnitService.addOrganisationUnit( organisationUnit );
 
         for ( String id : dataSets )

=== 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	2012-01-20 05:42:41 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/java/org/hisp/dhis/oum/action/organisationunit/UpdateOrganisationUnitAction.java	2012-03-06 03:17:52 +0000
@@ -126,6 +126,13 @@
         this.shortName = shortName;
     }
 
+    private String description;
+
+    public void setDescription( String description )
+    {
+        this.description = description;
+    }
+
     private String code;
 
     public void setCode( String code )
@@ -247,6 +254,7 @@
     {
         code = nullIfEmpty( code );
         comment = nullIfEmpty( comment );
+        description = nullIfEmpty( description );
         longitude = nullIfEmpty( longitude );
         latitude = nullIfEmpty( latitude );
         url = nullIfEmpty( url );
@@ -278,6 +286,7 @@
 
         organisationUnit.setName( name );
         organisationUnit.setShortName( shortName );
+        organisationUnit.setDescription( description );
         organisationUnit.setCode( code );
         organisationUnit.setActive( active );
         organisationUnit.setOpeningDate( oDate );
@@ -299,24 +308,25 @@
         // Set coordinates and feature type to point if valid
         // ---------------------------------------------------------------------
 
-        boolean point = organisationUnit.getCoordinates() == null || coordinateIsValid( organisationUnit.getCoordinates() );
-        
+        boolean point = organisationUnit.getCoordinates() == null
+            || coordinateIsValid( organisationUnit.getCoordinates() );
+
         if ( point )
         {
             String coordinates = null;
             String featureType = null;
-            
-            if ( longitude != null && latitude != null && 
-                ValidationUtils.coordinateIsValid( ValidationUtils.getCoordinate( longitude, latitude ) ) )
+
+            if ( longitude != null && latitude != null
+                && ValidationUtils.coordinateIsValid( ValidationUtils.getCoordinate( longitude, latitude ) ) )
             {
                 coordinates = ValidationUtils.getCoordinate( longitude, latitude );
                 featureType = OrganisationUnit.FEATURETYPE_POINT;
             }
-            
+
             organisationUnit.setCoordinates( coordinates );
             organisationUnit.setFeatureType( featureType );
         }
-        
+
         Set<DataSet> sets = new HashSet<DataSet>();
 
         for ( String id : dataSets )

=== 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	2012-02-22 12:01:02 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/addOrganisationUnitForm.vm	2012-03-06 03:17:52 +0000
@@ -38,6 +38,10 @@
 		<td><input type="text" id="shortName" name="shortName" style="width:20em"/></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" style="width:20em"/></td>
+	</tr>
+	<tr>
 		<td><label for="code">$i18n.getString( "code" )</label></td>
 		<td><input type="text" id="code" name="code" style="width:20em"/></td>
 	</tr>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/javascript/organisationUnit.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/javascript/organisationUnit.js	2011-12-04 11:08:52 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/javascript/organisationUnit.js	2012-03-06 03:17:52 +0000
@@ -35,6 +35,7 @@
 		{ id: unitId }, function ( json ) {
 		setInnerHTML( 'nameField', json.organisationUnit.name );
 		setInnerHTML( 'shortNameField', json.organisationUnit.shortName );
+		setInnerHTML( 'descriptionField', json.organisationUnit.description );
 		setInnerHTML( 'openingDateField', json.organisationUnit.openingDate );
 
 		var orgUnitCode = json.organisationUnit.code;

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/organisationUnit.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/organisationUnit.vm	2011-09-26 09:31:56 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/organisationUnit.vm	2012-03-06 03:17:52 +0000
@@ -64,6 +64,7 @@
 				</div>				
 				<p><label>$i18n.getString( "name" ):</label><br/><span id="nameField"></span></p>
 				<p><label>$i18n.getString( "short_name" ):</label><br/><span id="shortNameField"></span></p>
+				<p><label>$i18n.getString( "description" ):</label><br/><span id="descriptionField"></span></p>
 				<p><label>$i18n.getString( "code" ):</label><br/><span id="codeField"></span></p>
 				<p><label>$i18n.getString( "opening_date" ):</label><br/><span id="openingDateField"></span></p>
 				<p><label>$i18n.getString( "closed_date" ):</label><br/><span id="closedDateField"></span></p>

=== 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	2012-02-22 12:01:02 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/updateOrganisationUnitForm.vm	2012-03-06 03:17:52 +0000
@@ -40,20 +40,24 @@
 		<th colspan="2">$i18n.getString( "details" )</th>
 	</tr>
 	<tr>
-		<td style="width:200px"><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( $organisationUnit.name )" onchange="nameChanged()" style="width:20em"></td>
-	</tr>
-	<tr>
-		<td><label for="shortName">$i18n.getString( "short_name" ) <em title="$i18n.getString( "required" )" class="required">*</em></label></td>
-		<td><input type="text" id="shortName" name="shortName" value="$encoder.htmlEncode( $organisationUnit.shortName )" style="width:20em"></td>
+		<td style="width:200px"><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( $organisationUnit.name )" onchange="nameChanged()" style="width:20em"/></td>
+	</tr>
+	<tr>
+		<td><label for="shortName">$i18n.getString( "short_name" ) <em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
+		<td><input type="text" id="shortName" name="shortName" value="$encoder.htmlEncode( $organisationUnit.shortName )" style="width:20em"/></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( $organisationUnit.description )" style="width:20em"/></td>
 	</tr>
 	<tr>
 		<td><label for="code">$i18n.getString( "code" )</label></td>
 		<td><input type="text" id="code" name="code" value="$!encoder.htmlEncode( $organisationUnit.code )" style="width:20em"/></td>
 	</tr>
 	<tr>
-		<td><label for="openingDate">$i18n.getString( "opening_date" ) ($i18n.getString( "format.date.label" )) <em title="$i18n.getString( "required" )" class="required">*</em></label></td>
-		<td><input type="text" id="openingDate" name="openingDate" value="$!format.formatDate( $organisationUnit.openingDate )" style="width:20em"></td>
+		<td><label for="openingDate">$i18n.getString( "opening_date" ) ($i18n.getString( "format.date.label" )) <em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
+		<td><input type="text" id="openingDate" name="openingDate" value="$!format.formatDate( $organisationUnit.openingDate )" style="width:20em"/></td>
 		<td></td>
 	</tr>
 	#if( $numberOfChildren == 0 )
@@ -87,7 +91,7 @@
 	#end
     <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>
+        <td><input type="text" id="url" name="url" value="$!encoder.htmlEncode( $organisationUnit.url )" style="width:20em"/></td>
     </tr>    
 </table>
 
@@ -103,19 +107,19 @@
     </tr>
 	<tr>
 		<td style="width:200px"><label for="contactPerson">$i18n.getString( "contact_person" ) </label></td>
-		<td><input type="text" id="contactPerson" name="contactPerson" value="$!encoder.htmlEncode( $organisationUnit.contactPerson )" style="width:20em"></td>
+		<td><input type="text" id="contactPerson" name="contactPerson" value="$!encoder.htmlEncode( $organisationUnit.contactPerson )" style="width:20em"/></td>
 	</tr>
 	<tr>
 		<td><label for="address">$i18n.getString( "address" ) </label></td>
-		<td><input type="text" id="address" name="address" value="$!encoder.htmlEncode( $organisationUnit.address )" style="width:20em"></td>
+		<td><input type="text" id="address" name="address" value="$!encoder.htmlEncode( $organisationUnit.address )" style="width:20em"/></td>
 	</tr>
 	<tr>
 		<td><label for="email">$i18n.getString( "email" )</label></td>
-		<td><input type="text" id="email" name="email" value="$!encoder.htmlEncode( $organisationUnit.email )" style="width:20em"></td>
+		<td><input type="text" id="email" name="email" value="$!encoder.htmlEncode( $organisationUnit.email )" style="width:20em"/></td>
 	</tr>
     <tr>
         <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>
+        <td><input type="text" id="phoneNumber" name="phoneNumber" value="$!encoder.htmlEncode( $organisationUnit.phoneNumber )" style="width:20em"/></td>
     </tr>
 
 	<tr>
@@ -140,8 +144,8 @@
     <tr>
     	<td></td>
     	<td>
-    		<input type="button" value="$i18n.getString( 'add' )" style="width:120px" onclick="moveSelectedById( 'availableDataSets', 'dataSets' )">
-			<input type="button" value="$i18n.getString( 'remove' )" style="width:120px" onclick="moveSelectedById( 'dataSets', 'availableDataSets' )">
+    		<input type="button" value="$i18n.getString( 'add' )" style="width:120px" onclick="moveSelectedById( 'availableDataSets', 'dataSets' )"/>
+			<input type="button" value="$i18n.getString( 'remove' )" style="width:120px" onclick="moveSelectedById( 'dataSets', 'availableDataSets' )"/>
 		</td>
     </tr>
     <tr>

=== modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/viewDataCompletenessForm.vm'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/viewDataCompletenessForm.vm	2012-02-05 13:08:51 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/viewDataCompletenessForm.vm	2012-03-06 03:17:52 +0000
@@ -14,11 +14,11 @@
 
 <div id="critiera" class="inputCriteria" style="width:660px;height:310px;">
 <table>
-    <col width="300">
-    <col>
+    <col width="300"/>
+    <col/>
     <tr>
     	<td><label>$i18n.getString( "organisation_unit" )</label></td>
-    	</td></td>
+    	<td></td>
     </tr>
     <tr>
 	    <td><div id="selectionTree" style="width:280px; height:270px"></div></td>