BUG 6478: Do participated "fix" for search and remove "Sent By"
For participated we go through each row and retrieve the last task of the case instead of the last case of the user. So do the same for Advanced Search. Also remove "Sent by" columns since they don't work.
This commit is contained in:
@@ -395,7 +395,7 @@
|
||||
$caseColumns[] = array( 'header' => 'PreUsrUid', 'dataIndex' => 'PREVIOUS_USR_UID', 'width' => 50, 'hidden'=> true, 'hideable'=> false);
|
||||
$caseColumns[] = array( 'header' => G::LoadTranslation('ID_PROCESS'), 'dataIndex' => 'APP_PRO_TITLE', 'width' => 120 );
|
||||
$caseColumns[] = array( 'header' => G::LoadTranslation('ID_TASK'), 'dataIndex' => 'APP_TAS_TITLE', 'width' => 120 );
|
||||
$caseColumns[] = array( 'header' => G::LoadTranslation('ID_SENT_BY'), 'dataIndex' => 'APP_DEL_PREVIOUS_USER', 'width' => 120 );
|
||||
//$caseColumns[] = array( 'header' => G::LoadTranslation('ID_SENT_BY'), 'dataIndex' => 'APP_DEL_PREVIOUS_USER', 'width' => 120 );
|
||||
$caseColumns[] = array( 'header' => G::LoadTranslation('ID_CURRENT_USER'),'dataIndex' => 'APP_CURRENT_USER', 'width' => 120 );
|
||||
$caseColumns[] = array( 'header' => G::LoadTranslation('ID_LAST_MODIFY'), 'dataIndex' => 'APP_UPDATE_DATE', 'width' => 80 );
|
||||
$caseColumns[] = array( 'header' => G::LoadTranslation('ID_STATUS'), 'dataIndex' => 'APP_STATUS', 'width' => 50 );
|
||||
@@ -430,7 +430,7 @@
|
||||
$caseColumns[] = array( 'header' => 'PreUsrUid', 'dataIndex' => 'PREVIOUS_USR_UID', 'width' => 50 , 'hidden'=> true, 'hideable'=> false);
|
||||
$caseColumns[] = array( 'header' => G::LoadTranslation('ID_TASK'), 'dataIndex' => 'APP_TAS_TITLE', 'width' => 120 );
|
||||
$caseColumns[] = array( 'header' => G::LoadTranslation('ID_PROCESS'), 'dataIndex' => 'APP_PRO_TITLE', 'width' => 120 );
|
||||
$caseColumns[] = array( 'header' => G::LoadTranslation('ID_SENT_BY'), 'dataIndex' => 'APP_DEL_PREVIOUS_USER', 'width' => 120 );
|
||||
//$caseColumns[] = array( 'header' => G::LoadTranslation('ID_SENT_BY'), 'dataIndex' => 'APP_DEL_PREVIOUS_USER', 'width' => 120 );
|
||||
$caseColumns[] = array( 'header' => G::LoadTranslation('ID_CURRENT_USER'), 'dataIndex' => 'APP_CURRENT_USER', 'width' => 120 );
|
||||
$caseColumns[] = array( 'header' => G::LoadTranslation('ID_LAST_MODIFY'), 'dataIndex' => 'APP_UPDATE_DATE', 'width' => 80 );
|
||||
$caseColumns[] = array( 'header' => G::LoadTranslation('ID_DELEGATION_DATE'),'dataIndex' => 'DEL_DELEGATE_DATE', 'width' => 80 );
|
||||
|
||||
@@ -328,14 +328,14 @@
|
||||
if( isset($aRow['DEL_PRIORITY']) ){
|
||||
$aRow['DEL_PRIORITY'] = G::LoadTranslation("ID_PRIORITY_{$aPriorities[$aRow['DEL_PRIORITY']]}");
|
||||
}
|
||||
|
||||
|
||||
/* For participated cases, we want the last step in the case, not only
|
||||
* the last step this user participated. To do that we get every case
|
||||
* information again for the last step. (This could be solved by a subquery,
|
||||
* but Propel might not support it and subqueries can be slower for larger
|
||||
* datasets).
|
||||
*/
|
||||
if ($action == 'sent') {
|
||||
if ($action == 'sent' || $action == 'search') {
|
||||
$maxCriteria = new Criteria('workflow');
|
||||
$maxCriteria->add(AppCacheViewPeer::APP_UID, $aRow['APP_UID'], Criteria::EQUAL);
|
||||
$maxCriteria->addDescendingOrderByColumn(AppCacheViewPeer::DEL_INDEX);
|
||||
@@ -354,6 +354,9 @@
|
||||
$maxDataset->close();
|
||||
}
|
||||
|
||||
if (!isset($aRow['APP_CURRENT_USER']))
|
||||
$aRow['APP_CURRENT_USER'] = "[Unassigned]";
|
||||
|
||||
$rows[] = $aRow;
|
||||
$oDataset->next();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user