* Fix the problem of creating bugs.

This commit is contained in:
tianshujie98
2021-03-12 09:48:11 +08:00
parent 95fc092deb
commit 1f52d98c8b
2 changed files with 5 additions and 1 deletions
+4
View File
@@ -85,6 +85,8 @@ class bugModel extends model
->remove('files, labels,uid,oldTaskID,contactListMenu')
->get();
if($bug->execution !== 0) $bug->project = $this->dao->select('parent')->from(TABLE_EXECUTION)->where('id')->eq($bug->execution)->fetch('parent');
/* Check repeat bug. */
$result = $this->loadModel('common')->removeDuplicate('bug', $bug, "product={$bug->product}");
if($result['stop']) return array('status' => 'exists', 'id' => $result['duplicate']);
@@ -183,6 +185,8 @@ class bugModel extends model
$bug->browser = $data->browsers[$i];
$bug->keywords = $data->keywords[$i];
if($bug->execution !== 0) $bug->project = $this->dao->select('parent')->from(TABLE_EXECUTION)->where('id')->eq($bug->execution)->fetch('parent');
/* Assign the bug to the person in charge of the module. */
if(!empty($moduleOwners[$bug->module]))
{