From b9e61a1852a72c163535bcd39d57bf210c4fdfb9 Mon Sep 17 00:00:00 2001 From: tianshujie98 Date: Fri, 11 Sep 2020 16:53:16 +0800 Subject: [PATCH] * Fix bug #3457. --- module/bug/model.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/module/bug/model.php b/module/bug/model.php index 27ef22c657..1632c94d96 100644 --- a/module/bug/model.php +++ b/module/bug/model.php @@ -1206,6 +1206,12 @@ class bugModel extends model $this->dao->update(TABLE_BUG)->data($bug)->autoCheck()->where('id')->eq((int)$bugID)->exec(); $this->dao->update(TABLE_BUG)->set('activatedCount = activatedCount + 1')->where('id')->eq((int)$bugID)->exec(); + $openedBuilds = $this->post->openedBuild; + foreach($openedBuilds as $openedBuild) + { + if(is_numeric($openedBuild)) $this->loadModel('build')->unlinkBug($openedBuild, $bugID); + } + $bug->activatedCount += 1; return common::createChanges($oldBug, $bug); }