From 24c8e0948d808d513f7855f64cbb02ae888e1938 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 4 Nov 2021 17:24:52 +0800 Subject: [PATCH 1/2] * Finish task 43917 --- module/execution/control.php | 16 +++++++++++++++ module/execution/model.php | 4 ++++ module/execution/view/create.html.php | 29 +++++++++++++++++++++++++++ 3 files changed, 49 insertions(+) diff --git a/module/execution/control.php b/module/execution/control.php index ce1878dc64..1518d44558 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -1342,6 +1342,18 @@ class execution extends control { $this->lang->execution->type = str_replace($this->lang->executionCommon, $this->lang->project->stage, $this->lang->execution->type); } + $this->loadModel('user'); + $poUsers = $this->user->getPairs('noclosed|nodeleted|pofirst', '', $this->config->maxCount); + if(!empty($this->config->user->moreLink)) $this->config->moreLinks["PM"] = $this->config->user->moreLink; + + $pmUsers = $this->user->getPairs('noclosed|nodeleted|pmfirst', '', $this->config->maxCount); + if(!empty($this->config->user->moreLink)) $this->config->moreLinks["PO"] = $this->config->user->moreLink; + + $qdUsers = $this->user->getPairs('noclosed|nodeleted|qdfirst', '', $this->config->maxCount); + if(!empty($this->config->user->moreLink)) $this->config->moreLinks["QD"] = $this->config->user->moreLink; + + $rdUsers = $this->user->getPairs('noclosed|nodeleted|devfirst', '', $this->config->maxCount); + if(!empty($this->config->user->moreLink)) $this->config->moreLinks["RD"] = $this->config->user->moreLink; $this->view->title = (($this->app->tab == 'execution') and ($this->config->systemMode == 'new')) ? $this->lang->execution->createExec : $this->lang->execution->create; $this->view->position[] = $this->view->title; @@ -1365,6 +1377,10 @@ class execution extends control $this->view->whitelist = $whitelist; $this->view->copyExecutionID = $copyExecutionID; $this->view->branchGroups = $this->loadModel('branch')->getByProducts(array_keys($products)); + $this->view->poUsers = $poUsers; + $this->view->pmUsers = $pmUsers; + $this->view->qdUsers = $qdUsers; + $this->view->rdUsers = $rdUsers; $this->view->users = $this->loadModel('user')->getPairs('nodeleted|noclosed'); $this->view->from = $this->app->tab; $this->display(); diff --git a/module/execution/model.php b/module/execution/model.php index a1ebf3927e..df2fd448ab 100644 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -388,6 +388,10 @@ class executionModel extends model /* Set team of execution. */ $members = isset($_POST['teamMembers']) ? $_POST['teamMembers'] : array(); + array_push($members, $_POST['PO'], $_POST['QD'], $_POST['PM'], $_POST['RD']); + $members = array_unique($members); + $member = array_values($members); + $roles = $this->loadModel('user')->getUserRoles(array_values($members)); foreach($members as $account) { diff --git a/module/execution/view/create.html.php b/module/execution/view/create.html.php index 92b36db039..f9811fd15a 100644 --- a/module/execution/view/create.html.php +++ b/module/execution/view/create.html.php @@ -152,6 +152,35 @@ execution->copyTeam;?> execution->copyTeamTip}'"); ?> + + execution->owner;?> + +
+ execution->PO;?> + +
+ + +
+ execution->QD;?> + +
+ + + + +
+ execution->PM;?> + +
+ + +
+ execution->RD;?> + +
+ + execution->team;?> From d6361de047dd77cf405cb1d1846b53a02000105c Mon Sep 17 00:00:00 2001 From: root Date: Thu, 4 Nov 2021 17:38:34 +0800 Subject: [PATCH 2/2] * Finish task 43917 --- module/execution/model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/execution/model.php b/module/execution/model.php index df2fd448ab..3edf38de83 100644 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -388,7 +388,7 @@ class executionModel extends model /* Set team of execution. */ $members = isset($_POST['teamMembers']) ? $_POST['teamMembers'] : array(); - array_push($members, $_POST['PO'], $_POST['QD'], $_POST['PM'], $_POST['RD']); + array_push($members, $sprint->PO, $sprint->QD, $sprint->PM, $sprint->RD); $members = array_unique($members); $member = array_values($members);