dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #21511
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 10194: Fix bug when to use group-by in aggregate tabular report.
------------------------------------------------------------
revno: 10194
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2013-03-14 12:03:19 +0700
message:
Fix bug when to use group-by in aggregate tabular report.
modified:
dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/hibernate/HibernateProgramStageInstanceStore.java
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/app/app.js
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programStageInstancesList.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-patient/src/main/java/org/hisp/dhis/program/hibernate/HibernateProgramStageInstanceStore.java'
--- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/hibernate/HibernateProgramStageInstanceStore.java 2013-03-13 18:50:11 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/hibernate/HibernateProgramStageInstanceStore.java 2013-03-14 05:03:19 +0000
@@ -674,7 +674,7 @@
sql = getAggregateReportSQL8( programStage, orgunitIds, facilityLB, filterSQL, deGroupBy, periods
.iterator().next(), aggregateType, limit, useCompletedEvents, format );
}
- System.out.println( "\n\n === \n " + sql );
+
if ( !sql.isEmpty() )
{
SqlRowSet rowSet = jdbcTemplate.queryForRowSet( sql );
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/app/app.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/app/app.js 2013-03-13 18:38:19 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/app/app.js 2013-03-14 05:03:19 +0000
@@ -514,7 +514,6 @@
var fixedId = id.substring(0, id.lastIndexOf('_') );
params.typeAhead = true;
params.forceSelection = true;
- params.hideValue = true;
if( valueType == 'bool' || fixedId=='fixedAttr_gender' || fixedId=='fixedAttr_dobType')
{
params.queryMode = 'local';
@@ -1775,7 +1774,7 @@
var filterField = Ext.getCmp('filter_' + id);
var filterValue = "";
- if( filterField.hideValue = true )
+ if( filterField.xtype == 'combobox' )
{
var values = Ext.getCmp('filter_' + id).getValue();
for( var i in values ){
@@ -1791,7 +1790,7 @@
if( filterValue!='' ){
filterValue = filterValue.toLowerCase();
var filterOpt = Ext.getCmp('filter_opt_' + id).rawValue;
- filter += '_' + filterOpt + ' ';
+ filter += filterOpt + ' ';
if( filterOpt == 'IN' )
{
var filterValues = filterValue.split(";");
@@ -1892,7 +1891,7 @@
var filterField = Ext.getCmp('filter_' + id);
var filterValue = "";
- if( filterField.hideValue = true )
+ if( filterField.xtype == 'combobox' )
{
var values = Ext.getCmp('filter_' + id).getValue();
for( var i in values ){
@@ -1908,7 +1907,7 @@
if( filterValue!=''){
filterValue = filterValue.toLowerCase();
var filterOpt = Ext.getCmp('filter_opt_' + id).rawValue;
- filter += '_' + filterOpt + ' ';
+ filter += filterOpt + ' ';
if( filterOpt == 'IN' )
{
@@ -2162,7 +2161,7 @@
var filterField = Ext.getCmp('filter_' + id);
var filterValue = "";
- if( filterField.hideValue = true )
+ if( filterField.xtype == 'combobox' )
{
var values = Ext.getCmp('filter_' + id).getValue();
for( var i in values ){
@@ -2294,7 +2293,7 @@
var filterField = Ext.getCmp('filter_' + id);
var filterValue = "";
- if( filterField.hideValue = true )
+ if( filterField.xtype == 'combobox' )
{
var values = Ext.getCmp('filter_' + id).getValue();
for( var i in values ){
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programStageInstancesList.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programStageInstancesList.vm 2013-03-13 18:38:19 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programStageInstancesList.vm 2013-03-14 05:03:19 +0000
@@ -27,10 +27,8 @@
<th># </th>
#set($index = 0)
#set( $noHeader = $grid.getHeaders().size() )
- #set( $metaData = $noHeader - $valueTypes.size() - 3 )
#foreach( $col in $grid.getHeaders() )
- #if( $index == 1
- || ( $index > $metaData && $index < $noHeader - 2 ))
+ #if( $index == 1 || ( $index > 2 && $index < $noHeader - 2 ))
<th>$col.name</th>
#end
#set($index = $index + 1)
@@ -54,7 +52,7 @@
#elseif($velocityCount == $noCols - 1)
#set($completed = $col)
#elseif( $index == 1
- || ( $index > $metaData && $index < $noHeader - 2 ))
+ || ( $index > 2 && $index < $noHeader - 2 ))
<td>$!col</td>
#end
#set($index = $index + 1)