diff --git a/workflow/engine/classes/class.case.php b/workflow/engine/classes/class.case.php index 0ee4cde86..aeb185f1d 100755 --- a/workflow/engine/classes/class.case.php +++ b/workflow/engine/classes/class.case.php @@ -5290,6 +5290,7 @@ class Cases $oCriteria = new Criteria('workflow'); + //Users $oCriteria->add(AppDelegationPeer::APP_UID, $APP_UID); $oCriteria->add(AppDelegationPeer::PRO_UID, $PRO_UID); if ($aCase['APP_STATUS'] != 'COMPLETED') { @@ -5299,6 +5300,26 @@ 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(); + } + + //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); + $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(); @@ -5434,6 +5455,25 @@ class Cases $oDataset->next(); } + //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); + $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; diff --git a/workflow/engine/methods/cases/caseMessageHistory_Ajax.php b/workflow/engine/methods/cases/caseMessageHistory_Ajax.php index c5170fb42..ca860287a 100755 --- a/workflow/engine/methods/cases/caseMessageHistory_Ajax.php +++ b/workflow/engine/methods/cases/caseMessageHistory_Ajax.php @@ -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"]; } }