Merge pull request #1885 from hector-cortez/BUG-10852

BUG 10852  Control de los reenvíos de la notificaciones a través del historial de mensajes SOLVED
This commit is contained in:
julceslauhub
2013-07-12 10:39:33 -07:00

View File

@@ -5258,6 +5258,34 @@ class Cases
$oDataset->next();
}
$RESULT['CASES_NOTES'] = 1;
// Message History
$RESULT['MSGS_HISTORY'] = array('PERMISSION' => $ACTION);
$delIndex = array();
$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);
}
}
$oCriteria->add(AppDelegationPeer::USR_UID, $USER);
$oDataset = AppDelegationPeer::doSelectRS($oCriteria);
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$oDataset->next();
while ($aRow = $oDataset->getRow()) {
if ($TASK_SOURCE == $aRow['TAS_UID']) {
$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');