Merged in bugfix/PMCORE-2635 (pull request #7678)

PMCORE-2635

Approved-by: Julio Cesar Laura Avendaño <contact@julio-laura.com>
This commit is contained in:
Andrea Adamczyk
2020-12-22 23:33:29 +00:00
committed by Julio Cesar Laura Avendaño
2 changed files with 12 additions and 4 deletions

View File

@@ -798,7 +798,7 @@ class Cases
} }
// Update case title // Update case title
if (!empty($appUid) && !empty($appFields['APP_NUMBER']) && !empty($appFields['DEL_INDEX'])) { if (!empty($appUid) && !empty($appFields['APP_NUMBER']) && $appFields['APP_NUMBER'] > 0 && !empty($appFields['DEL_INDEX'])) {
$this->updateThreadTitle($appUid, $appFields['APP_NUMBER'], $appFields['DEL_INDEX'], $appFields['APP_DATA']); $this->updateThreadTitle($appUid, $appFields['APP_NUMBER'], $appFields['DEL_INDEX'], $appFields['APP_DATA']);
} }
@@ -903,7 +903,7 @@ class Cases
$this->appSolr->updateApplicationSearchIndex($appUid); $this->appSolr->updateApplicationSearchIndex($appUid);
} }
if ($Fields["APP_STATUS"] == "COMPLETED") { if (isset($Fields["APP_STATUS"]) && $Fields["APP_STATUS"] == "COMPLETED") {
//Delete records of the table APP_ASSIGN_SELF_SERVICE_VALUE //Delete records of the table APP_ASSIGN_SELF_SERVICE_VALUE
$appAssignSelfServiceValue = new AppAssignSelfServiceValue(); $appAssignSelfServiceValue = new AppAssignSelfServiceValue();
$appAssignSelfServiceValue->remove($appUid); $appAssignSelfServiceValue->remove($appUid);
@@ -1650,7 +1650,11 @@ class Cases
$user = UsersPeer::retrieveByPK($usrUid); $user = UsersPeer::retrieveByPK($usrUid);
// Create new delegation // Create new delegation
$delegation = new AppDelegation(); $delegation = new AppDelegation();
$delegation->setDelTitle($threadTitle); if ($appNumber > 0) {
$delegation->setDelTitle($threadTitle);
} else {
$delegation->setDelTitle("");
}
$result = $delegation->createAppDelegation( $result = $delegation->createAppDelegation(
$proUid, $proUid,
$appUid, $appUid,

View File

@@ -1829,7 +1829,11 @@ class Delegation extends Model
// If is empty get the previous title // If is empty get the previous title
if ($delIndexPrevious > 0) { if ($delIndexPrevious > 0) {
$thread = self::getThreadInfo($appNumber, $delIndexPrevious); $thread = self::getThreadInfo($appNumber, $delIndexPrevious);
$threadTitle = $thread['DEL_TITLE']; if(empty($thread['DEL_TITLE'])) {
$threadTitle = '# '. $appNumber;
} else {
$threadTitle = $thread['DEL_TITLE'];
}
} else { } else {
$threadTitle = '# '. $appNumber; $threadTitle = '# '. $appNumber;
} }