Merge branch 'sprint/292_liumengyi_fixbug' into 'master'

* Fix bug.

See merge request easycorp/zentaopms!7033
This commit is contained in:
孙广明
2023-02-22 07:55:34 +00:00
4 changed files with 6 additions and 5 deletions
+1 -2
View File
@@ -5229,12 +5229,11 @@ class executionModel extends model
$class = !empty($execution->children) ? 'disabled' : '';
common::printIcon('task', 'create', "executionID={$execution->id}", '', 'list', '', '', $class, false, "data-app='execution'");
if($execution->type == 'stage' or $this->app->tab == 'project')
if($execution->type == 'stage')
{
$isCreateTask = $this->loadModel('programplan')->isCreateTask($execution->id);
$disabled = ($isCreateTask and $execution->type == 'stage') ? '' : ' disabled';
$title = !$isCreateTask ? $this->lang->programplan->error->createdTask : $this->lang->programplan->createSubPlan;
$title = (!empty($disabled) and $execution->type != 'stage') ? $this->lang->programplan->error->notStage : $title;
common::printIcon('programplan', 'create', "program={$execution->project}&productID=$productID&planID=$execution->id", $execution, 'list', 'split', '', $disabled, '', '', $title);
}