* [task#130379,doing,0.5h] Process task to bug.
This commit is contained in:
@@ -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. */
|
||||
|
||||
Reference in New Issue
Block a user