From ecc3ae4608a6675aa68869a3ea43c3796c6ebb08 Mon Sep 17 00:00:00 2001 From: songchenxuan Date: Wed, 5 Jan 2022 15:06:56 +0800 Subject: [PATCH 1/2] *Fix bug 18183,18184. --- module/bug/model.php | 60 ++++++++++++++++++++++++-------------------- 1 file changed, 33 insertions(+), 27 deletions(-) diff --git a/module/bug/model.php b/module/bug/model.php index 057fede214..e0551885e2 100644 --- a/module/bug/model.php +++ b/module/bug/model.php @@ -2732,34 +2732,40 @@ class bugModel extends model { $class = "c-$id"; $title = ''; - if($id == 'id') $class .= ' cell-id'; - if($id == 'status') + switch($id) { - $class .= ' bug-' . $bug->status; - $title = "title='" . $this->processStatus('bug', $bug) . "'"; - } - if($id == 'confirmed') - { - $class .= ' text-center'; - } - if($id == 'title') - { - $class .= ' text-left'; - $title = "title='{$bug->title}'"; - } - if($id == 'type') - { - $title = "title='" . zget($this->lang->bug->typeList, $bug->type) . "'"; - } - if($id == 'assignedTo') - { - $class .= ' has-btn text-left'; - if($bug->assignedTo == $account) $class .= ' red'; - } - if($id == 'resolvedBy') - { - $class .= ' c-user'; - $title = "title='" . zget($users, $bug->resolvedBy) . "'"; + case 'id': + $class .= ' cell-id'; + break; + case 'status': + $class .= ' bug-' . $bug->status; + $title = "title='" . $this->processStatus('bug', $bug) . "'"; + break; + case 'confirmed': + $class .= ' text-center'; + break; + case 'title': + $class .= ' text-left'; + $title = "title='{$bug->title}'"; + break; + case 'type': + $title = "title='" . zget($this->lang->bug->typeList, $bug->type) . "'"; + break; + case 'assignedTo': + $class .= ' has-btn text-left'; + if($bug->assignedTo == $account) $class .= ' red'; + break; + case 'resolvedBy': + $class .= ' c-user'; + $title = "title='" . zget($users, $bug->resolvedBy) . "'"; + break; + case 'project': + $title = "title='" . zget($projectPairs, $bug->project, '') . "'"; + break; + case 'resolvedBuild': + $class .= ' text-ellipsis'; + $title = "title='" . $bug->resolvedBuild . "'"; + break; } if($id == 'deadline' && isset($bug->delay) && $bug->status == 'active') $class .= ' delayed'; if(strpos(',type,execution,story,plan,task,openedBuild,', ",{$id},") !== false) $class .= ' text-ellipsis'; From bc637ef419ae066fa82ad66388f4cc5c582bfb5c Mon Sep 17 00:00:00 2001 From: songchenxuan Date: Wed, 5 Jan 2022 15:11:26 +0800 Subject: [PATCH 2/2] *Fix bug 18183,18184. --- module/bug/model.php | 1 + 1 file changed, 1 insertion(+) diff --git a/module/bug/model.php b/module/bug/model.php index e0551885e2..9d8e662703 100644 --- a/module/bug/model.php +++ b/module/bug/model.php @@ -2767,6 +2767,7 @@ class bugModel extends model $title = "title='" . $bug->resolvedBuild . "'"; break; } + if($id == 'deadline' && isset($bug->delay) && $bug->status == 'active') $class .= ' delayed'; if(strpos(',type,execution,story,plan,task,openedBuild,', ",{$id},") !== false) $class .= ' text-ellipsis';