Merge remote-tracking branch 'origin/release/3.3.9' into bugfix/PMC-580
This commit is contained in:
@@ -64,6 +64,12 @@ class AppAssignSelfServiceValue extends BaseAppAssignSelfServiceValue
|
||||
*
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*
|
||||
* @see \Cases->removeCase()
|
||||
* @see \Cases->setCatchUser()
|
||||
* @see \Cases->updateCase()
|
||||
*
|
||||
* @link https://wiki.processmaker.com/3.2/Tasks#Self_Service_Value_Based_Assignment
|
||||
*/
|
||||
public function remove($applicationUid, $delIndex = 0)
|
||||
{
|
||||
@@ -76,18 +82,7 @@ class AppAssignSelfServiceValue extends BaseAppAssignSelfServiceValue
|
||||
$criteria->add(AppAssignSelfServiceValuePeer::DEL_INDEX, $delIndex, Criteria::EQUAL);
|
||||
}
|
||||
|
||||
$result = AppAssignSelfServiceValuePeer::doDelete($criteria);
|
||||
|
||||
// Delete related rows and missing relations, criteria don't execute delete with joins
|
||||
$cnn = Propel::getConnection(AppAssignSelfServiceValueGroupPeer::DATABASE_NAME);
|
||||
$cnn->begin();
|
||||
$stmt = $cnn->createStatement();
|
||||
$rs = $stmt->executeQuery("DELETE " . AppAssignSelfServiceValueGroupPeer::TABLE_NAME . "
|
||||
FROM " . AppAssignSelfServiceValueGroupPeer::TABLE_NAME . "
|
||||
LEFT JOIN " . AppAssignSelfServiceValuePeer::TABLE_NAME . "
|
||||
ON (" . AppAssignSelfServiceValueGroupPeer::ID . " = " . AppAssignSelfServiceValuePeer::ID . ")
|
||||
WHERE " . AppAssignSelfServiceValuePeer::ID . " IS NULL");
|
||||
$cnn->commit();
|
||||
AppAssignSelfServiceValuePeer::doDelete($criteria);
|
||||
} catch (Exception $e) {
|
||||
throw $e;
|
||||
}
|
||||
|
||||
@@ -160,7 +160,7 @@ class AppMessage extends BaseAppMessage
|
||||
* @param string $appMsgTemplate,
|
||||
* @param string $appMsgAttach,
|
||||
* @param string $appMsgStatus,
|
||||
* @param string $appMsgShowMsg,
|
||||
* @param integer $appMsgShowMsg,
|
||||
* @param string $appMsgError,
|
||||
* @param boolean $contentTypeIsHtml
|
||||
* @param integer $appNumber,
|
||||
@@ -183,7 +183,7 @@ class AppMessage extends BaseAppMessage
|
||||
$appMsgTemplate = '',
|
||||
$appMsgAttach = '',
|
||||
$appMsgStatus = 'pending',
|
||||
$appMsgShowMsg = '',
|
||||
$appMsgShowMsg = 1,
|
||||
$appMsgError = '',
|
||||
$contentTypeIsHtml = true,
|
||||
$appNumber = 0,
|
||||
|
||||
@@ -238,7 +238,7 @@ class AppNotes extends BaseAppNotes
|
||||
'',
|
||||
'',
|
||||
'pending',
|
||||
'',
|
||||
1,
|
||||
$msgError,
|
||||
true,
|
||||
(isset($fieldCase['APP_NUMBER'])) ? $fieldCase['APP_NUMBER'] : 0,
|
||||
|
||||
@@ -223,14 +223,8 @@ class Dynaform extends BaseDynaform
|
||||
$description = "Create from a PM Table: " . $addTabName . ", ";
|
||||
}
|
||||
G::auditLog("CreateDynaform", $description . "Dynaform Title: " . $aData['DYN_TITLE'] . ", Type: " . $aData['DYN_TYPE'] . ", Description: " . $aData['DYN_DESCRIPTION'] . ", Mode: " . $mode);
|
||||
|
||||
$sXml = '<?xml version="1.0" encoding="UTF-8"?>' . "\n";
|
||||
$sXml .= '<dynaForm type="' . $this->getDynType() . '" name="' . $this->getProUid() . '/' . $this->getDynUid() . '" width="500" enabletemplate="0" mode="" nextstepsave="prompt">' . "\n";
|
||||
$sXml .= '</dynaForm>';
|
||||
G::verifyPath(PATH_DYNAFORM . $this->getProUid(), true);
|
||||
$oFile = fopen(PATH_DYNAFORM . $this->getProUid() . '/' . $this->getDynUid() . '.xml', 'w');
|
||||
fwrite($oFile, $sXml);
|
||||
fclose($oFile);
|
||||
|
||||
Form::createXMLFile($this->getProUid(), $this->getDynUid(), $this->getDynType(), PATH_DYNAFORM);
|
||||
return $this->getDynUid();
|
||||
} else {
|
||||
$msg = '';
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -333,18 +333,16 @@ class ListUnassigned extends BaseListUnassigned implements ListInterface
|
||||
{
|
||||
try {
|
||||
$arrayAppAssignSelfServiceValueData = [];
|
||||
|
||||
$criteria = new Criteria("workflow");
|
||||
|
||||
$group = new Groups();
|
||||
//Get the GRP_ID related to the $userUid
|
||||
$arrayId = $group->getActiveGroupsForAnUserById($userUid);
|
||||
|
||||
$sql = "("
|
||||
. AppAssignSelfServiceValueGroupPeer::ASSIGNEE_ID . " IN ("
|
||||
. " SELECT " . GroupUserPeer::GRP_ID . " "
|
||||
. " FROM " . GroupUserPeer::TABLE_NAME . " "
|
||||
. " LEFT JOIN " . GroupwfPeer::TABLE_NAME . " ON (" . GroupUserPeer::GRP_ID . "=" . GroupwfPeer::GRP_ID . ") "
|
||||
. " WHERE " . GroupUserPeer::USR_UID . "='" . $userUid . "' AND " . GroupwfPeer::GRP_STATUS . "='ACTIVE'"
|
||||
. " ) AND "
|
||||
. " " . AppAssignSelfServiceValueGroupPeer::ASSIGNEE_TYPE . "=2 "
|
||||
. ")";
|
||||
. AppAssignSelfServiceValueGroupPeer::ASSIGNEE_ID . " IN (" . implode(",", $arrayId) . ") AND "
|
||||
. " " . AppAssignSelfServiceValueGroupPeer::ASSIGNEE_TYPE . " = 2 "
|
||||
. ")";
|
||||
|
||||
$criteria->setDistinct();
|
||||
$criteria->addSelectColumn(AppAssignSelfServiceValuePeer::APP_UID);
|
||||
|
||||
Reference in New Issue
Block a user