BUG 15243 "Email Notification from Subprocess" SOLVED
- Email Notification from Subprocess. - Problema resuelto, cuando se tiene un subproceso que tiene notificacion en la ultima tarea y este debe retornar al proceso principal, entonces la notificacion se enviara al usuario del proceso principal.
This commit is contained in:
@@ -3970,7 +3970,7 @@ class Cases
|
|||||||
if (SubApplicationPeer::doCount($oCriteria2) > 0) {
|
if (SubApplicationPeer::doCount($oCriteria2) > 0) {
|
||||||
G::LoadClass('derivation');
|
G::LoadClass('derivation');
|
||||||
$oDerivation = new Derivation();
|
$oDerivation = new Derivation();
|
||||||
$oDerivation->verifyIsCaseChild($sApplicationUID);
|
$oDerivation->verifyIsCaseChild($sApplicationUID, $iIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
//update searchindex
|
//update searchindex
|
||||||
|
|||||||
@@ -854,24 +854,26 @@ class Derivation
|
|||||||
);
|
);
|
||||||
$this->derivate( $currentDelegation2, $nextDelegations2 );
|
$this->derivate( $currentDelegation2, $nextDelegations2 );
|
||||||
|
|
||||||
// Send notifications - Start
|
if($delIndex > 0 ) {
|
||||||
$oUser = new Users();
|
// Send notifications - Start
|
||||||
|
$oUser = new Users();
|
||||||
|
$aUser = $oUser->load($appFields["CURRENT_USER_UID"]);
|
||||||
|
|
||||||
$aUser = $oUser->load($appFields["APP_DATA"]["USER_LOGGED"]);
|
$sFromName = $aUser["USR_FIRSTNAME"] . " " . $aUser["USR_LASTNAME"] . ($aUser["USR_EMAIL"] != "" ? " <" . $aUser["USR_EMAIL"] . ">" : "");
|
||||||
$sFromName = $aUser["USR_FIRSTNAME"] . " " . $aUser["USR_LASTNAME"] . ($aUser["USR_EMAIL"] != "" ? " <" . $aUser["USR_EMAIL"] . ">" : "");
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$oCase->sendNotifications($appFields["APP_DATA"]["TASK"],
|
$oCase->sendNotifications($appFields["TAS_UID"],
|
||||||
$nextDelegations2,
|
$nextDelegations2,
|
||||||
$appFields["APP_DATA"],
|
$appFields["APP_DATA"],
|
||||||
$sApplicationUID,
|
$sApplicationUID,
|
||||||
$delIndex,
|
$delIndex,
|
||||||
$sFromName);
|
$sFromName);
|
||||||
|
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
G::SendTemporalMessage(G::loadTranslation("ID_NOTIFICATION_ERROR") . " - " . $e->getMessage(), "warning", "string", null, "100%");
|
G::SendTemporalMessage(G::loadTranslation("ID_NOTIFICATION_ERROR") . " - " . $e->getMessage(), "warning", "string", null, "100%");
|
||||||
|
}
|
||||||
|
// Send notifications - End
|
||||||
}
|
}
|
||||||
// Send notifications - End
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user