Skip to content

Commit

Permalink
Add a test on the $userIdSource to filter when task is "to be claimed"
Browse files Browse the repository at this point in the history
Fixed a typo on $rows that should be $aRow
Changed version to 3.3.0-community-RE-1.6
  • Loading branch information
tomolimo committed Jul 31, 2019
1 parent 69d6e49 commit cc8daee
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 17 deletions.
32 changes: 17 additions & 15 deletions workflow/engine/classes/WsBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -2799,30 +2799,32 @@ public function reassignCase($sessionId, $caseId, $delIndex, $userIdSource, $use
return $result;
}

/**
* ****************( 1 )*****************
*/
$oCriteria = new Criteria('workflow');
$oCriteria->add(UsersPeer::USR_STATUS, 'ACTIVE');
$oCriteria->add(UsersPeer::USR_UID, $userIdSource);
$oDataset = UsersPeer::doSelectRS($oCriteria);
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$oDataset->next();
$aRow = $oDataset->getRow();
if ($userIdSource !== '') { // $userIdSource === '' when task is "to be claimed"
/**
* ****************( 1 )*****************
*/
$oCriteria = new Criteria('workflow');
$oCriteria->add(UsersPeer::USR_STATUS, 'ACTIVE');
$oCriteria->add(UsersPeer::USR_UID, $userIdSource);
$oDataset = UsersPeer::doSelectRS($oCriteria);
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$oDataset->next();
$aRow = $oDataset->getRow();

if (!is_array($aRow)) {
$result = new WsResponse(31, G::loadTranslation('ID_INVALID_ORIGIN_USER'));
if (!is_array($aRow)) {
$result = new WsResponse(31, G::loadTranslation('ID_INVALID_ORIGIN_USER'));

$g->sessionVarRestore();
$g->sessionVarRestore();

return $result;
return $result;
}
}

/**
* ****************( 2 )*****************
*/
$oCase = new Cases();
$rows = $oCase->loadCase($caseId);
$aRow = $oCase->loadCase($caseId);

if (!is_array($aRow)) {
$result = new WsResponse(32, G::loadTranslation('ID_CASE_NOT_OPEN'));
Expand Down
4 changes: 2 additions & 2 deletions workflow/engine/methods/login/version-pmos.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<?php
define("PM_VERSION", "3.3.0-community-RE-1.5");
define("PM_BUILD_VERSION", "3.3.0-community-RE-1.5");
define("PM_VERSION", "3.3.0-community-RE-1.6");
define("PM_BUILD_VERSION", "3.3.0-community-RE-1.6");

0 comments on commit cc8daee

Please sign in to comment.