← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 11806: Fixed big - Exception thrown when to save a Aggregate tabular report.

 

------------------------------------------------------------
revno: 11806
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2013-08-27 13:15:02 +0700
message:
  Fixed big - Exception thrown when to save a Aggregate tabular report.
modified:
  dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/report/GetAggregateReportListAction.java
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/jsonTabularReport.vm
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/jsonTabularReportList.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-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/report/GetAggregateReportListAction.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/report/GetAggregateReportListAction.java	2013-08-23 16:05:01 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/report/GetAggregateReportListAction.java	2013-08-27 06:15:02 +0000
@@ -127,7 +127,8 @@
 
         total = aggregateReportService.countPatientAggregateReportList( user, query );
 
-        int startPos = currentPage <= 0 ? 0 : (currentPage - 1) * pageSize;
+        pageSize = (pageSize == null) ? 10 : pageSize;
+        int startPos = (currentPage == null || currentPage <= 0) ? 0 : (currentPage - 1) * pageSize;
         startPos = (startPos > total) ? total : startPos;
 
         pageCount = (total % pageSize == 0) ? (total / pageSize) : (total / pageSize + 1);

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/jsonTabularReport.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/jsonTabularReport.vm	2013-08-20 08:40:55 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/jsonTabularReport.vm	2013-08-27 06:15:02 +0000
@@ -15,6 +15,7 @@
 	
 	"type": "${programStage.program.type}",
 	"programStageId": "${programStage.id}",
+	"programStageUid": "${programStage.uid}",
 	"programStageName": "$!encoder.jsonEncode( ${programStage.displayName} )",
 	"programStages": [
 		#set( $programStages = $programStage.program.programStages )

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/jsonTabularReportList.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/jsonTabularReportList.vm	2013-05-23 14:28:28 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/jsonTabularReportList.vm	2013-08-27 06:15:02 +0000
@@ -18,7 +18,7 @@
   #end
   ],
   "pager":{
-	  "currentPage":$!currentPage,
+	  "currentPage":"$!currentPage",
 	  "pageSize":10,
 	  "total":$!total,
 	  "pageCount":$!pageCount