← Back to team overview

dhis2-devs team mailing list archive

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

 

------------------------------------------------------------
revno: 10919
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2013-05-21 15:30:35 +0700
message:
  Minor fix.
modified:
  dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/scheduling/SendScheduledMessageTask.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/org/hisp/dhis/patient/i18n_module.properties


--
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-patient/src/main/java/org/hisp/dhis/patient/scheduling/SendScheduledMessageTask.java'
--- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/scheduling/SendScheduledMessageTask.java	2013-05-21 08:23:31 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/scheduling/SendScheduledMessageTask.java	2013-05-21 08:30:35 +0000
@@ -170,7 +170,7 @@
                     + "FROM programstageinstance_outboundsms where programstageinstanceid="
                     + schedulingProgramObject.getProgramStageInstanceId();
                 Integer sortOrder = jdbcTemplate.queryForObject( sortOrderSql, Integer.class );
-                if( sortOrder== null)
+                if ( sortOrder == null )
                 {
                     sortOrder = 0;
                 }
@@ -213,11 +213,17 @@
                 String sortOrderSql = "select max(sort_order) "
                     + "from programinstance_outboundsms where programinstanceid="
                     + schedulingProgramObject.getProgramInstanceId();
-                int sortOrder = jdbcTemplate.queryForObject( sortOrderSql, Integer.class ) + 1;
+                Integer sortOrder = jdbcTemplate.queryForObject( sortOrderSql, Integer.class );
+                if ( sortOrder == null )
+                {
+                    sortOrder = 0;
+                }
+                sortOrder = sortOrder + 1;
 
                 String sql = "INSERT INTO programinstance_outboundsms"
                     + "( programinstanceid, outboundsmsid, sort_order) VALUES " + "("
-                    + schedulingProgramObject.getProgramInstanceId() + ", " + outboundSms.getId() + "," + sortOrder + ") ";
+                    + schedulingProgramObject.getProgramInstanceId() + ", " + outboundSms.getId() + "," + sortOrder
+                    + ") ";
 
                 jdbcTemplate.execute( sql );
 

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/org/hisp/dhis/patient/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/org/hisp/dhis/patient/i18n_module.properties	2013-05-21 07:51:32 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/org/hisp/dhis/patient/i18n_module.properties	2013-05-21 08:30:35 +0000
@@ -403,4 +403,6 @@
 or_operator = OR
 combine_operator = COMBINE
 filter_by_type = Filter by type
-orgunit_group = Organisation unit group
\ No newline at end of file
+orgunit_group = Organisation unit group
+enrollement_date = Enrollement date
+days_since_incident_date = Days since incident date
\ No newline at end of file