* Fix bug#12748.

This commit is contained in:
qiyu-xie
2021-05-31 16:04:26 +08:00
parent 18fd0d937c
commit 910eb61cd4
+5 -1
View File
@@ -634,7 +634,11 @@ class bugModel extends model
if(!dao::isError())
{
/* Link bug to build and release. */
if($bug->resolution == 'fixed' and !empty($bug->resolvedBuild))$this->linkBugToBuild($bugID, $bug->resolvedBuild);
if($bug->resolution == 'fixed' and !empty($bug->resolvedBuild) and $oldBug->resolvedBuild != $bug->resolvedBuild)
{
if(!empty($oldBug->resolvedBuild)) $this->loadModel('build')->unlinkBug((int)$oldBug->resolvedBuild, (int)$bugID);
$this->linkBugToBuild($bugID, $bug->resolvedBuild);
}
if(!empty($bug->resolvedBy)) $this->loadModel('score')->create('bug', 'resolve', $bugID);
$this->file->updateObjectID($this->post->uid, $bugID, 'bug');