From 67feeaba0bbf8e43d9c5e616546d32b59a65f5d6 Mon Sep 17 00:00:00 2001 From: sunguangming Date: Thu, 11 Apr 2024 09:33:35 +0800 Subject: [PATCH] * Add upgrade sql, fix bug. --- db/update20.0.sql | 6 ++++++ module/story/model.php | 1 - module/story/tao.php | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/db/update20.0.sql b/db/update20.0.sql index 97f97400c7..579c1f6d60 100644 --- a/db/update20.0.sql +++ b/db/update20.0.sql @@ -23,6 +23,12 @@ CREATE TABLE `zt_storygrade` ( `status` char(30) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; +INSERT INTO `zt_storygrade` (`type`, `grade`, `name`, `status`) VALUES +('requirement', 1, '用需', 'enable'), +('epic', 1, '业需', 'enable'), +('story', 1, '父', 'enable'), +('story', 2, '子', 'enable'); + ALTER TABLE `zt_story` ADD `isParent` enum('0','1') NOT NULL DEFAULT '0' AFTER `parent`; ALTER TABLE `zt_story` ADD `root` mediumint NOT NULL DEFAULT '0' AFTER `isParent`; ALTER TABLE `zt_story` ADD `path` text NULL AFTER `root`; diff --git a/module/story/model.php b/module/story/model.php index ef104a941f..dabbef03a4 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -4281,7 +4281,6 @@ class storyModel extends model $storyLang->zeroCase = str_replace($SRCommon, $replacement, $storyLang->zeroCase); $storyLang->zeroTask = str_replace($SRCommon, $replacement, $storyLang->zeroTask); $storyLang->copyTitle = str_replace($SRCommon, $replacement, $storyLang->copyTitle); - $storyLang->common = str_replace($SRCommon, $replacement, $storyLang->common); $storyLang->title = str_replace($SRCommon, $replacement, $storyLang->title); $storyLang->spec = str_replace($SRCommon, $replacement, $storyLang->spec); $storyLang->children = str_replace($SRCommon, $replacement, $storyLang->children); diff --git a/module/story/tao.php b/module/story/tao.php index a1e9239ae5..40ece7ea7d 100644 --- a/module/story/tao.php +++ b/module/story/tao.php @@ -1913,7 +1913,7 @@ class storyTao extends storyModel } elseif($story->type == 'requirement' && common::hasPriv('story', 'batchCreate')) { - $title = $this->lang->story->split . $lang->URCommon; + $title = $this->lang->story->split . $lang->SRCommon; if(!empty($story->cannotSplit)) $title = $this->lang->story->errorCannotSplit; $actions[] = array('name' => 'batchCreate', 'url' => helper::createLink('story', 'batchCreate', "productID=$story->product&branch=$story->branch&module=$story->module&$params&executionID=$executionID&plan=0"), 'hint' => $title, 'disabled' => $story->status != 'active', 'icon' => 'tree'); }