← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 21492: minor fixes, set autofields in PTEA

 

------------------------------------------------------------
revno: 21492
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2015-12-18 10:55:21 +0100
message:
  minor fixes, set autofields in PTEA
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramTrackedEntityAttribute.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/program/ProgramTrackedEntityAttribute.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramTrackedEntityAttribute.java	2015-12-08 03:10:53 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramTrackedEntityAttribute.java	2015-12-18 09:55:21 +0000
@@ -71,10 +71,12 @@
 
     public ProgramTrackedEntityAttribute()
     {
+        setAutoFields();
     }
 
     public ProgramTrackedEntityAttribute( Program program, TrackedEntityAttribute attribute )
     {
+        this();
         this.program = program;
         this.attribute = attribute;
     }
@@ -82,8 +84,7 @@
     public ProgramTrackedEntityAttribute( Program program, TrackedEntityAttribute attribute, boolean displayInList,
         Boolean mandatory )
     {
-        this.program = program;
-        this.attribute = attribute;
+        this( program, attribute );
         this.displayInList = displayInList;
         this.mandatory = mandatory;
     }
@@ -91,10 +92,7 @@
     public ProgramTrackedEntityAttribute( Program program, TrackedEntityAttribute attribute, boolean displayInList,
         Boolean mandatory, Boolean allowFutureDate )
     {
-        this.program = program;
-        this.attribute = attribute;
-        this.displayInList = displayInList;
-        this.mandatory = mandatory;
+        this( program, attribute, displayInList, mandatory );
         this.allowFutureDate = allowFutureDate;
     }