From 2a6493abbaf781312d04ad2d9b9fb062e42db84b Mon Sep 17 00:00:00 2001 From: caoyanyi Date: Wed, 10 May 2023 10:34:07 +0800 Subject: [PATCH] * Delete multiple ternary operations. --- module/execution/model.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/module/execution/model.php b/module/execution/model.php index 1099764fb7..ae7b4b94de 100755 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -4622,8 +4622,9 @@ class executionModel extends model { $groupKey = $type == 'finishedBy' ? $bug->resolvedBy : $bug->$type; - $status = $bug->status; - $status = $status == 'active' ? 'wait' : ($status == 'resolved' ? ($bug->resolution == 'postponed' ? 'cancel' : 'done') : $status); + $status = $bug->status == 'active' ? 'wait' : $bug->status; + if($status == 'resolved') $status = $bug->resolution == 'postponed' ? 'cancel' : 'done'; + if(!empty($groupKey) and (($type == 'story' and isset($stories[$groupKey])) or $type != 'story')) { if($type == 'assignedTo' and $groupKey == 'closed')