← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 14797: Fixed bug - Shortcut-link-to-add-a-relative which is defined in Add/update program doesn't work p...

 

------------------------------------------------------------
revno: 14797
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2014-04-11 18:32:07 +0800
message:
  Fixed bug - Shortcut-link-to-add-a-relative which is defined in Add/update program doesn't work properly in TEI D
modified:
  dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/trackedentity/ShowAddTrackedEntityInstanceFormAction.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-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/trackedentity/ShowAddTrackedEntityInstanceFormAction.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/trackedentity/ShowAddTrackedEntityInstanceFormAction.java	2014-04-06 15:48:31 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/trackedentity/ShowAddTrackedEntityInstanceFormAction.java	2014-04-11 10:32:07 +0000
@@ -165,9 +165,9 @@
         return entityInstanceUid;
     }
 
-    private Integer relatedProgramId;
+    private String relatedProgramId;
 
-    public void setRelatedProgramId( Integer relatedProgramId )
+    public void setRelatedProgramId( String relatedProgramId )
     {
         this.relatedProgramId = relatedProgramId;
     }
@@ -318,7 +318,7 @@
         organisationUnit = selectionManager.getSelectedOrganisationUnit();
         healthWorkers = organisationUnit.getUsers();
 
-        if ( programId == null )
+        if ( programId == null || programId.isEmpty() )
         {
             trackedEntityForm = trackedEntityFormService.getCommonTrackedEntityForm();
 
@@ -393,7 +393,7 @@
 
         }
 
-        if ( relatedProgramId != null )
+        if ( relatedProgramId != null && !relatedProgramId.isEmpty() )
         {
             relatedProgram = programService.getProgram( relatedProgramId );
         }