From 57cda8f9d6db19a9b91033e438ed8d2d8490cf4f Mon Sep 17 00:00:00 2001 From: Paula Quispe Date: Mon, 29 Mar 2021 09:34:36 -0400 Subject: [PATCH] PMCORE-1880 --- workflow/engine/classes/Cases.php | 8 ++++---- .../methods/cases/casesHistoryDynaformPage_Ajax.php | 2 +- workflow/engine/src/ProcessMaker/BusinessModel/Cases.php | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/workflow/engine/classes/Cases.php b/workflow/engine/classes/Cases.php index e476d0b64..4bef606e8 100644 --- a/workflow/engine/classes/Cases.php +++ b/workflow/engine/classes/Cases.php @@ -5876,11 +5876,11 @@ class Cases $opObjUid = $row['OP_OBJ_UID']; $obCaseStatus = $row['OP_CASE_STATUS']; - //The values of obCaseStatus is [ALL, COMPLETED, DRAFT, TO_DO, PAUSED] - //If the case is todo and we need the participate - //but we did not participated did not validate nothing and return array empty + // The values of obCaseStatus is [ALL, COMPLETED, DRAFT, TO_DO, PAUSED] + // If the case is todo and we need the participate + // but we did not participated did not validate nothing and return array empty $swParticipate = false; // must be false for default - if ($obCaseStatus != 'COMPLETED' && $opParticipated == 1) { + if ($opParticipated === 1) { $criteria = new Criteria('workflow'); $criteria->add(AppDelegationPeer::USR_UID, $usrUid); $criteria->add(AppDelegationPeer::APP_UID, $appUid); diff --git a/workflow/engine/methods/cases/casesHistoryDynaformPage_Ajax.php b/workflow/engine/methods/cases/casesHistoryDynaformPage_Ajax.php index 431102ce9..0fa2876fd 100644 --- a/workflow/engine/methods/cases/casesHistoryDynaformPage_Ajax.php +++ b/workflow/engine/methods/cases/casesHistoryDynaformPage_Ajax.php @@ -48,7 +48,7 @@ if ($actionAjax == 'historyDynaformGrid_Ajax') { $c = $oCase->getallDynaformsCriteria( $_SESSION['PROCESS'], $_SESSION['APPLICATION'], - $_SESSION['CURRENT_TASK'], + $_SESSION['TASK'], $_SESSION['USER_LOGGED'], $_SESSION['INDEX'] ); diff --git a/workflow/engine/src/ProcessMaker/BusinessModel/Cases.php b/workflow/engine/src/ProcessMaker/BusinessModel/Cases.php index d01e9de2e..7390dab78 100644 --- a/workflow/engine/src/ProcessMaker/BusinessModel/Cases.php +++ b/workflow/engine/src/ProcessMaker/BusinessModel/Cases.php @@ -4275,7 +4275,7 @@ class Cases $query->where('APPLICATION.APP_UID', '=', $appUid); // Filter by source task - if ($caseStatus != 'COMPLETED' && $sourceTask != '' && (int)$sourceTask != 0) { + if (!empty($sourceTask) && (int)$sourceTask != 0) { $query->where('STEP.TAS_UID', '=', $sourceTask); }