Merged in bugfix/PMC-601 (pull request #6835)

PMC-601
This commit is contained in:
Paula Quispe
2019-04-10 19:02:00 +00:00
committed by Mauricio Veliz
4 changed files with 27 additions and 73 deletions

View File

@@ -13,8 +13,8 @@ require_once 'classes/model/om/BaseListCompleted.php';
* long as it does not already exist in the output directory.
*
* @package classes.model
* @deprecated Method deprecated in Release 3.3.9
*/
// @codingStandardsIgnoreStart
class ListCompleted extends BaseListCompleted implements ListInterface
{
use ListBaseTrait;

View File

@@ -1,6 +1,7 @@
<?php
require_once 'classes/model/om/BaseListParticipatedLast.php';
use ProcessMaker\BusinessModel\Cases as BmCases;
/**
@@ -536,4 +537,25 @@ class ListParticipatedLast extends BaseListParticipatedLast implements ListInter
}
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"));
}
}