This commit is contained in:
sunguangming
2024-03-20 09:17:38 +08:00
parent afd71ddd15
commit b89f3d4a55
4 changed files with 26 additions and 6 deletions
+7 -4
View File
@@ -27,11 +27,14 @@ ALTER TABLE `zt_story` ADD `grade` smallint(6) NOT NULL AFTER `parent`;
ALTER TABLE `zt_story` ADD `top` mediumint NOT NULL DEFAULT '0' AFTER `parent`;
ALTER TABLE `zt_story` ADD `isParent` enum('0','1') NOT NULL DEFAULT '0' AFTER `parent`;
ALTER TABLE `zt_story` ADD `parentVersion` smallint NOT NULL DEFAULT '0' AFTER `version`;
update zt_story set isParent = 1 where parent = -1;
update zt_story set grade = 1, parent = 0, top = id where type != 'story';
update zt_story set grade = 1, parent = 0, top = id where type = 'story' and parent <= 0;
update zt_story set grade = 2, top = parent where type = 'story' and parent > 0;
UPDATE `zt_story` SET isParent = 1 WHERE parent = -1;
UPDATE `zt_story` SET grade = 1, parent = 0, top = id WHERE type != 'story';
UPDATE `zt_story` SET grade = 1, parent = 0, top = id WHERE type = 'story' AND parent <= 0;
UPDATE `zt_story` SET grade = 2, top = parent WHERE type = 'story' AND parent > 0;
INSERT INTO `zt_config` (`owner`, `module`, `section`, `key`, `value`) VALUES ('system', 'story', '', 'gradeRule', 'stepwise');
INSERT INTO `zt_config` (`owner`, `module`, `section`, `key`, `value`) VALUES ('system', 'requirement', '', 'gradeRule', 'stepwise');
INSERT INTO `zt_config` (`owner`, `module`, `section`, `key`, `value`) VALUES ('system', 'epic', '', 'gradeRule', 'stepwise');
INSERT INTO `zt_config` (`owner`, `module`, `section`, `key`, `value`) VALUES ('system', 'custom', '', 'enableER', '0');
UPDATE `zt_config` SET `value` = CONCAT(`value`, ',productER') WHERE `key` = 'closedFeatures' AND module = 'common';
+2 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -27,7 +27,7 @@ $config->custom->requiredModules[40] = 'task';
$config->custom->requiredModules[45] = 'build';
$config->custom->allFeatures = array('program', 'productRR', 'productUR', 'productLine', 'projectScrum', 'projectWaterfall', 'projectKanban', 'projectAgileplus', 'projectWaterfallplus', 'execution', 'qa', 'devops', 'kanban', 'doc', 'report', 'system', 'admin', 'vision', 'ai');
$config->custom->dataFeatures = array('productUR', 'waterfall', 'waterfallplus');
$config->custom->dataFeatures = array('productER', 'productUR', 'waterfall', 'waterfallplus');
$config->custom->scrumFeatures = array();
$config->custom->requiredModules[50] = 'bug';
+16
View File
@@ -1061,9 +1061,25 @@ class customModel extends model
$URAndSR = strpos(",$disabledFeatures,", ',productUR,') === false ? '1' : '0';
$this->setting->setItem('system.custom.URAndSR', $URAndSR);
$disableER = strpos(",$disabledFeatures,", ',productER,') !== false;
$enableER = (!$URAndSR || $disableER) ? '0' : '1';
$this->setting->setItem('system.custom.enableER', $enableER);
$this->processMeasrecordCron();
}
/**
* 检查系统中是否有业务需求数据。
* Check whether there is epic data in the system.
*
* @access public
* @return int
*/
public function hasProductERData(): int
{
return (int)$this->dao->select('*')->from(TABLE_STORY)->where('type')->eq('epic')->andWhere('deleted')->eq('0')->count();
}
/**
* 检查系统中是否有用户需求数据。
* Check whether there is requirement data in the system.