Skip to content

Commit

Permalink
* [bug#58708,done,0.5h] set parent.
Browse files Browse the repository at this point in the history
  • Loading branch information
liumengyi-luna authored and 田淑杰 committed Dec 27, 2024
1 parent a60dbbb commit 70a6bf4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion module/execution/control.php
Original file line number Diff line number Diff line change
Expand Up @@ -1058,7 +1058,7 @@ public function create(int $projectID = 0, int $executionID = 0, int $copyExecut
$isStage = isset($output['type']) && $output['type'] == 'stage';
if(!empty($project) && ($project->model == 'waterfall' || $project->model == 'waterfallplus'))
{
$this->view->parentStage = 0;
$this->view->parentStage = isset($output['parentStage']) ? $output['parentStage'] : 0;
$this->view->parentStages = $this->loadModel('programplan')->getParentStageList($projectID, 0, 0, 'withparent|noclosed|' . ($isStage ? 'stage' : 'notstage'));
}

Expand Down
5 changes: 3 additions & 2 deletions module/execution/js/create.ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,9 @@ function refreshPage()
*/
function setType()
{
const type = $('input[name=type]').val();
loadPage($.createLink('execution', 'create', 'projectID=' + projectID + '&executionID=0&copyExecutionID=&planID=0&confirm=no&productID=0&extra=type=' + type));
const type = $('input[name=type]').val();
const parentStage = $('input[name=parent]').val();
loadPage($.createLink('execution', 'create', 'projectID=' + projectID + '&executionID=0&copyExecutionID=&planID=0&confirm=no&productID=0&extra=type=' + type + ',parentStage=' + parentStage));
}

/**
Expand Down

0 comments on commit 70a6bf4

Please sign in to comment.