* [task#130379,doing,0.5h] Process task to bug.

This commit is contained in:
xieqiyu
2024-10-21 10:43:46 +08:00
committed by 胡方舟
parent bedea883b9
commit 0787bae1da
2 changed files with 29 additions and 8 deletions
+11 -1
View File
@@ -10022,7 +10022,7 @@ class upgradeModel extends model
}
/* Process bug link bug. */
$bugList = $this->dao->select('id,story,relatedBug')->from(TABLE_BUG)->where('relatedBug')->ne('')->orWhere('story')->ne('0')->fetchAll('id');
$bugList = $this->dao->select('id,story,relatedBug,task')->from(TABLE_BUG)->where('relatedBug')->ne('')->orWhere('story')->ne(0)->orWhere('task')->ne(0)->fetchAll('id');
foreach($bugList as $bugID => $bug)
{
if(!empty($bug->relatedBug))
@@ -10049,6 +10049,16 @@ class upgradeModel extends model
$relation->BID = $bugID;
$this->dao->replace(TABLE_RELATION)->data($relation)->exec();
}
if(!empty($bug->task))
{
$relation = new stdClass();
$relation->AType = 'task';
$relation->AID = $bug->task;
$relation->relation = 'generated';
$relation->BType = 'bug';
$relation->BID = $bugID;
$this->dao->replace(TABLE_RELATION)->data($relation)->exec();
}
}
/* Process case link case. */