From a68b7b4c012307cc106d2edf324fc559677212a7 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Tue, 5 Mar 2024 11:16:07 +0800 Subject: [PATCH] * Fix bug #46574. --- module/story/model.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/module/story/model.php b/module/story/model.php index 299b6da318..636567b175 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -115,6 +115,15 @@ class storyModel extends model { if(empty($storyIdList)) return array(); + if(is_string($storyIdList)) $storyIdList = explode(',', $storyIdList); + $storyIdList = array_filter($storyIdList); + foreach($storyIdList as $index => $storyID) + { + /* 处理选中的子需求的ID,截取-后的子需求ID。*/ + /* Process selected child story ID. */ + if(strpos((string)$storyID, '-') !== false) $storyIdList[$index] = substr($storyID, strpos($storyID, '-') + 1); + } + return $this->dao->select('t1.*, t2.spec, t2.verify, t3.name as productTitle, t3.deleted as productDeleted') ->from(TABLE_STORY)->alias('t1') ->leftJoin(TABLE_STORYSPEC)->alias('t2')->on('t1.id=t2.story')