← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 2531: Updated changelog

 

------------------------------------------------------------
revno: 2531
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2011-01-11 20:13:34 +0100
message:
  Updated changelog
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/User.java
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/about/changeLog.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/user/User.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/User.java	2010-06-23 17:50:25 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/User.java	2011-01-11 19:13:34 +0000
@@ -31,6 +31,7 @@
 import java.util.Collection;
 import java.util.HashSet;
 
+import org.apache.commons.collections.CollectionUtils;
 import org.hisp.dhis.organisationunit.OrganisationUnit;
 
 /**
@@ -107,11 +108,26 @@
     // Logic
     // -------------------------------------------------------------------------
 
+    /**
+     * Returns the concatenated first name and surname.
+     */
     public String getName()
     {
         return firstName + " " + surname;
     }
     
+    /**
+     * Returns the first of the organisation units associated with the user. Null
+     * is returned if the user has no organisation units. Which organisation unit
+     * to return is undefined if the user has multiple organisation units.
+     * 
+     * @return an organisation unit associated with the user.
+     */
+    public OrganisationUnit getOrganisationUnit()
+    {
+        return CollectionUtils.isEmpty( organisationUnits ) ? null : organisationUnits.iterator().next();
+    }
+    
     // -------------------------------------------------------------------------
     // Getters and setters
     // -------------------------------------------------------------------------

=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/about/changeLog.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/about/changeLog.vm	2010-05-05 09:17:27 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/about/changeLog.vm	2011-01-11 19:13:34 +0000
@@ -2,6 +2,10 @@
 <h3>$i18n.getString( "change_log" )</h3>
 
 <dl>
+  <dt>$i18n.getString( "release" ) 2.0.6:</dt>
+  <dd><a href="https://blueprints.launchpad.net/dhis2/+milestone/2.0.6"; target="_blank">Launchpad $i18n.getString( "online_release_page" )</a></dd>
+  <dt>$i18n.getString( "release" ) 2.0.5:</dt>
+  <dd><a href="https://blueprints.launchpad.net/dhis2/+milestone/2.0.5"; target="_blank">Launchpad $i18n.getString( "online_release_page" )</a></dd>
   <dt>$i18n.getString( "release" ) 2.0.4:</dt>
   <dd><a href="https://blueprints.launchpad.net/dhis2/+milestone/2.0.4"; target="_blank">Launchpad $i18n.getString( "online_release_page" )</a></dd>
   <dt>$i18n.getString( "release" ) 2.0.3:</dt>