Merge pull request #2031 from marcoAntonioNina/BUG-12710

BUG-12710 Message history does not display the sent email when... SOLVED
This commit is contained in:
julceslauhub
2013-09-05 08:40:47 -07:00
2 changed files with 70 additions and 38 deletions

View File

@@ -5289,25 +5289,45 @@ class Cases
$delIndex = array();
$oCriteria = new Criteria('workflow');
if ($USER_RELATION == 1) {
//Users
$oCriteria->add(AppDelegationPeer::APP_UID, $APP_UID);
$oCriteria->add(AppDelegationPeer::PRO_UID, $PRO_UID);
if ($aCase['APP_STATUS'] != 'COMPLETED') {
if ($TASK_SOURCE != '' && $TASK_SOURCE != "0" && $TASK_SOURCE != 0) {
$oCriteria->add(AppDelegationPeer::TAS_UID, $TASK_SOURCE);
}
}
$oCriteria->add(AppDelegationPeer::USR_UID, $USER);
$oCriteria->add(AppDelegationPeer::APP_UID, $APP_UID);
$oCriteria->add(AppDelegationPeer::PRO_UID, $PRO_UID);
if ($aCase['APP_STATUS'] != 'COMPLETED') {
if ($TASK_SOURCE != '' && $TASK_SOURCE != "0" && $TASK_SOURCE != 0) {
$oCriteria->add(AppDelegationPeer::TAS_UID, $TASK_SOURCE);
$oDataset = AppDelegationPeer::doSelectRS($oCriteria);
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$oDataset->next();
while ($aRow = $oDataset->getRow()) {
$delIndex[] = $aRow['DEL_INDEX'];
$oDataset->next();
}
} else {
//Groups
$oCriteria->addJoin(GroupUserPeer::USR_UID, AppDelegationPeer::USR_UID, Criteria::LEFT_JOIN);
$oCriteria->add(GroupUserPeer::GRP_UID, $USER);
$oCriteria->add(AppDelegationPeer::APP_UID, $APP_UID);
$oCriteria->add(AppDelegationPeer::PRO_UID, $PRO_UID);
if ($aCase['APP_STATUS'] != 'COMPLETED') {
if ($TASK_SOURCE != '' && $TASK_SOURCE != "0" && $TASK_SOURCE != 0) {
$oCriteria->add(AppDelegationPeer::TAS_UID, $TASK_SOURCE);
}
}
$oDataset = AppDelegationPeer::doSelectRS($oCriteria);
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$oDataset->next();
while ($aRow = $oDataset->getRow()) {
$delIndex[] = $aRow['DEL_INDEX'];
$oDataset->next();
}
}
$oCriteria->add(AppDelegationPeer::USR_UID, $USER);
$oDataset = AppDelegationPeer::doSelectRS($oCriteria);
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$oDataset->next();
while ($aRow = $oDataset->getRow()) {
$delIndex[] = $aRow['DEL_INDEX'];
$oDataset->next();
}
$RESULT['MSGS_HISTORY'] = array_merge(array('DEL_INDEX' => $delIndex), $RESULT['MSGS_HISTORY']);
break;
case 'DYNAFORM':
$oCriteria = new Criteria('workflow');
@@ -5415,25 +5435,41 @@ class Cases
$delIndex = array();
if ($TASK_SOURCE != "" && (int)$TASK_SOURCE != 0) {
$oCriteria = new Criteria('workflow');
$oCriteria->add(AppDelegationPeer::APP_UID, $APP_UID);
$oCriteria->add(AppDelegationPeer::PRO_UID, $PRO_UID);
if ($aCase['APP_STATUS'] != 'COMPLETED') {
if ($TASK_SOURCE != '' && $TASK_SOURCE != "0" && $TASK_SOURCE != 0) {
$oCriteria->add(AppDelegationPeer::TAS_UID, $TASK_SOURCE);
if ($USER_RELATION == 1) {
$oCriteria->add(AppDelegationPeer::APP_UID, $APP_UID);
$oCriteria->add(AppDelegationPeer::PRO_UID, $PRO_UID);
if ($aCase['APP_STATUS'] != 'COMPLETED') {
if ($TASK_SOURCE != '' && $TASK_SOURCE != "0" && $TASK_SOURCE != 0) {
$oCriteria->add(AppDelegationPeer::TAS_UID, $TASK_SOURCE);
}
}
$oCriteria->add(AppDelegationPeer::USR_UID, $USER);
$oDataset = AppDelegationPeer::doSelectRS($oCriteria);
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$oDataset->next();
while ($aRow = $oDataset->getRow()) {
$delIndex[] = $aRow['DEL_INDEX'];
$oDataset->next();
}
} else {
//Groups
$oCriteria->addJoin(GroupUserPeer::USR_UID, AppDelegationPeer::USR_UID, Criteria::LEFT_JOIN);
$oCriteria->add(GroupUserPeer::GRP_UID, $USER);
$oCriteria->add(AppDelegationPeer::APP_UID, $APP_UID);
$oCriteria->add(AppDelegationPeer::PRO_UID, $PRO_UID);
if ($aCase['APP_STATUS'] != 'COMPLETED') {
if ($TASK_SOURCE != '' && $TASK_SOURCE != "0" && $TASK_SOURCE != 0) {
$oCriteria->add(AppDelegationPeer::TAS_UID, $TASK_SOURCE);
}
}
$oDataset = AppDelegationPeer::doSelectRS($oCriteria);
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$oDataset->next();
while ($aRow = $oDataset->getRow()) {
$delIndex[] = $aRow['DEL_INDEX'];
$oDataset->next();
}
}
$oCriteria->add(AppDelegationPeer::USR_UID, $USER);
$oDataset = AppDelegationPeer::doSelectRS($oCriteria);
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$oDataset->next();
while ($aRow = $oDataset->getRow()) {
$delIndex[] = $aRow['DEL_INDEX'];
$oDataset->next();
}
$RESULT['MSGS_HISTORY'] = array_merge(array('DEL_INDEX' => $delIndex), $RESULT['MSGS_HISTORY']);
}
break;

View File

@@ -42,7 +42,6 @@ if ($actionAjax == 'messageHistoryGridList_JXP') {
$appMessageArray = $oCase->getHistoryMessagesTrackerExt( $_SESSION['APPLICATION'], true, $_REQUEST['start'], $_REQUEST['limit']);
$appMessageCountArray = $oCase->getHistoryMessagesTrackerExt( $_SESSION['APPLICATION'], true);
$result = new stdClass();
$aProcesses = Array ();
@@ -61,7 +60,6 @@ if ($actionAjax == 'messageHistoryGridList_JXP') {
if (count($respBlock["MSGS_HISTORY"]) > 0) {
$respMess = $respBlock["MSGS_HISTORY"]["PERMISSION"];
if (isset($respBlock["MSGS_HISTORY"]["DEL_INDEX"])) {
$delIndex = $respBlock["MSGS_HISTORY"]["DEL_INDEX"];
}
@@ -69,7 +67,6 @@ if ($actionAjax == 'messageHistoryGridList_JXP') {
if (count($respView["MSGS_HISTORY"]) > 0) {
$respMess = $respView["MSGS_HISTORY"]["PERMISSION"];
if (isset($respView["MSGS_HISTORY"]["DEL_INDEX"])) {
$delIndex = $respView["MSGS_HISTORY"]["DEL_INDEX"];
}
@@ -77,9 +74,8 @@ if ($actionAjax == 'messageHistoryGridList_JXP') {
if (count($respResend["MSGS_HISTORY"]) > 0) {
$respMess = $respResend["MSGS_HISTORY"]["PERMISSION"];
if (isset($respBlock["MSGS_HISTORY"]["DEL_INDEX"])) {
$delIndex = $respBlock["MSGS_HISTORY"]["DEL_INDEX"];
if (isset($respResend["MSGS_HISTORY"]["DEL_INDEX"])) {
$delIndex = $respResend["MSGS_HISTORY"]["DEL_INDEX"];
}
}