BUG-12710 Message history does not display the sent emaiL... IMPROVEMENT
- Habia una doble validacion para el caso del message history, por esa causa no se visualizan los mensajes. - Se quita la doble validacion en la class.case.php.
This commit is contained in:
@@ -5433,45 +5433,43 @@ class Cases
|
||||
// Permission
|
||||
$RESULT['MSGS_HISTORY'] = array('PERMISSION' => $ACTION);
|
||||
$delIndex = array();
|
||||
if ($TASK_SOURCE != "" && (int)$TASK_SOURCE != 0) {
|
||||
$oCriteria = new Criteria('workflow');
|
||||
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 = new Criteria('workflow');
|
||||
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);
|
||||
}
|
||||
}
|
||||
$RESULT['MSGS_HISTORY'] = array_merge(array('DEL_INDEX' => $delIndex), $RESULT['MSGS_HISTORY']);
|
||||
$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();
|
||||
}
|
||||
}
|
||||
$RESULT['MSGS_HISTORY'] = array_merge(array('DEL_INDEX' => $delIndex), $RESULT['MSGS_HISTORY']);
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user