BUG-12710 Message history does not display the sent email when... SOLVED

- No se visualizan los message history aunque se tengan los permisos.
- se hallo una doble validacion y se elimino.
- Se adicion la verificacion por grupos en el message history.
This commit is contained in:
Marco Antonio Nina
2013-09-04 17:02:29 -04:00
parent ab39cc48b0
commit 56920a779d

View File

@@ -5289,7 +5289,7 @@ 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);
@@ -5307,9 +5307,8 @@ class Cases
$delIndex[] = $aRow['DEL_INDEX'];
$oDataset->next();
}
} else {
//Groups
$oCriteria = new Criteria('workflow');
$oCriteria->addJoin(GroupUserPeer::USR_UID, AppDelegationPeer::USR_UID, Criteria::LEFT_JOIN);
$oCriteria->add(GroupUserPeer::GRP_UID, $USER);
$oCriteria->add(AppDelegationPeer::APP_UID, $APP_UID);
@@ -5327,8 +5326,8 @@ class Cases
$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');
@@ -5436,7 +5435,7 @@ class Cases
$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') {
@@ -5445,18 +5444,15 @@ class Cases
}
}
$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 = new Criteria('workflow');
$oCriteria->addJoin(GroupUserPeer::USR_UID, AppDelegationPeer::USR_UID, Criteria::LEFT_JOIN);
$oCriteria->add(GroupUserPeer::GRP_UID, $USER);
$oCriteria->add(AppDelegationPeer::APP_UID, $APP_UID);
@@ -5473,7 +5469,7 @@ class Cases
$delIndex[] = $aRow['DEL_INDEX'];
$oDataset->next();
}
}
$RESULT['MSGS_HISTORY'] = array_merge(array('DEL_INDEX' => $delIndex), $RESULT['MSGS_HISTORY']);
}
break;