← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 4883: Minor fix

 

------------------------------------------------------------
revno: 4883
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2011-10-07 16:11:37 +0200
message:
  Minor fix
modified:
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/message/DefaultMessageService.java
  dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/action/RegisterCompleteDataSetAction.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/message/DefaultMessageService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/message/DefaultMessageService.java	2011-10-07 11:55:51 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/message/DefaultMessageService.java	2011-10-07 14:11:37 +0000
@@ -143,7 +143,7 @@
             User sender = currentUserService.getCurrentUser();
 
             //TODO i18n and string externalization            
-            String subject = "Notification: Form registered as complete";
+            String subject = "Form registered as complete";
             String text = "The form " + registration.getDataSet() + " was registered as complete for period " + 
                 registration.getPeriod().getName() + " and organisation unit " + registration.getSource();
             

=== modified file 'dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/action/RegisterCompleteDataSetAction.java'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/action/RegisterCompleteDataSetAction.java	2011-10-07 11:55:51 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/action/RegisterCompleteDataSetAction.java	2011-10-07 14:11:37 +0000
@@ -125,10 +125,9 @@
         CompleteDataSetRegistration registration = new CompleteDataSetRegistration();
 
         DataSet dataSet = dataSetService.getDataSet( dataSetId );
-        Period period = PeriodType.createPeriodExternalId( periodId );
-        period.setName( format.formatPeriod( period ) );
+        Period period = PeriodType.createPeriodExternalId( periodId );        
         OrganisationUnit organisationUnit = organisationUnitService.getOrganisationUnit( organisationUnitId );
-
+        
         if ( registrationService.getCompleteDataSetRegistration( dataSet, period, organisationUnit ) == null )
         {
             registration.setDataSet( dataSet );
@@ -140,6 +139,8 @@
 
             log.info( "DataSet registered as complete: " + registration );
 
+            registration.getPeriod().setName( format.formatPeriod( registration.getPeriod() ) );
+            
             messageService.sendCompletenessMessage( registration );
         }