From 2ba786263cffe2a98f39bed0542e284f9193c727 Mon Sep 17 00:00:00 2001 From: Yagami <976204163@qq.com> Date: Mon, 12 Jul 2021 14:09:25 +0800 Subject: [PATCH] * Finish task #40104. --- module/execution/control.php | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/module/execution/control.php b/module/execution/control.php index f51727a1cc..fbd66adfd9 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -2728,13 +2728,27 @@ class execution extends control $this->loadModel('action')->create('story', $storyID, 'estimated', '', $executionID); $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $this->createLink('execution', 'storyEstimate', "executionID=$executionID&storyID=$storyID"))); } + $estimateInfo = $this->story->getEstimateInfo($storyID, $round); + $team = $this->execution->getTeamMembers($executionID); + /* If user has been removed from team and has estimate record, join him into team.*/ + if(!empty($estimateInfo->estimate)) + { + foreach($estimateInfo->estimate as $account => $estimate) + { + if(!in_array($account, array_keys($team))) + { + $team[$account] = new stdclass(); + $team[$account]->account = $account; + } + } + } $this->view->estimateInfo = $estimateInfo; $this->view->round = !empty($estimateInfo->round) ? $estimateInfo->round : 0; $this->view->rounds = $this->story->getEstimateRounds($storyID); $this->view->users = $this->loadModel('user')->getPairs('noletter'); - $this->view->team = $this->execution->getTeamMembers($executionID); + $this->view->team = $team; $this->view->executionID = $executionID; $this->view->storyID = $storyID; $this->display();