This commit is contained in:
Paula Quispe
2019-04-09 16:26:16 -04:00
parent 96d823820c
commit 4bdb500b00
2 changed files with 45 additions and 9 deletions

View File

@@ -333,18 +333,16 @@ class ListUnassigned extends BaseListUnassigned implements ListInterface
{
try {
$arrayAppAssignSelfServiceValueData = [];
$criteria = new Criteria("workflow");
$group = new Groups();
//Get the GRP_ID related to the $userUid
$arrayId = $group->getActiveGroupsForAnUserById($userUid);
$sql = "("
. AppAssignSelfServiceValueGroupPeer::ASSIGNEE_ID . " IN ("
. " SELECT " . GroupUserPeer::GRP_ID . " "
. " FROM " . GroupUserPeer::TABLE_NAME . " "
. " LEFT JOIN " . GroupwfPeer::TABLE_NAME . " ON (" . GroupUserPeer::GRP_ID . "=" . GroupwfPeer::GRP_ID . ") "
. " WHERE " . GroupUserPeer::USR_UID . "='" . $userUid . "' AND " . GroupwfPeer::GRP_STATUS . "='ACTIVE'"
. " ) AND "
. " " . AppAssignSelfServiceValueGroupPeer::ASSIGNEE_TYPE . "=2 "
. ")";
. AppAssignSelfServiceValueGroupPeer::ASSIGNEE_ID . " IN (" . implode(",", $arrayId) . ") AND "
. " " . AppAssignSelfServiceValueGroupPeer::ASSIGNEE_TYPE . " = 2 "
. ")";
$criteria->setDistinct();
$criteria->addSelectColumn(AppAssignSelfServiceValuePeer::APP_UID);