Merge branch feature/workflowgroup of zentao/zentaopms (#12580)
This commit is contained in:
@@ -1066,6 +1066,13 @@ class execution extends control
|
||||
$this->loadModel('project')->checkAccess($projectID, $allProjects);
|
||||
if(empty($projectID)) $projectID = key($allProjects) ? key($allProjects) : 0;
|
||||
|
||||
/* 过滤掉阶段已打基线的项目。*/
|
||||
$executionList = $this->project->getExecutionList(array_keys($allProjects));
|
||||
foreach($executionList as $executionInfo)
|
||||
{
|
||||
if(!empty($executionInfo->frozen)) unset($allProjects[$executionInfo->project]);
|
||||
}
|
||||
|
||||
$project = empty($projectID) ? null : $this->loadModel('project')->fetchByID($projectID);
|
||||
$project ? $this->executionZen->correctExecutionCommonLang($project, $execution->type) : $project = null;
|
||||
$products = $this->executionZen->getLinkedProducts($copyExecutionID, $planID, $project);
|
||||
@@ -1377,6 +1384,11 @@ class execution extends control
|
||||
$relatedProjects = $this->dao->select('id,project')->from(TABLE_PROJECT)->where('id')->in($executionIDList)->fetchPairs(); /* 获取执行所属的项目列表。*/
|
||||
$projects = $this->dao->select('*')->from(TABLE_PROJECT)->where('id')->in($relatedProjects)->fetchAll('id'); /* 获取执行所属的项目列表中每个项目的项目信息。*/
|
||||
|
||||
foreach($executions as $key => $execution)
|
||||
{
|
||||
if(!empty($execution->frozen)) unset($executions[$key]);
|
||||
}
|
||||
|
||||
list($pmUsers, $poUsers, $qdUsers, $rdUsers) = $this->executionZen->setUserMoreLink($executions);
|
||||
|
||||
/* Set custom fields. */
|
||||
|
||||
@@ -163,6 +163,9 @@ $lang->execution->typeTip = "The sub-stages of other types can be cre
|
||||
$lang->execution->waterfallTip = "In the Waterfall {$lang->projectCommon} or in the Waterfall + {$lang->projectCommon},";
|
||||
$lang->execution->progressTip = 'All Progress = Consumed / (Consumed + Left)';
|
||||
$lang->execution->limitedTip = "Limited users can only edit tasks that are relevant to them and cannot create new tasks. Relevant tasks include those assigned to them, completed tasks, canceled tasks, closed tasks, and the last edited tasks, but exclude those copied to them. \nIf a user was not a limited user before but is now classified as one, they will still have permissions for tasks they created in the past.";
|
||||
$lang->execution->stageFrozenTip = 'After the stage are baselined, %s is not allowed.';
|
||||
$lang->execution->createChildStage = 'create child stage';
|
||||
$lang->execution->ganttDrag = 'Drag';
|
||||
|
||||
$lang->execution->start = 'Start';
|
||||
$lang->execution->activate = 'Aktivieren';
|
||||
|
||||
@@ -163,6 +163,9 @@ $lang->execution->typeTip = "The sub-stages of other types can be cre
|
||||
$lang->execution->waterfallTip = "In the Waterfall {$lang->projectCommon} or in the Waterfall + {$lang->projectCommon},";
|
||||
$lang->execution->progressTip = 'All Progress = Consumed / (Consumed + Left)';
|
||||
$lang->execution->limitedTip = "Limited users can only edit tasks that are relevant to them and cannot create new tasks. Relevant tasks include those assigned to them, completed tasks, canceled tasks, closed tasks, and the last edited tasks, but exclude those copied to them. \nIf a user was not a limited user before but is now classified as one, they will still have permissions for tasks they created in the past.";
|
||||
$lang->execution->stageFrozenTip = 'After the stage are baselined, %s is not allowed.';
|
||||
$lang->execution->createChildStage = 'create child stage';
|
||||
$lang->execution->ganttDrag = 'Drag';
|
||||
|
||||
$lang->execution->start = 'Start';
|
||||
$lang->execution->activate = 'Activate';
|
||||
|
||||
@@ -163,6 +163,9 @@ $lang->execution->typeTip = "The sub-stages of other types can be cre
|
||||
$lang->execution->waterfallTip = "In the Waterfall {$lang->projectCommon} or in the Waterfall + {$lang->projectCommon},";
|
||||
$lang->execution->progressTip = 'All Progress = Consumed / (Consumed + Left)';
|
||||
$lang->execution->limitedTip = "Limited users can only edit tasks that are relevant to them and cannot create new tasks. Relevant tasks include those assigned to them, completed tasks, canceled tasks, closed tasks, and the last edited tasks, but exclude those copied to them. \nIf a user was not a limited user before but is now classified as one, they will still have permissions for tasks they created in the past.";
|
||||
$lang->execution->stageFrozenTip = 'After the stage are baselined, %s is not allowed.';
|
||||
$lang->execution->createChildStage = 'create child stage';
|
||||
$lang->execution->ganttDrag = 'Drag';
|
||||
|
||||
$lang->execution->start = 'Démarrer';
|
||||
$lang->execution->activate = 'Activer';
|
||||
|
||||
@@ -163,6 +163,9 @@ $lang->execution->typeTip = '“综合”类型的父阶段可以创
|
||||
$lang->execution->waterfallTip = "瀑布{$lang->projectCommon}和融合瀑布{$lang->projectCommon}中,";
|
||||
$lang->execution->progressTip = '总进度 = 已消耗工时 / (已消耗工时 + 剩余工时)';
|
||||
$lang->execution->limitedTip = "受限用户只能编辑与自己相关的任务,不能新增任务。与自己相关的内容,包含指派给、已完成、已取消、已关闭、最后编辑,不包含抄送给的内容。 \n如果该用户之前不是受限用户,现在是受限用户,那么之前由他创建的任务还有相关的操作权限。";
|
||||
$lang->execution->stageFrozenTip = '阶段打基线后不允许%s';
|
||||
$lang->execution->createChildStage = '创建子阶段';
|
||||
$lang->execution->ganttDrag = '拖拽';
|
||||
|
||||
$lang->execution->start = "开始";
|
||||
$lang->execution->activate = "激活";
|
||||
|
||||
@@ -3929,6 +3929,7 @@ class executionModel extends model
|
||||
*/
|
||||
public static function isClickable(object $execution, string $action): bool
|
||||
{
|
||||
if(!empty($execution->frozen) && in_array($action, array('edit', 'createChildStage', 'delete', 'putoff'))) return false;
|
||||
if($action == 'createChildStage') return commonModel::hasPriv('programplan', 'create') && $execution->type == 'stage';
|
||||
if($action == 'createTask') return commonModel::hasPriv('task', 'create') && commonModel::hasPriv('execution', 'create') && empty($execution->isParent);
|
||||
if(!commonModel::hasPriv('execution', $action)) return false;
|
||||
@@ -4964,6 +4965,7 @@ class executionModel extends model
|
||||
if($actionName == 'createChildStage' && $action['disabled'] && $execution->type != 'stage') $action['hint'] = $this->lang->programplan->error->notStage;
|
||||
if(!$action['disabled']) break;
|
||||
if($actionName == 'close' && $execution->status != 'closed') break;
|
||||
if(!empty($execution->frozen) && in_array($actionName, array('edit', 'createChildStage', 'delete', 'putoff'))) $action['hint'] = sprintf($this->lang->execution->stageFrozenTip, $this->lang->execution->$actionName);
|
||||
}
|
||||
|
||||
if(!empty($action))
|
||||
|
||||
@@ -26,13 +26,15 @@ formPanel
|
||||
datePicker
|
||||
(
|
||||
set::name('begin'),
|
||||
set::value($newBegin)
|
||||
set::value($newBegin),
|
||||
set::disabled(!empty($execution->frozen))
|
||||
),
|
||||
$lang->execution->to,
|
||||
datePicker
|
||||
(
|
||||
set::name('end'),
|
||||
set::value($newEnd)
|
||||
set::value($newEnd),
|
||||
set::disabled(!empty($execution->frozen))
|
||||
)
|
||||
)
|
||||
),
|
||||
|
||||
@@ -25,6 +25,12 @@ jsVar('confirmCreateStage', $lang->project->confirmCreateStage);
|
||||
|
||||
$searchTask = strtolower($status) == 'bysearch';
|
||||
|
||||
$frozenExecutions = 0;
|
||||
foreach($executionStats as $execution)
|
||||
{
|
||||
if(!empty($execution->frozen)) $frozenExecutions ++;
|
||||
}
|
||||
|
||||
$footToolbar = array();
|
||||
$canModify = common::canModify('project', $project);
|
||||
$canBatchEdit = hasPriv('execution', 'batchEdit');
|
||||
@@ -32,7 +38,7 @@ $canBatchChangeStatus = hasPriv('execution', 'batchChangeStatus');
|
||||
$canBatchAction = $canModify && ($canBatchEdit || $canBatchChangeStatus);
|
||||
if($canBatchAction)
|
||||
{
|
||||
if($canBatchEdit)
|
||||
if($canBatchEdit && empty($frozenExecutions))
|
||||
{
|
||||
$footToolbar['items'][] = array
|
||||
(
|
||||
|
||||
@@ -3390,8 +3390,15 @@ class taskModel extends model
|
||||
*/
|
||||
public function updateExecutionEsDateByGantt(object $postData): bool
|
||||
{
|
||||
$stage = $this->dao->select('project,parent,frozen')->from(TABLE_EXECUTION)->where('id')->eq($postData->id)->fetch();
|
||||
if(!empty($stage->frozen))
|
||||
{
|
||||
$this->app->loadLang('execution');
|
||||
dao::$errors[] = sprintf($this->lang->execution->stageFrozenTip, $this->lang->execution->ganttDrag);
|
||||
return false;
|
||||
}
|
||||
|
||||
/* Get parent information. */
|
||||
$stage = $this->dao->select('project,parent')->from(TABLE_EXECUTION)->where('id')->eq($postData->id)->fetch();
|
||||
$parentID = $stage->project != $stage->parent ? $stage->parent : 0;
|
||||
$parentData = $this->dao->select('begin,end')->from(TABLE_PROJECT)->where('id')->eq($parentID ? $parentID : $stage->project)->fetch();
|
||||
|
||||
|
||||
@@ -10,7 +10,15 @@ zenData('project')->loadYaml('execution', true)->gen(30);
|
||||
|
||||
title=taskModel->updateExecutionEsDateByGantt();
|
||||
timeout=0
|
||||
cid=18851
|
||||
cid=0
|
||||
|
||||
- 测试检查阶段开始日期 @已超出项目计划开始时间,请先修改项目计划开始时间
|
||||
- 测试检查阶段结束日期 @已超出项目计划结束时间,请先修改项目计划结束时间
|
||||
- 测试检查子阶段结束日期 @已超出父阶段计划开始时间,请先修改父阶段计划开始时间
|
||||
- 测试检查子阶段结束日期 @已超出父阶段计划结束时间,请先修改父阶段计划结束时间
|
||||
- 测试更新阶段日期 @1
|
||||
- 测试更新父阶段日期 @1
|
||||
- 测试更新子阶段日期 @1
|
||||
|
||||
*/
|
||||
|
||||
|
||||
Reference in New Issue
Block a user