@@ -963,10 +963,9 @@ class Cases
|
|||||||
if (isset($Fields['CURRENT_USER_UID'])) {
|
if (isset($Fields['CURRENT_USER_UID'])) {
|
||||||
$Fields['USR_UID'] = $Fields['CURRENT_USER_UID'];
|
$Fields['USR_UID'] = $Fields['CURRENT_USER_UID'];
|
||||||
}
|
}
|
||||||
/*----------------------------------********---------------------------------*/
|
//Will be update the status in the list Participated
|
||||||
$completed = new ListCompleted();
|
$listParticipatedLast = new ListParticipatedLast();
|
||||||
$completed->create(array_merge($Fields, $newTitleOrDescription));
|
$listParticipatedLast->refreshStatus($Fields['APP_UID'], 'COMPLETED');
|
||||||
/*----------------------------------********---------------------------------*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Update case*/
|
/** Update case*/
|
||||||
@@ -1138,9 +1137,6 @@ class Cases
|
|||||||
$oCriteria->add(ListParticipatedHistoryPeer::APP_UID, $sAppUid);
|
$oCriteria->add(ListParticipatedHistoryPeer::APP_UID, $sAppUid);
|
||||||
ListParticipatedHistoryPeer::doDelete($oCriteria);
|
ListParticipatedHistoryPeer::doDelete($oCriteria);
|
||||||
$oCriteria = new Criteria('workflow');
|
$oCriteria = new Criteria('workflow');
|
||||||
$oCriteria->add(ListCompletedPeer::APP_UID, $sAppUid);
|
|
||||||
ListCompletedPeer::doDelete($oCriteria);
|
|
||||||
$oCriteria = new Criteria('workflow');
|
|
||||||
$oCriteria->add(ListUnassignedPeer::APP_UID, $sAppUid);
|
$oCriteria->add(ListUnassignedPeer::APP_UID, $sAppUid);
|
||||||
ListUnassignedPeer::doDelete($oCriteria);
|
ListUnassignedPeer::doDelete($oCriteria);
|
||||||
/*----------------------------------********---------------------------------*/
|
/*----------------------------------********---------------------------------*/
|
||||||
|
|||||||
@@ -2398,7 +2398,7 @@ class WorkspaceTools
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$arrayTable1 = ['ListInbox', 'ListMyInbox', 'ListCanceled', 'ListParticipatedLast', 'ListParticipatedHistory', 'ListPaused', 'ListCompleted'];
|
$arrayTable1 = ['ListInbox', 'ListMyInbox', 'ListCanceled', 'ListParticipatedLast', 'ListParticipatedHistory', 'ListPaused'];
|
||||||
$arrayTable2 = ['ListUnassigned', 'ListUnassignedGroup'];
|
$arrayTable2 = ['ListUnassigned', 'ListUnassignedGroup'];
|
||||||
$arrayTable = array_merge($arrayTable1, $arrayTable2);
|
$arrayTable = array_merge($arrayTable1, $arrayTable2);
|
||||||
|
|
||||||
@@ -2424,7 +2424,6 @@ class WorkspaceTools
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($flagReinsert || !$flagListAll) {
|
if ($flagReinsert || !$flagListAll) {
|
||||||
$this->regenerateListCompleted($lang);
|
|
||||||
$this->regenerateListCanceled($lang);
|
$this->regenerateListCanceled($lang);
|
||||||
$this->regenerateListMyInbox(); //This list require no translation
|
$this->regenerateListMyInbox(); //This list require no translation
|
||||||
$this->regenerateListInbox(); //This list require no translation
|
$this->regenerateListInbox(); //This list require no translation
|
||||||
@@ -2509,69 +2508,6 @@ class WorkspaceTools
|
|||||||
CLI::logging("> Completed table LIST_CANCELED\n");
|
CLI::logging("> Completed table LIST_CANCELED\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
public function regenerateListCompleted($lang = 'en')
|
|
||||||
{
|
|
||||||
$this->initPropel(true);
|
|
||||||
$query = 'INSERT INTO ' . $this->dbName . '.LIST_COMPLETED
|
|
||||||
(APP_UID,
|
|
||||||
USR_UID,
|
|
||||||
TAS_UID,
|
|
||||||
PRO_UID,
|
|
||||||
APP_NUMBER,
|
|
||||||
APP_TITLE,
|
|
||||||
APP_PRO_TITLE,
|
|
||||||
APP_TAS_TITLE,
|
|
||||||
APP_CREATE_DATE,
|
|
||||||
APP_FINISH_DATE,
|
|
||||||
DEL_INDEX,
|
|
||||||
DEL_PREVIOUS_USR_UID,
|
|
||||||
DEL_CURRENT_USR_USERNAME,
|
|
||||||
DEL_CURRENT_USR_FIRSTNAME,
|
|
||||||
DEL_CURRENT_USR_LASTNAME)
|
|
||||||
|
|
||||||
SELECT
|
|
||||||
ACV.APP_UID,
|
|
||||||
ACV.USR_UID,
|
|
||||||
ACV.TAS_UID,
|
|
||||||
ACV.PRO_UID,
|
|
||||||
ACV.APP_NUMBER,
|
|
||||||
C_APP.CON_VALUE AS APP_TITLE,
|
|
||||||
C_PRO.CON_VALUE AS APP_PRO_TITLE,
|
|
||||||
C_TAS.CON_VALUE AS APP_TAS_TITLE,
|
|
||||||
ACV.APP_CREATE_DATE,
|
|
||||||
ACV.APP_FINISH_DATE,
|
|
||||||
ACV.DEL_INDEX,
|
|
||||||
PREV_AD.USR_UID AS DEL_PREVIOUS_USR_UID,
|
|
||||||
USR.USR_USERNAME AS DEL_CURRENT_USR_USERNAME,
|
|
||||||
USR.USR_FIRSTNAME AS DEL_CURRENT_USR_FIRSTNAME,
|
|
||||||
USR.USR_LASTNAME AS DEL_CURRENT_USR_LASTNAME
|
|
||||||
FROM
|
|
||||||
(' . $this->dbName . '.APP_CACHE_VIEW ACV
|
|
||||||
LEFT JOIN ' . $this->dbName . '.CONTENT C_APP ON ACV.APP_UID = C_APP.CON_ID
|
|
||||||
AND C_APP.CON_CATEGORY = \'APP_TITLE\'
|
|
||||||
AND C_APP.CON_LANG = \'' . $lang . '\'
|
|
||||||
LEFT JOIN ' . $this->dbName . '.CONTENT C_PRO ON ACV.PRO_UID = C_PRO.CON_ID
|
|
||||||
AND C_PRO.CON_CATEGORY = \'PRO_TITLE\'
|
|
||||||
AND C_PRO.CON_LANG = \'' . $lang . '\'
|
|
||||||
LEFT JOIN ' . $this->dbName . '.CONTENT C_TAS ON ACV.TAS_UID = C_TAS.CON_ID
|
|
||||||
AND C_TAS.CON_CATEGORY = \'TAS_TITLE\'
|
|
||||||
AND C_TAS.CON_LANG = \'' . $lang . '\')
|
|
||||||
LEFT JOIN
|
|
||||||
(' . $this->dbName . '.APP_DELEGATION AD
|
|
||||||
INNER JOIN ' . $this->dbName . '.APP_DELEGATION PREV_AD ON AD.APP_UID = PREV_AD.APP_UID
|
|
||||||
AND AD.DEL_PREVIOUS = PREV_AD.DEL_INDEX) ON ACV.APP_UID = AD.APP_UID
|
|
||||||
AND ACV.DEL_INDEX = AD.DEL_INDEX
|
|
||||||
LEFT JOIN
|
|
||||||
' . $this->dbName . '.USERS USR ON ACV.USR_UID = USR.USR_UID
|
|
||||||
WHERE
|
|
||||||
ACV.APP_STATUS = \'COMPLETED\'
|
|
||||||
AND ACV.DEL_LAST_INDEX = 1';
|
|
||||||
$con = Propel::getConnection("workflow");
|
|
||||||
$stmt = $con->createStatement();
|
|
||||||
$stmt->executeQuery($query);
|
|
||||||
CLI::logging("> Completed table LIST_COMPLETED\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
public function regenerateListMyInbox()
|
public function regenerateListMyInbox()
|
||||||
{
|
{
|
||||||
$this->initPropel(true);
|
$this->initPropel(true);
|
||||||
|
|||||||
@@ -13,8 +13,8 @@ require_once 'classes/model/om/BaseListCompleted.php';
|
|||||||
* long as it does not already exist in the output directory.
|
* long as it does not already exist in the output directory.
|
||||||
*
|
*
|
||||||
* @package classes.model
|
* @package classes.model
|
||||||
|
* @deprecated Method deprecated in Release 3.3.9
|
||||||
*/
|
*/
|
||||||
// @codingStandardsIgnoreStart
|
|
||||||
class ListCompleted extends BaseListCompleted implements ListInterface
|
class ListCompleted extends BaseListCompleted implements ListInterface
|
||||||
{
|
{
|
||||||
use ListBaseTrait;
|
use ListBaseTrait;
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
require_once 'classes/model/om/BaseListParticipatedLast.php';
|
require_once 'classes/model/om/BaseListParticipatedLast.php';
|
||||||
|
|
||||||
use ProcessMaker\BusinessModel\Cases as BmCases;
|
use ProcessMaker\BusinessModel\Cases as BmCases;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -536,4 +537,25 @@ class ListParticipatedLast extends BaseListParticipatedLast implements ListInter
|
|||||||
}
|
}
|
||||||
BasePeer::doUpdate($criteriaWhere, $criteriaSet, $con);
|
BasePeer::doUpdate($criteriaWhere, $criteriaSet, $con);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update the column APP_STATUS
|
||||||
|
*
|
||||||
|
* @param string $appUid
|
||||||
|
* @param string $status, can be [TO_DO, COMPLETED, etc]
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*
|
||||||
|
* @see Cases::updateCase()
|
||||||
|
*/
|
||||||
|
public function refreshStatus($appUid, $status = 'TO_DO')
|
||||||
|
{
|
||||||
|
//Update - WHERE
|
||||||
|
$criteriaWhere = new Criteria("workflow");
|
||||||
|
$criteriaWhere->add(ListParticipatedLastPeer::APP_UID, $appUid, Criteria::EQUAL);
|
||||||
|
//Update - SET
|
||||||
|
$criteriaSet = new Criteria("workflow");
|
||||||
|
$criteriaSet->add(ListParticipatedLastPeer::APP_STATUS, $status);
|
||||||
|
BasePeer::doUpdate($criteriaWhere, $criteriaSet, Propel::getConnection("workflow"));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user