← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 5707: Fixed minor bug with messages, lastupdated property was not set on message object

 

------------------------------------------------------------
revno: 5707
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2012-01-11 16:58:25 +0100
message:
  Fixed minor bug with messages, lastupdated property was not set on message object
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/message/MessageConversation.java
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/common/IdentityPopulator.java
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/message/MessageConversation.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/message/MessageConversation.java	2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/message/MessageConversation.java	2012-01-11 15:58:25 +0000
@@ -83,6 +83,11 @@
 
     public void addMessage( Message message )
     {
+        if ( message != null )
+        {
+            message.setAutoFields();
+        }
+        
         this.messages.add( message );
     }
 
@@ -169,10 +174,10 @@
         this.subject = subject;
     }
 
-/*    @XmlElementWrapper( name = "userMessages" )
+    /* @XmlElementWrapper( name = "userMessages" )
     @XmlElement( name = "userMessage" )
-    @JsonProperty */
-    // TODO waiting for idObject version of userMessage
+    @JsonProperty 
+    TODO waiting for idObject version of userMessage */
     public Set<UserMessage> getUserMessages()
     {
         return userMessages;

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/common/IdentityPopulator.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/common/IdentityPopulator.java	2011-12-21 11:37:17 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/common/IdentityPopulator.java	2012-01-11 15:58:25 +0000
@@ -53,7 +53,7 @@
         "indicatorgroup", "datadictionary", "validationrulegroup", "validationrule", "dataset", "orgunitlevel", "document",
         "organisationunit", "orgunitgroup", "orgunitgroupset", "dataelementcategoryoption", "dataelementgroup", "sqlview",
         "dataelement", "dataelementgroupset", "dataelementcategory", "categorycombo", "categoryoptioncombo", "mapview", 
-        "reporttable", "report", "messageconversation", "userinfo", "usergroup" };
+        "reporttable", "report", "messageconversation", "message", "userinfo", "usergroup" };
 
     // -------------------------------------------------------------------------
     // Dependencies

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java	2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java	2012-01-11 15:58:25 +0000
@@ -323,7 +323,7 @@
         executeSql( "ALTER TABLE messageconversation DROP COLUMN messageconversationkey" );
         executeSql( "ALTER TABLE message DROP COLUMN messagesubject" );
         executeSql( "ALTER TABLE message DROP COLUMN messagekey" );
-        executeSql( "ALTER TABLE message RENAME COLUMN sentdate TO lastupdated" );
+        executeSql( "ALTER TABLE message DROP COLUMN sentdate" );
         executeSql( "ALTER TABLE usermessage DROP COLUMN messagedate" );
         executeSql( "DROP TABLE message_usermessages" );