From aeced3121af9bde856d3283b4441da7621fbd5f4 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Tue, 23 Jan 2024 15:13:18 +0800 Subject: [PATCH] * Fix not link story error. --- module/task/model.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/module/task/model.php b/module/task/model.php index 5edc780240..74f5a4ae0e 100755 --- a/module/task/model.php +++ b/module/task/model.php @@ -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. */