Skip to content

Commit cc8daee

Browse files
committed
Add a test on the $userIdSource to filter when task is "to be claimed"
Fixed a typo on $rows that should be $aRow Changed version to 3.3.0-community-RE-1.6
1 parent 69d6e49 commit cc8daee

File tree

2 files changed

+19
-17
lines changed

2 files changed

+19
-17
lines changed

workflow/engine/classes/WsBase.php

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2799,30 +2799,32 @@ public function reassignCase($sessionId, $caseId, $delIndex, $userIdSource, $use
27992799
return $result;
28002800
}
28012801

2802-
/**
2803-
* ****************( 1 )*****************
2804-
*/
2805-
$oCriteria = new Criteria('workflow');
2806-
$oCriteria->add(UsersPeer::USR_STATUS, 'ACTIVE');
2807-
$oCriteria->add(UsersPeer::USR_UID, $userIdSource);
2808-
$oDataset = UsersPeer::doSelectRS($oCriteria);
2809-
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
2810-
$oDataset->next();
2811-
$aRow = $oDataset->getRow();
2802+
if ($userIdSource !== '') { // $userIdSource === '' when task is "to be claimed"
2803+
/**
2804+
* ****************( 1 )*****************
2805+
*/
2806+
$oCriteria = new Criteria('workflow');
2807+
$oCriteria->add(UsersPeer::USR_STATUS, 'ACTIVE');
2808+
$oCriteria->add(UsersPeer::USR_UID, $userIdSource);
2809+
$oDataset = UsersPeer::doSelectRS($oCriteria);
2810+
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
2811+
$oDataset->next();
2812+
$aRow = $oDataset->getRow();
28122813

2813-
if (!is_array($aRow)) {
2814-
$result = new WsResponse(31, G::loadTranslation('ID_INVALID_ORIGIN_USER'));
2814+
if (!is_array($aRow)) {
2815+
$result = new WsResponse(31, G::loadTranslation('ID_INVALID_ORIGIN_USER'));
28152816

2816-
$g->sessionVarRestore();
2817+
$g->sessionVarRestore();
28172818

2818-
return $result;
2819+
return $result;
2820+
}
28192821
}
28202822

28212823
/**
28222824
* ****************( 2 )*****************
28232825
*/
28242826
$oCase = new Cases();
2825-
$rows = $oCase->loadCase($caseId);
2827+
$aRow = $oCase->loadCase($caseId);
28262828

28272829
if (!is_array($aRow)) {
28282830
$result = new WsResponse(32, G::loadTranslation('ID_CASE_NOT_OPEN'));
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
<?php
2-
define("PM_VERSION", "3.3.0-community-RE-1.5");
3-
define("PM_BUILD_VERSION", "3.3.0-community-RE-1.5");
2+
define("PM_VERSION", "3.3.0-community-RE-1.6");
3+
define("PM_BUILD_VERSION", "3.3.0-community-RE-1.6");

0 commit comments

Comments
 (0)