← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 18999: put back the change which broke the test, though not the right solution. Should find the proper s...

 

------------------------------------------------------------
revno: 18999
committer: Abyot Asalefew Gizaw <abyota@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2015-04-23 19:07:02 +0200
message:
  put back the change which broke the test, though not the right solution. Should find the proper solution, probably after the release.
modified:
  dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/program/DefaultProgramInstanceService.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-tracker/src/main/java/org/hisp/dhis/program/DefaultProgramInstanceService.java'
--- dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/program/DefaultProgramInstanceService.java	2015-04-23 15:16:31 +0000
+++ dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/program/DefaultProgramInstanceService.java	2015-04-23 17:07:02 +0000
@@ -518,6 +518,7 @@
         {
             if ( programStage.getAutoGenerateEvent() )
             {
+                System.out.println("The stage is:  " + programStage.toString());
                 ProgramStageInstance programStageInstance = generateEvent( programInstance, programStage,
                     programInstance.getEnrollmentDate(), programInstance.getDateOfIncident(), organisationUnit );
 
@@ -689,14 +690,14 @@
         {
             programStageInstance = new ProgramStageInstance();
             programStageInstance.setProgramInstance( programInstance );
-            programStageInstance.setProgramStage( programStage );
-            programStageInstance.setOrganisationUnit( orgunit );
+            programStageInstance.setProgramStage( programStage );            
             programStageInstance.setDueDate( dueDate );
             programStageInstance.setStatus( EventStatus.SCHEDULE );
 
             if ( programStage.getOpenAfterEnrollment() || programInstance.getProgram().isSingleEvent()
                 || programStage.getPeriodType() != null )
             {
+                programStageInstance.setOrganisationUnit( orgunit );
                 programStageInstance.setExecutionDate( dueDate );
                 programStageInstance.setStatus( EventStatus.ACTIVE );
             }