From 20c4a2b8b49eb36adcd2742f41d6ef0201565dfe Mon Sep 17 00:00:00 2001 From: tianshujie Date: Wed, 29 Jun 2022 13:53:51 +0800 Subject: [PATCH] * Resolve issue #687. --- module/bug/control.php | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/module/bug/control.php b/module/bug/control.php index ebd9dad1ea..9d14a7a01c 100755 --- a/module/bug/control.php +++ b/module/bug/control.php @@ -1397,19 +1397,26 @@ class bug extends control } /* Get assigned to member. */ - if($bug->execution) + if($this->app->tab == 'project' or $this->app->tab == 'execution') { - $users = $this->user->getTeamMemberPairs($bug->execution, 'execution'); - } - elseif($bug->project) - { - $users = $this->loadModel('project')->getTeamMemberPairs($bug->project); + if($bug->execution) + { + $users = $this->user->getTeamMemberPairs($bug->execution, 'execution'); + } + elseif($bug->project) + { + $users = $this->loadModel('project')->getTeamMemberPairs($bug->project); + } + else + { + $users = $this->bug->getProductMemberPairs($bug->product, $bug->branch); + $users = array_filter($users); + if(empty($users)) $users = $this->user->getPairs('devfirst|noclosed'); + } } else { - $users = $this->bug->getProductMemberPairs($bug->product, $bug->branch); - $users = array_filter($users); - if(empty($users)) $users = $this->user->getPairs('devfirst|noclosed'); + $users = $this->user->getPairs('devfirst|noclosed'); } $this->view->title = $this->products[$bug->product] . $this->lang->colon . $this->lang->bug->assignedTo;