From 8d2f066d3eb3ec1e354e95b0d5d134b7f7c29454 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luciana=20Nu=C3=B1ez?= Date: Wed, 4 Jan 2023 07:40:27 -0400 Subject: [PATCH] PMCORE-4067 --- workflow/engine/templates/steps/triggers_Tree.php | 7 ++++++- workflow/engine/templates/triggers/triggersTree.php | 10 ++++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/workflow/engine/templates/steps/triggers_Tree.php b/workflow/engine/templates/steps/triggers_Tree.php index 3359a2e80..6bd241922 100644 --- a/workflow/engine/templates/steps/triggers_Tree.php +++ b/workflow/engine/templates/steps/triggers_Tree.php @@ -97,7 +97,12 @@ try { $oCriteria = $oProcessMap->getStepTriggersCriteria(-2, $_SESSION['TASK'], 'AFTER'); $iCantidad3 = StepTriggerPeer::doCount($oCriteria); - $oNode = $oTree->addChild('-1', '  [ ' . G::LoadTranslation('ID_ASSIGN_TASK') . ' ] ' . ' - ' . G::LoadTranslation('ID_TRIGGERS'). ' (' . ($iCantidad1 + $iCantidad2 + $iCantidad3) . ')' . '', array('nodeType'=>'parent')); + $step_uid = ""; + if (isset($aRow)) { + $step_uid = $aRow['STEP_UID']; + } + + $oNode = $oTree->addChild('-1', '  [ ' . G::LoadTranslation('ID_ASSIGN_TASK') . ' ] ' . ' - ' . G::LoadTranslation('ID_TRIGGERS'). ' (' . ($iCantidad1 + $iCantidad2 + $iCantidad3) . ')' . '', array('nodeType'=>'parent')); $oNode->contracted = true; $oAux1 = $oNode->addChild('before_node', '' . G::LoadTranslation('ID_BEFORE_ASSIGNMENT') . ' - ' . G::LoadTranslation('ID_TRIGGERS'). ' ('. $iCantidad1 .') ', array('nodeType'=>'parent')); $oAux1->plus = ""; diff --git a/workflow/engine/templates/triggers/triggersTree.php b/workflow/engine/templates/triggers/triggersTree.php index 5c1aab825..093449bcb 100644 --- a/workflow/engine/templates/triggers/triggersTree.php +++ b/workflow/engine/templates/triggers/triggersTree.php @@ -42,7 +42,10 @@ try { foreach ($triggerLibraryO as $keyLibrary => $libraryObj) { $libraryName = $libraryObj->info["name"]; $libraryIcon = (isset($libraryObj->info["icon"]) && ($libraryObj->info["icon"] != "")) ? $libraryObj->info["icon"] : "/images/browse.gif"; - $libraryDescription = trim(str_replace("*", "", implode(" ", $libraryObj->info["description"]))); + $libraryDescription = ""; + if (isset($libraryObj->info["description"])) { + $libraryDescription = trim(str_replace("*", "", implode(" ", $libraryObj->info["description"]))); + } $triggerCount = count($libraryObj->methods); if ($triggerCount > 0) { @@ -58,7 +61,10 @@ try { foreach ($libraryObj->methods as $methodName => $methodObject) { $methodName = $methodObject->info["name"]; $methodLabel = $methodObject->info["label"]; - $methodDescription = trim(str_replace("*", "", implode(" ", $methodObject->info["description"]))); + $methodDescription = ""; + if (isset($libraryObj->info["description"])) { + $methodDescription = trim(str_replace("*", "", implode(" ", $methodObject->info["description"]))); + } $oAux1 = $oNode->addChild($keyLibrary . "-" . $methodName, "
" . $methodLabel . " (" . $methodName . ")
" . $methodDescription . "
", array("nodeType" => "child")); }