* [refac,done,0.1h] fix update data error when import bug data.

This commit is contained in:
tianshujie
2025-03-14 14:26:05 +08:00
committed by 曹延义
parent 1994c8c9e0
commit 0fca587450
+3 -3
View File
@@ -367,19 +367,19 @@ class bugModel extends model
$relation->BID = $bug->id;
$relation->BType = 'bug';
$relation->product = 0;
if($bug->story > 0)
if(!empty($bug->story))
{
$relation->AID = $bug->story;
$relation->AType = 'story';
$this->dao->replace(TABLE_RELATION)->data($relation)->exec();
}
if($bug->task > 0)
if(!empty($bug->task))
{
$relation->AID = $bug->task;
$relation->AType = 'task';
$this->dao->replace(TABLE_RELATION)->data($relation)->exec();
}
if($bug->case > 0)
if(!empty($bug->case))
{
$relation->AID = $bug->case;
$relation->AType = 'testcase';