dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #31127
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 15832: Fixed bug - Exception thrown when to load event list in Visit schedule.
------------------------------------------------------------
revno: 15832
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2014-06-24 22:23:58 +0800
message:
Fixed bug - Exception thrown when to load event list in Visit schedule.
modified:
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/event/JdbcEventStore.java
dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/program/hibernate/HibernateProgramStageInstanceStore.java
dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/hibernate/HibernateTrackedEntityInstanceStore.java
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/activityPlanSelect.vm
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/activityPlan.js
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/searchTrackedEntityInstanceCriteria.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-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/event/JdbcEventStore.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/event/JdbcEventStore.java 2014-06-20 14:17:48 +0000
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/event/JdbcEventStore.java 2014-06-24 14:23:58 +0000
@@ -265,23 +265,23 @@
if ( status == EventStatus.VISITED )
{
- sql = "and psi.status = " + + EventStatus.ACTIVE.getValue() + " and psi.executiondate is not null ";
+ sql = "and psi.status = '" + EventStatus.ACTIVE.name() + "' and psi.executiondate is not null ";
}
else if ( status == EventStatus.COMPLETED )
{
- sql = "and psi.status = " + EventStatus.COMPLETED.getValue();
+ sql = "and psi.status = '" + EventStatus.COMPLETED.name() + "' ";
}
else if ( status == EventStatus.SCHEDULE )
{
- sql += "and psi.executiondate is null and date(now()) <= date(psi.duedate) and psi.status = 0 ";
+ sql += "and psi.executiondate is null and date(now()) <= date(psi.duedate) and psi.status = '" + EventStatus.ACTIVE.name() + "' ";
}
else if ( status == EventStatus.OVERDUE )
{
- sql += "and psi.executiondate is null and date(now()) > date(psi.duedate) and psi.status = 0 ";
+ sql += "and psi.executiondate is null and date(now()) > date(psi.duedate) and psi.status = '" + EventStatus.ACTIVE.name() + "' ";
}
else
{
- sql += "and psi.status = " + status.getValue() + " ";
+ sql += "and psi.status = '" + status.name() + "' ";
}
}
=== modified file 'dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/program/hibernate/HibernateProgramStageInstanceStore.java'
--- dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/program/hibernate/HibernateProgramStageInstanceStore.java 2014-06-20 12:32:01 +0000
+++ dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/program/hibernate/HibernateProgramStageInstanceStore.java 2014-06-24 14:23:58 +0000
@@ -213,7 +213,7 @@
+ "and pg.programid = " + program.getId()
+ "group by ou.name, ps.name, psi.completeduser, psi.completeddate, psi.status "
+ "having psi.completeddate >= '" + startDate + "' AND psi.completeddate <= '" + endDate + "' "
- + "and psi.status=" + EventStatus.COMPLETED.getValue()
+ + "and psi.status='" + EventStatus.COMPLETED.name() + "' "
+ "order by ou.name, ps.name, psi.completeduser";
SqlRowSet rs = jdbcTemplate.queryForRowSet( sql );
=== modified file 'dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/hibernate/HibernateTrackedEntityInstanceStore.java'
--- dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/hibernate/HibernateTrackedEntityInstanceStore.java 2014-06-20 12:32:01 +0000
+++ dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/hibernate/HibernateTrackedEntityInstanceStore.java 2014-06-24 14:23:58 +0000
@@ -365,13 +365,13 @@
{
sql =
"and psi.executiondate >= '" + start + "' and psi.executiondate <= '" + end + "' " +
- "and psi.status = " + EventStatus.COMPLETED.getValue() ;
+ "and psi.status = '" + EventStatus.COMPLETED.name() + "' ";
}
else if ( params.isEventStatus( EventStatus.VISITED ) )
{
sql =
"and psi.executiondate >= '" + start + "' and psi.executiondate <= '" + end + "' " +
- "and psi.status = " + EventStatus.ACTIVE.getValue() ;
+ "and psi.status = '" + EventStatus.ACTIVE.name() + "' ";
}
else if ( params.isEventStatus( EventStatus.SCHEDULE ) )
{
@@ -389,7 +389,7 @@
{
sql =
"and psi.duedate >= '" + start + "' and psi.duedate <= '" + end + "' " +
- "and psi.status = " + EventStatus.SKIPPED.getValue() + " ";
+ "and psi.status = '" + EventStatus.SKIPPED.name() + "' ";
}
return sql;
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/activityPlanSelect.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/activityPlanSelect.vm 2014-04-24 16:30:48 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/activityPlanSelect.vm 2014-06-24 14:23:58 +0000
@@ -67,8 +67,8 @@
<td>
<select id="status" name="status" onchange="statusEventOnChange()">
<option value=''>$i18n.getString("all")</option>
- <option value='FUTURE_VISIT' selected>$i18n.getString("scheduled_in_future")</option>
- <option value='LATE_VISIT'>$i18n.getString("overdue")</option>
+ <option value='SCHEDULE' selected>$i18n.getString("scheduled_in_future")</option>
+ <option value='OVERDUE'>$i18n.getString("overdue")</option>
<option value='VISITED'>$i18n.getString("incomplete")</option>
<option value='COMPLETED'>$i18n.getString("completed")</option>
<option value='SKIPPED'>$i18n.getString("skipped")</option>
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/activityPlan.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/activityPlan.js 2014-06-19 12:51:12 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/activityPlan.js 2014-06-24 14:23:58 +0000
@@ -370,7 +370,7 @@
enable('showEventUpTo');
setDateRange();
}
- else if( status == 'FUTURE_VISIT' ){
+ else if( status == 'SCHEDULE' ){
disable('showEventSince');
enable('showEventUpTo');
setDateRange();
@@ -427,7 +427,7 @@
startDate = startDateSince;
endDate = endDateUpTo;
- } else if( status == 'FUTURE_VISIT_STATUS' ) {
+ } else if( status == 'SCHEDULE' ) {
startDate = startDateUpTo;
endDate = endDateUpTo;
}
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/searchTrackedEntityInstanceCriteria.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/searchTrackedEntityInstanceCriteria.vm 2014-06-15 13:20:39 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/searchTrackedEntityInstanceCriteria.vm 2014-06-24 14:23:58 +0000
@@ -54,10 +54,10 @@
<td>
<select id="status" name="status">
<option value='ACTIVE'>$i18n.getString("all")</option>
- <option value='LATE_VISIT'>$i18n.getString("overdue")</option>
+ <option value='OVERDUE'>$i18n.getString("overdue")</option>
<option value='VISITED'>$i18n.getString("incomplete")</option>
<option value='COMPLETED'>$i18n.getString("completed")</option>
- <option value='FUTURE_VISIT'>$i18n.getString("scheduled_in_future")</option>
+ <option value='SCHEDULE'>$i18n.getString("scheduled_in_future")</option>
<option value='SKIPPED'>$i18n.getString("skipped")</option>
</select>
</td>