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:
Luis Fernando Saisa Lopez
2014-07-03 15:42:28 -04:00
parent a87c3186b9
commit fdbc289b3c
2 changed files with 17 additions and 15 deletions

View File

@@ -3970,7 +3970,7 @@ class Cases
if (SubApplicationPeer::doCount($oCriteria2) > 0) {
G::LoadClass('derivation');
$oDerivation = new Derivation();
$oDerivation->verifyIsCaseChild($sApplicationUID);
$oDerivation->verifyIsCaseChild($sApplicationUID, $iIndex);
}
//update searchindex

View File

@@ -854,24 +854,26 @@ class Derivation
);
$this->derivate( $currentDelegation2, $nextDelegations2 );
// Send notifications - Start
$oUser = new Users();
if($delIndex > 0 ) {
// 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 {
$oCase->sendNotifications($appFields["APP_DATA"]["TASK"],
$nextDelegations2,
$appFields["APP_DATA"],
$sApplicationUID,
$delIndex,
$sFromName);
try {
$oCase->sendNotifications($appFields["TAS_UID"],
$nextDelegations2,
$appFields["APP_DATA"],
$sApplicationUID,
$delIndex,
$sFromName);
} catch (Exception $e) {
G::SendTemporalMessage(G::loadTranslation("ID_NOTIFICATION_ERROR") . " - " . $e->getMessage(), "warning", "string", null, "100%");
} catch (Exception $e) {
G::SendTemporalMessage(G::loadTranslation("ID_NOTIFICATION_ERROR") . " - " . $e->getMessage(), "warning", "string", null, "100%");
}
// Send notifications - End
}
// Send notifications - End
}
}
}