+ Update issue status when close bug.

This commit is contained in:
dingguodong
2021-06-29 11:13:29 +08:00
parent 00f4e8b405
commit bf9d28ef7f
2 changed files with 3 additions and 1 deletions
+2
View File
@@ -1247,6 +1247,8 @@ class bug extends control
$this->executeHooks($bugID);
$this->loadModel('gitlab')->pushBug($bugID, $this->post->gitlab, $this->post->gitlabProject);
if($bug->toTask != 0)
{
/* If task is not finished, update it's status. */
+1 -1
View File
@@ -874,7 +874,7 @@ class gitlabModel extends model
}
/* issue->state is null when creating it, we should put status_event when updating it. */
if(isset($issue->state)) $issue->status_event=$issue->state;
if(isset($issue->state) and $issue->state == 'closed') $issue->state_event='close';
return $issue;
}