* Fix not link story error.

This commit is contained in:
tianshujie
2024-01-23 15:13:30 +08:00
parent e03548831d
commit aeced3121a
+6 -2
View File
@@ -1051,13 +1051,17 @@ class taskModel extends model
/* Get the stories of the test tasks. */
$testStoryIdList = array();
foreach($testTasks as $task) $testStoryIdList[$task->story] = $task->story;
foreach($testTasks as $task)
{
if(!isset($task->story)) continue;
$testStoryIdList[$task->story] = $task->story;
}
$testStories = $this->dao->select('id,title,version,module')->from(TABLE_STORY)->where('id')->in($testStoryIdList)->fetchAll('id');
foreach($testTasks as $task)
{
/* If the story id is not exist, skip it. */
$storyID = $task->story;
$storyID = isset($task->story) ? $task->story : 0;
if(!isset($testStories[$storyID])) continue;
/* Construct a task and create it. */