Merged in release/3.8.1 (pull request #8689)
release/3.8.1 Approved-by: Julio Cesar Laura Avendaño
This commit is contained in:
@@ -77,6 +77,7 @@
|
||||
v-if="props.row.USR_UID !== '' && props.row.STATUS !== 'CLOSED' && supervisor && flagSupervising"
|
||||
@click="onClickReassign(props.row)"
|
||||
variant="success"
|
||||
:disabled="props.row.TASK[0].TAS_TYPE === 'MULTIPLE_INSTANCE_VALUE_BASED' || props.row.TASK[0].TAS_TYPE === 'MULTIPLE_INSTANCE'"
|
||||
>
|
||||
<i class="fas fa-exchange-alt"></i>
|
||||
{{ $t("ID_REASSIGN") }}
|
||||
@@ -565,7 +566,8 @@ export default {
|
||||
{
|
||||
TITLE: v.TAS_TITLE,
|
||||
CODE_COLOR: v.TAS_COLOR,
|
||||
COLOR: v.TAS_COLOR_LABEL
|
||||
COLOR: v.TAS_COLOR_LABEL,
|
||||
TAS_TYPE: v.TAS_ASSIGN_TYPE
|
||||
},
|
||||
],
|
||||
THREAD_TITLE: v.DEL_TITLE,
|
||||
|
||||
@@ -2569,6 +2569,12 @@ msgstr "Assign Supervisor Dynaform"
|
||||
msgid "Assign Supervisor Input"
|
||||
msgstr "Assign Supervisor Input"
|
||||
|
||||
# TRANSLATION
|
||||
# LABEL/ID_NO_ASSOCIATED_INPUT_DOCUMENT_DYN
|
||||
#: LABEL/ID_NO_ASSOCIATED_INPUT_DOCUMENT_DYN
|
||||
msgid "There are no associated Input Documents or Dynaforms"
|
||||
msgstr "There are no associated Input Documents or Dynaforms"
|
||||
|
||||
# TRANSLATION
|
||||
# LABEL/ID_ASSIGN_TASK
|
||||
#: LABEL/ID_ASSIGN_TASK
|
||||
|
||||
@@ -61693,6 +61693,7 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE
|
||||
( 'LABEL','ID_USER_INEFFICIENCE','en','Inefficience Cost By User','2015-03-09') ,
|
||||
( 'LABEL','ID_USER_INFORMATION','en','User Information','2014-01-15') ,
|
||||
( 'LABEL','ID_USER_IS_SUPERVISOR_DOES_NOT_ASSOCIATED_INPUT_DOCUMENT','en','The user is supervisor, but it does not have an associated input document','2016-07-06') ,
|
||||
( 'LABEL','ID_NO_ASSOCIATED_INPUT_DOCUMENT_DYN','en','There are no associated Input Documents or Dynaforms','2023-01-12') ,
|
||||
( 'LABEL','ID_USER_LIST','en','User List','2014-01-15') ,
|
||||
( 'LABEL','ID_USER_MUST_CHANGE_PASSWORD_AT_NEXT_LOGON','en','User must change password at next logon','2014-05-16') ,
|
||||
( 'LABEL','ID_USER_NAME','en','User Name','2014-01-15') ,
|
||||
|
||||
@@ -1,27 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* cases_Open.php
|
||||
*
|
||||
* ProcessMaker Open Source Edition
|
||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||
*/
|
||||
/* Permissions */
|
||||
|
||||
use ProcessMaker\BusinessModel\Cases as BusinessModelCases;
|
||||
|
||||
if ($RBAC->userCanAccess('PM_SUPERVISOR') != 1) {
|
||||
switch ($RBAC->userCanAccess('PM_SUPERVISOR')) {
|
||||
@@ -38,7 +17,6 @@ if ($RBAC->userCanAccess( 'PM_SUPERVISOR' ) != 1) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* GET , POST & $_SESSION Vars */
|
||||
if (isset($_SESSION['APPLICATION'])) {
|
||||
unset($_SESSION['APPLICATION']);
|
||||
@@ -52,106 +30,36 @@ if (isset( $_SESSION['INDEX'] )) {
|
||||
if (isset($_SESSION['STEP_POSITION'])) {
|
||||
unset($_SESSION['STEP_POSITION']);
|
||||
}
|
||||
|
||||
/* Process the info */
|
||||
$oCase = new Cases();
|
||||
$sAppUid = $_GET['APP_UID'];
|
||||
$iDelIndex = $_GET['DEL_INDEX'];
|
||||
// Get information
|
||||
$case = new Cases();
|
||||
$appUid = $_GET['APP_UID'];
|
||||
$delIndex = $_GET['DEL_INDEX'];
|
||||
$tasUid = (isset($_GET['TAS_UID'])) ? $_GET['TAS_UID'] : '';
|
||||
|
||||
$_SESSION['APPLICATION'] = $_GET['APP_UID'];
|
||||
$_SESSION['INDEX'] = $_GET['DEL_INDEX'];
|
||||
|
||||
$aFields = $oCase->loadCase( $sAppUid, $iDelIndex );
|
||||
|
||||
$_SESSION['PROCESS'] = $aFields['PRO_UID'];
|
||||
|
||||
$_SESSION['TASK'] = $aFields['TAS_UID'];
|
||||
// Get case fields
|
||||
$fields = $case->loadCase($appUid, $delIndex);
|
||||
// Set some SESSION values
|
||||
$_SESSION['APPLICATION'] = $appUid;
|
||||
$_SESSION['INDEX'] = $delIndex ;
|
||||
$_SESSION['PROCESS'] = $fields['PRO_UID'];
|
||||
$_SESSION['TASK'] = $fields['TAS_UID'];
|
||||
$_SESSION['STEP_POSITION'] = 0;
|
||||
$_SESSION['CURRENT_TASK'] = $aFields['TAS_UID'];
|
||||
|
||||
$currentTask = (empty($tasUid)) ? $aFields["APP_DATA"]["TASK"]: $tasUid;
|
||||
|
||||
/* Redirect to next step */
|
||||
|
||||
$cases = new Cases();
|
||||
|
||||
$arrayDynaFormUid = array();
|
||||
$arrayInputUid = array();
|
||||
|
||||
$resultDynaForm = $cases->getAllDynaformsStepsToRevise($aFields["APP_UID"]);
|
||||
|
||||
while ($resultDynaForm->next()) {
|
||||
$row = $resultDynaForm->getRow();
|
||||
|
||||
$arrayDynaFormUid[$row["STEP_UID_OBJ"]] = $row["STEP_UID_OBJ"];
|
||||
$arrayDynaFormUid['DYN_UID'] = $row["STEP_UID_OBJ"];
|
||||
}
|
||||
|
||||
$resultInput = $cases->getAllInputsStepsToRevise($aFields["APP_UID"]);
|
||||
|
||||
while ($resultInput->next()) {
|
||||
$row = $resultInput->getRow();
|
||||
|
||||
$arrayInputUid[$row["STEP_UID_OBJ"]] = $row["STEP_UID_OBJ"];
|
||||
$arrayInputUid['INP_DOC_UID'] = $row["STEP_UID_OBJ"];
|
||||
}
|
||||
|
||||
$criteria = new Criteria();
|
||||
|
||||
$criteria->addSelectColumn(StepPeer::STEP_TYPE_OBJ);
|
||||
$criteria->addSelectColumn(StepPeer::STEP_UID_OBJ);
|
||||
$criteria->addSelectColumn(StepPeer::STEP_POSITION);
|
||||
|
||||
$criteria->add(StepPeer::PRO_UID, $aFields["PRO_UID"], Criteria::EQUAL);
|
||||
$criteria->add(StepPeer::TAS_UID, $currentTask, Criteria::EQUAL);
|
||||
$criteria->addAscendingOrderByColumn(StepPeer::STEP_POSITION);
|
||||
|
||||
$rsCriteria = StepPeer::doSelectRS($criteria);
|
||||
$rsCriteria->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
|
||||
$url = "";
|
||||
$flag = false;
|
||||
//Review the object in the current task
|
||||
while ($rsCriteria->next()) {
|
||||
$row = $rsCriteria->getRow();
|
||||
|
||||
$stepTypeObj = $row["STEP_TYPE_OBJ"];
|
||||
$stepUidObj = $row["STEP_UID_OBJ"];
|
||||
|
||||
switch ($stepTypeObj) {
|
||||
case "DYNAFORM":
|
||||
if (isset($arrayDynaFormUid[$stepUidObj])) {
|
||||
$url = "cases_StepToRevise?type=DYNAFORM&PRO_UID=" . $aFields["PRO_UID"] . "&DYN_UID=" . $stepUidObj . "&APP_UID=" . $sAppUid . "&DEL_INDEX=" . $iDelIndex . "&position=1";
|
||||
$_SESSION['CURRENT_TASK'] = $fields['TAS_UID'];
|
||||
$flag = true;
|
||||
}
|
||||
break;
|
||||
case "INPUT_DOCUMENT":
|
||||
if (isset($arrayInputUid[$stepUidObj])) {
|
||||
$url = "cases_StepToReviseInputs?type=INPUT_DOCUMENT&PRO_UID=" . $aFields["PRO_UID"] . "&INP_DOC_UID=" . $stepUidObj . "&APP_UID=" . $sAppUid . "&position=" . $row["STEP_POSITION"] . "&DEL_INDEX=" . $iDelIndex;
|
||||
$flag = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
$cases = new BusinessModelCases();
|
||||
$urls = $cases->getAllUrlStepsToRevise($appUid, $delIndex);
|
||||
|
||||
if ($flag) {
|
||||
break;
|
||||
if (!empty($urls)) {
|
||||
$url = $urls[0]['url'];
|
||||
} else {
|
||||
$message = [];
|
||||
$message["MESSAGE"] = G::LoadTranslation("ID_NO_ASSOCIATED_INPUT_DOCUMENT_DYN");
|
||||
$G_PUBLISH = new Publisher();
|
||||
$G_PUBLISH->AddContent("xmlform", "xmlform", "login/showMessage", "", $message);
|
||||
G::RenderPage("publishBlank", "blank");
|
||||
}
|
||||
}
|
||||
|
||||
//Review the list in Assigned objects
|
||||
if(!$flag && isset($arrayDynaFormUid['DYN_UID'])){
|
||||
$url = 'cases_StepToRevise?type=DYNAFORM&ex=0&PRO_UID='.$aFields["PRO_UID"].'&DYN_UID='.$arrayDynaFormUid['DYN_UID'].'&APP_UID='.$sAppUid.'&position=1&DEL_INDEX='.$iDelIndex;
|
||||
$flag = true;
|
||||
}
|
||||
if(!$flag && isset($arrayInputUid['INP_DOC_UID'])){
|
||||
$url = 'cases_StepToReviseInputs?type=INPUT_DOCUMENT&ex=0&PRO_UID='.$aFields["PRO_UID"].'&INP_DOC_UID='.$arrayInputUid['INP_DOC_UID'].'&APP_UID='.$sAppUid.'&position=1&DEL_INDEX='.$iDelIndex;
|
||||
$flag = true;
|
||||
}
|
||||
|
||||
|
||||
$processUser = new ProcessUser();
|
||||
$userAccess = $processUser->validateUserAccess($aFields['PRO_UID'], $_SESSION['USER_LOGGED']);
|
||||
$userAccess = $processUser->validateUserAccess($_SESSION['PROCESS'], $_SESSION['USER_LOGGED']);
|
||||
if (!$userAccess) {
|
||||
$flag = false;
|
||||
}
|
||||
@@ -159,9 +67,9 @@ if(!$userAccess) {
|
||||
if ($flag) {
|
||||
G::header("Location: " . $url);
|
||||
} else {
|
||||
$aMessage = array ();
|
||||
$aMessage["MESSAGE"] = G::LoadTranslation("ID_SUPERVISOR_DOES_NOT_HAVE_DYNAFORMS");
|
||||
$message = [];
|
||||
$message["MESSAGE"] = G::LoadTranslation("ID_SUPERVISOR_DOES_NOT_HAVE_DYNAFORMS");
|
||||
$G_PUBLISH = new Publisher();
|
||||
$G_PUBLISH->AddContent("xmlform", "xmlform", "login/showMessage", "", $aMessage);
|
||||
$G_PUBLISH->AddContent("xmlform", "xmlform", "login/showMessage", "", $message);
|
||||
G::RenderPage("publishBlank", "blank");
|
||||
}
|
||||
|
||||
@@ -179,7 +179,7 @@ $headPublisher->assign('_WORKSPACE', config("system.workspace"));
|
||||
$headPublisher->assign('_DEL_INDEX_DELEGATE', $delIndex);
|
||||
$headPublisher->assign('_USR_DELEGATE', $case['CURRENT_USER_UID']);
|
||||
|
||||
if (!isset($_SESSION['APPLICATION']) || !isset($_SESSION['TASK']) || !isset($_SESSION['INDEX'])) {
|
||||
if (!isset($_SESSION['APPLICATION']) || !isset($_SESSION['TASK']) || !isset($_SESSION['INDEX']) || !isset($_SESSION['PROCESS'])) {
|
||||
$_SESSION['PROCESS'] = $case['PRO_UID'];
|
||||
$_SESSION['APPLICATION'] = $case['APP_UID'];
|
||||
$_SESSION['TASK'] = $case['TAS_UID'];
|
||||
|
||||
@@ -364,7 +364,7 @@ try {
|
||||
//The other authentication methods should not be validated by password security policies.
|
||||
if (!empty($aUser['USR_AUTH_TYPE'])) {
|
||||
$authType = $aUser['USR_AUTH_TYPE'];
|
||||
if ($authType != "mysql" && $authType != "") {
|
||||
if (strtolower($authType) != "mysql" && $authType != "") {
|
||||
$policiesToExclude = [
|
||||
'ID_PPP_MINIMUM_LENGTH',
|
||||
'ID_PPP_MAXIMUM_LENGTH',
|
||||
|
||||
@@ -532,7 +532,7 @@ Ext.onReady(function(){
|
||||
iconCls: 'ICON_STEPS',
|
||||
toggleHandler: togglePreview,
|
||||
disabled: true,
|
||||
hidden: true
|
||||
hidden: (typeof (treeToReviseTitle) == 'undefined' ? false : true)
|
||||
}, {
|
||||
id: 'informationMenu',
|
||||
text: _('ID_INFORMATION'),
|
||||
|
||||
Reference in New Issue
Block a user