From 4c7619bcb98998f9e012ee1308cc63b56d838164 Mon Sep 17 00:00:00 2001 From: hufangzhou Date: Thu, 12 May 2022 15:46:49 +0800 Subject: [PATCH] * Fix bug #22429. --- module/action/config.php | 1 + module/story/control.php | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/module/action/config.php b/module/action/config.php index f86dbe9e83..df19f560cc 100755 --- a/module/action/config.php +++ b/module/action/config.php @@ -1,6 +1,7 @@ action->objectNameFields['product'] = 'name'; $config->action->objectNameFields['story'] = 'title'; +$config->action->objectNameFields['requirement'] = 'title'; $config->action->objectNameFields['productplan'] = 'title'; $config->action->objectNameFields['release'] = 'name'; $config->action->objectNameFields['program'] = 'name'; diff --git a/module/story/control.php b/module/story/control.php index 70dcd47022..1fb8b8e976 100644 --- a/module/story/control.php +++ b/module/story/control.php @@ -1187,7 +1187,9 @@ class story extends control } else { - $this->story->delete(TABLE_STORY, $storyID); + $this->dao->update(TABLE_STORY)->set('deleted')->eq(1)->where('id')->eq($storyID)->exec(); + $this->loadModel('action')->create($story->type, $storyID, 'deleted', '', ACTIONMODEL::CAN_UNDELETED); + if($story->parent > 0) { $this->story->updateParentStatus($story->id);