dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #31006
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 15766: Fixed bug - Wrong date range is get for the TEIs result from Visit schedule function.
------------------------------------------------------------
revno: 15766
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2014-06-19 20:51:12 +0800
message:
Fixed bug - Wrong date range is get for the TEIs result from Visit schedule function.
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageInstance.java
dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/UncompleteDataEntryAction.java
dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/activityPlan.js
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/trackedEntityForm.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-api/src/main/java/org/hisp/dhis/program/ProgramStageInstance.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageInstance.java 2014-05-26 05:02:57 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageInstance.java 2014-06-19 12:51:12 +0000
@@ -268,10 +268,6 @@
{
return status;
}
- else if ( this.isCompleted() )
- {
- return ProgramStageInstance.COMPLETED_STATUS;
- }
else if ( this.getExecutionDate() != null )
{
return ProgramStageInstance.VISITED_STATUS;
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/UncompleteDataEntryAction.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/UncompleteDataEntryAction.java 2014-03-18 08:10:10 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/UncompleteDataEntryAction.java 2014-06-19 12:51:12 +0000
@@ -65,25 +65,8 @@
// Input / Output
// -------------------------------------------------------------------------
- private Integer programStageId;
-
- public Integer getProgramStageId()
- {
- return programStageId;
- }
-
- public void setProgramStageId( Integer programStageId )
- {
- this.programStageId = programStageId;
- }
-
public Integer programStageInstanceId;
- public Integer getProgramStageInstanceId()
- {
- return programStageInstanceId;
- }
-
public void setProgramStageInstanceId( Integer programStageInstanceId )
{
this.programStageInstanceId = programStageInstanceId;
@@ -98,16 +81,17 @@
{
ProgramStageInstance programStageInstance = programStageInstanceService
.getProgramStageInstance( programStageInstanceId );
-
+
if ( programStageInstance == null )
{
return SUCCESS;
}
programStageInstance.setCompleted( false );
+ programStageInstance.setStatus( ProgramStageInstance.ACTIVE_STATUS );
programStageInstanceService.updateProgramStageInstance( programStageInstance );
-
+
// ----------------------------------------------------------------------
// Check Completed status for all of ProgramStageInstance of
// ProgramInstance
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties 2014-06-18 10:15:16 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties 2014-06-19 12:51:12 +0000
@@ -689,4 +689,5 @@
duplicate_value_of = Duplicate value of
data_values = Data values
add_tracked_entity_instance_successfully = Add tracked entity instance successfully
-search_by_attribute_value = Search by attribute value
\ No newline at end of file
+search_by_attribute_value = Search by attribute value
+filter_by_program = Filter by program
\ No newline at end of file
=== 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 09:24:54 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/activityPlan.js 2014-06-19 12:51:12 +0000
@@ -422,13 +422,12 @@
}
// check status to get date-range
- if( status == '1_2_3_4'
- || status == '3_4'
- || status == '2_3_4' ) {
+ if( status == ''
+ || status == 'SKIPPED' ) {
startDate = startDateSince;
endDate = endDateUpTo;
- } else if( status == '3' ) {
+ } else if( status == 'FUTURE_VISIT_STATUS' ) {
startDate = startDateUpTo;
endDate = endDateUpTo;
}
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/trackedEntityForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/trackedEntityForm.vm 2014-02-07 20:25:49 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/trackedEntityForm.vm 2014-06-19 12:51:12 +0000
@@ -9,37 +9,50 @@
</div>
-<table class="listTable">
- <col>
- <thead>
- <tr>
- <th>$i18n.getString( "program" )</th>
- </tr>
- </thead>
- <tbody id="list">
- <tr id="tr0" data-id="" data-uid=""
- data-type="trackedEntityForm"
- data-name="$i18n.getString( 'no_program' )">
- #if($mapRegistrationForms.get('0'))
- <td><a>$i18n.getString('no_program')</a></td>
- #else
- <td>$i18n.getString('no_program')</td>
- #end
- </tr>
- #foreach($program in $programs)
- <tr id="tr${program.id}"
- data-id="$!program.id" data-uid="$!program.uid"
- data-type="trackedEntityForm"
- data-name="$encoder.htmlEncode( $!program.displayName )">
-
- #if($mapTrackedEntityForms.get($program.id))
- <td><a>$program.name</a></td>
- #else
- <td>$program.name</td>
- #end
+<table class="mainPageTable">
+ <tr><td style="vertical-align:top">
+ <table width="100%">
+ <tr>
+ <td>$i18n.getString( "filter_by_program" )
+ <input type="text" onkeyup="filterValues( this.value , 1)" />
+ </td>
</tr>
- #end
- </tbody>
+ </table>
+
+ <table class="listTable">
+ <col>
+ <thead>
+ <tr>
+ <th>$i18n.getString( "program" )</th>
+ </tr>
+ </thead>
+ <tbody id="list">
+ <tr id="tr0" data-id="" data-uid=""
+ data-type="trackedEntityForm"
+ data-name="$i18n.getString( 'no_program' )">
+ #if($mapRegistrationForms.get('0'))
+ <td><a>$i18n.getString('no_program')</a></td>
+ #else
+ <td>$i18n.getString('no_program')</td>
+ #end
+ </tr>
+ #foreach($program in $programs)
+ <tr id="tr${program.id}"
+ data-id="$!program.id" data-uid="$!program.uid"
+ data-type="trackedEntityForm"
+ data-name="$encoder.htmlEncode( $!program.displayName )">
+
+ #if($mapTrackedEntityForms.get($program.id))
+ <td><a>$program.name</a></td>
+ #else
+ <td>$program.name</td>
+ #end
+ </tr>
+ #end
+ </tbody>
+
+ </table>
+ </td></tr>
</table>
<script type="text/javascript">