+ Update issue when assign bug to user.

This commit is contained in:
dingguodong
2021-06-28 23:31:48 +08:00
parent c064d05ab6
commit 6dba8ad443
2 changed files with 9 additions and 1 deletions
+9
View File
@@ -852,6 +852,15 @@ class bugModel extends model
->autoCheck()
->where('id')->eq($bugID)->exec();
$relation = $this->loadModel('gitlab')->getGitlabIssueFromRelation('bug', $bugID);
$attribute = new stdclass();
$attribute->assignee_id = $this->loadModel('gitlab')->getGitlabUserID($relation->gitlabID, $bug->assignedTo);
if($attribute->assignee_id != '')
{
// TODO(dingguodong) we should alert to operator when can not find the user, and the operator should reconfigure user binding.
$this->loadModel('gitlab')->apiUpdateIssue($relation->gitlabID, $relation->projectID, $relation->issueID , $attribute);
}
if(!dao::isError()) return common::createChanges($oldBug, $bug);
}