← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 7749: (mobile) fixed bug, clear out nextStage variable so that it is not reusing the old stage (if util...

 

------------------------------------------------------------
revno: 7749
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Sun 2012-07-29 12:56:12 +0200
message:
  (mobile) fixed bug, clear out nextStage variable so that it is not reusing the old stage (if utils return null, the var is _not_ changed)
modified:
  dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/utils/NamebasedUtils.java
  dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/namebased/beneficiaryProgramList.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-web/dhis-web-light/src/main/java/org/hisp/dhis/light/utils/NamebasedUtils.java'
--- dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/utils/NamebasedUtils.java	2012-06-05 07:38:12 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/utils/NamebasedUtils.java	2012-07-29 10:56:12 +0000
@@ -27,15 +27,15 @@
 
 package org.hisp.dhis.light.utils;
 
-import java.util.Collection;
-import java.util.Set;
-
 import org.hisp.dhis.api.mobile.IProgramService;
 import org.hisp.dhis.api.mobile.model.Program;
 import org.hisp.dhis.api.mobile.model.ProgramStage;
 import org.hisp.dhis.dataelement.DataElement;
 import org.hisp.dhis.program.ProgramStageInstance;
 
+import java.util.Collection;
+import java.util.Set;
+
 public class NamebasedUtils
 {
     // -------------------------------------------------------------------------
@@ -127,6 +127,7 @@
                 return programStageInstance;
             }
         }
+
         return null;
     }
 }

=== modified file 'dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/namebased/beneficiaryProgramList.vm'
--- dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/namebased/beneficiaryProgramList.vm	2012-07-23 09:58:04 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/namebased/beneficiaryProgramList.vm	2012-07-29 10:56:12 +0000
@@ -15,7 +15,10 @@
           					 $programInstance.getProgram().getName()
           				</a>
           			</li>
+
+                    #set($nextStage = false)
           			#set($nextStage = $util.getNextStage( $programInstance.getProgramStageInstances()))
+
           			#if($nextStage)
           				<li>
           					<a href="showProgramStageForm.action?programId=$programInstance.getProgram().getId()&programStageId=$nextStage.getProgramStage().getId()&programStageInstanceId=$nextStage.getId()&patientId=$patient.getId()&programInstanceId=$programInstance.getId()&orgUnitId=0"> - Next: $nextStage.getProgramStage().getName()</a>