← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 19956: introduced optioncombo (only the name) to events

 

------------------------------------------------------------
revno: 19956
committer: Abyot Asalefew Gizaw <abyota@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2015-09-03 11:03:51 +0200
message:
  introduced optioncombo (only the name) to events
modified:
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java
  dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/event/Event.java
  dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/report/EventRow.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-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	2015-09-03 08:15:09 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java	2015-09-03 09:03:51 +0000
@@ -727,7 +727,7 @@
         executeSql( "UPDATE dataset SET version=0 WHERE version IS NULL" );
         executeSql( "UPDATE program SET version=0 WHERE version IS NULL" );
         executeSql( "update program set categorycomboid = " + defaultCategoryComboId + " where categorycomboid is null" );
-        executeSql( "update programstageinstance set attributeOptionCombo = " + defaultOptionComboId + " where attributeOptionCombo is null" );
+        executeSql( "update programstageinstance set attributeoptioncomboid = " + defaultOptionComboId + " where attributeoptioncomboid is null" );
 
 
         executeSql( "ALTER TABLE datavalue ALTER COLUMN lastupdated TYPE timestamp" );

=== modified file 'dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/event/Event.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/event/Event.java	2015-05-05 02:32:33 +0000
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/event/Event.java	2015-09-03 09:03:51 +0000
@@ -81,6 +81,8 @@
     private String created;
 
     private String lastUpdated;
+    
+    private String attributeCategoryOptions;
 
     public Event()
     {
@@ -303,6 +305,18 @@
     {
         this.lastUpdated = lastUpdated;
     }
+    
+    @JsonProperty
+    @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 )
+    public String getAttributeCategoryOptions()
+    {
+        return attributeCategoryOptions;
+    }
+
+    public void setAttributeCategoryOptions( String attributeCategoryOptions )
+    {
+        this.attributeCategoryOptions = attributeCategoryOptions;
+    } 
 
     @Override
     public boolean equals( Object o )
@@ -338,6 +352,7 @@
             ", storedBy='" + storedBy + '\'' +
             ", coordinate=" + coordinate +
             ", dataValues=" + dataValues +
+            ", attributeCategoryOptions=" + attributeCategoryOptions +
             '}';
-    }
+    }       
 }

=== modified file 'dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/report/EventRow.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/report/EventRow.java	2015-05-18 17:05:23 +0000
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/report/EventRow.java	2015-09-03 09:03:51 +0000
@@ -76,6 +76,8 @@
     private List<DataValue> dataValues = new ArrayList<>();
     
     private List<Note> notes = new ArrayList<>();
+    
+    private String attributeCategoryOptions;
 
     public EventRow()
     {
@@ -238,6 +240,18 @@
     {
         this.followup = followup;
     }
+    
+    @JsonProperty
+    @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 )
+    public String getAttributeCategoryOptions()
+    {
+        return attributeCategoryOptions;
+    }
+
+    public void setAttributeCategoryOptions( String attributeCategoryOptions )
+    {
+        this.attributeCategoryOptions = attributeCategoryOptions;
+    } 
 
     @Override
     public boolean equals( Object o )
@@ -303,7 +317,8 @@
             ", registrationOrgUnit='" + orgUnit + '\'' +
             ", trackedEntityInstance='" + trackedEntityInstance + '\'' + 
             ", eventDate='" + eventDate + '\'' + 
-            ", dueDate='" + dueDate + '\'' +            
+            ", dueDate='" + dueDate + '\'' +        
+            ", attributeCategoryOptions=" + attributeCategoryOptions +
             '}';
     }
 }