From dee641a3b629998f244c5c32e1bbdc260fc7c4f2 Mon Sep 17 00:00:00 2001 From: wangxiaomeng Date: Thu, 14 Apr 2022 13:21:41 +0800 Subject: [PATCH 1/2] Aborting commit due to empty commit message --- module/bug/model.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/module/bug/model.php b/module/bug/model.php index 5a4a9de304..fc4c6cbf30 100644 --- a/module/bug/model.php +++ b/module/bug/model.php @@ -674,6 +674,10 @@ class bugModel extends model return false; } + if(empty($_POST['assignedTo']) and $oldBug->status == 'closed'){ + $_POST['assignedTo'] = 'closed'; + } + $now = helper::now(); $bug = fixer::input('post') ->cleanInt('product,module,severity,project,execution,story,task,branch') From b085ec1029ba9206cdfd20199303e3f9949425f2 Mon Sep 17 00:00:00 2001 From: wangxiaomeng Date: Thu, 14 Apr 2022 13:56:03 +0800 Subject: [PATCH 2/2] Aborting commit due to empty commit message --- module/bug/model.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/module/bug/model.php b/module/bug/model.php index fc4c6cbf30..41761258da 100644 --- a/module/bug/model.php +++ b/module/bug/model.php @@ -673,11 +673,6 @@ class bugModel extends model dao::$errors[] = $this->lang->error->editedByOther; return false; } - - if(empty($_POST['assignedTo']) and $oldBug->status == 'closed'){ - $_POST['assignedTo'] = 'closed'; - } - $now = helper::now(); $bug = fixer::input('post') ->cleanInt('product,module,severity,project,execution,story,task,branch') @@ -705,6 +700,7 @@ class bugModel extends model ->setIF($this->post->closedBy != '' or $this->post->closedDate != '', 'status', 'closed') ->setIF(($this->post->resolution != '' or $this->post->resolvedDate != '') and $this->post->assignedTo == '', 'assignedTo', $oldBug->openedBy) ->setIF(($this->post->resolution != '' or $this->post->resolvedDate != '') and $this->post->assignedTo == '', 'assignedDate', $now) + ->setIF($this->post->assignedTo == '' and $oldBug->status == 'closed', 'assignedTo', 'closed') ->setIF($this->post->resolution == '' and $this->post->resolvedDate =='', 'status', 'active') ->setIF($this->post->resolution != '', 'confirmed', 1) ->setIF($this->post->story != false and $this->post->story != $oldBug->story, 'storyVersion', $this->loadModel('story')->getVersion($this->post->story))