From 230a9b23eae81438abef88cb5c00f662b91ddef9 Mon Sep 17 00:00:00 2001 From: sunguangming Date: Wed, 27 Mar 2024 16:19:02 +0800 Subject: [PATCH] * Code for bug #47178. --- module/story/model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/story/model.php b/module/story/model.php index 8793067cd5..b58d4e496d 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -60,7 +60,7 @@ class storyModel extends model if($story->toBug) $story->toBugTitle = $this->dao->findById($story->toBug)->from(TABLE_BUG)->fetch('title'); if($story->fromStory) $story->sourceName = $this->dao->select('title')->from(TABLE_STORY)->where('id')->eq($story->fromStory)->fetch('title'); - if($story->isParent == '1') $story->children = $this->dao->select('*')->from(TABLE_STORY)->where('parent')->eq($storyID)->andWhere('deleted')->eq(0)->fetchAll('id'); + if($story->isParent == '1') $story->children = $this->dao->select('*')->from(TABLE_STORY)->where('parent')->eq($storyID)->andWhere('deleted')->eq(0)->orderBy('id_desc')->fetchAll('id'); if($story->plan) { $plans = $this->dao->select('id,title,branch')->from(TABLE_PRODUCTPLAN)->where('id')->in($story->plan)->fetchAll('id');