Column "Current User" removed from the "Participated list" due to performance reason.

Improvement to the case summary information
This commit is contained in:
Julio Cesar Laura
2012-11-09 15:43:32 -04:00
parent 0751ff554b
commit d390bee40e
4 changed files with 34 additions and 8 deletions

View File

@@ -147,6 +147,20 @@ class AppProxy extends HttpProxyController
throw new Exception( G::LoadTranslation( 'ID_NO_PERMISSION_NO_PARTICIPATED' ) );
}
if ($httpData->action == 'sent') { // Get the last valid delegation for participated list
$criteria = new Criteria();
$criteria->addSelectColumn(AppDelegationPeer::DEL_INDEX);
$criteria->add(AppDelegationPeer::APP_UID, $httpData->appUid);
$criteria->add(AppDelegationPeer::DEL_FINISH_DATE, null, Criteria::ISNULL);
$criteria->addDescendingOrderByColumn(AppDelegationPeer::DEL_INDEX);
if (AppDelegationPeer::doCount($criteria) > 0) {
$dataset = AppDelegationPeer::doSelectRS($criteria);
$dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$dataset->next();
$row = $dataset->getRow();
$httpData->delIndex = $row['DEL_INDEX'];
}
}
$applicationFields = $case->loadCase( $httpData->appUid, $httpData->delIndex );
$process = new Process();
$processData = $process->load( $applicationFields['PRO_UID'] );
@@ -188,6 +202,20 @@ class AppProxy extends HttpProxyController
$processData = $_SESSION['_processData'];
unset( $_SESSION['_processData'] );
} else {
if ($httpData->action == 'sent') { // Get the last valid delegation for participated list
$criteria = new Criteria();
$criteria->addSelectColumn(AppDelegationPeer::DEL_INDEX);
$criteria->add(AppDelegationPeer::APP_UID, $httpData->appUid);
$criteria->add(AppDelegationPeer::DEL_FINISH_DATE, null, Criteria::ISNULL);
$criteria->addDescendingOrderByColumn(AppDelegationPeer::DEL_INDEX);
if (AppDelegationPeer::doCount($criteria) > 0) {
$dataset = AppDelegationPeer::doSelectRS($criteria);
$dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$dataset->next();
$row = $dataset->getRow();
$httpData->delIndex = $row['DEL_INDEX'];
}
}
$applicationFields = $case->loadCase( $httpData->appUid, $httpData->delIndex );
$process = new Process();
$processData = $process->load( $applicationFields['PRO_UID'] );