=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/controllers.js' --- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/controllers.js 2015-01-18 23:24:46 +0000 +++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/controllers.js 2015-01-19 08:58:03 +0000 @@ -256,7 +256,7 @@ val = DateUtils.formatFromApiToUser(val); } if( $scope.prStDes[dataValue.dataElement].dataElement.type === 'trueOnly'){ - if(val == 'true'){ + if(val === 'true'){ val = true; } else{ @@ -280,6 +280,10 @@ if($scope.noteExists && !GridColumnService.columnExists($scope.eventGridColumns, 'comment')){ $scope.eventGridColumns.push({name: 'comment', id: 'comment', type: 'string', compulsory: false, showFilter: false, show: true}); } + + if(!$scope.sortHeader.id){ + $scope.sortEventGrid({name: $scope.selectedProgramStage.reportDateDescription ? $scope.selectedProgramStage.reportDateDescription : 'incident_date', id: 'event_date', type: 'date', compulsory: false, showFilter: false, show: true}); + } } $scope.eventFetched = true; });