Merge branch dev/task-149142 of zentao/zentaopms (#11399)

This commit is contained in:
刘刚
2025-09-10 15:07:36 +08:00
committed by Gitfox
8 changed files with 62 additions and 6 deletions
+2 -1
View File
@@ -6,6 +6,7 @@ ALTER TABLE `zt_deliverable` ADD `trimRule` varchar(255) NOT NULL AFTER `trimmab
ALTER TABLE `zt_deliverable` ADD `template` text NOT NULL AFTER `trimRule`;
ALTER TABLE `zt_deliverable` ADD `status` varchar(30) NOT NULL DEFAULT 'enabled' AFTER `name`;
ALTER TABLE `zt_deliverable` ADD `category` varchar(255) NOT NULL DEFAULT '' AFTER `lastEditedDate`;
ALTER TABLE `zt_deliverable` ADD `buitin` tinyint(1) unsigned NOT NULL DEFAULT '0' AFTER `module`;
CREATE TABLE IF NOT EXISTS `zt_deliverablestage` (
`id` int(8) unsigned NOT NULL AUTO_INCREMENT,
@@ -58,4 +59,4 @@ UPDATE `zt_lang` SET `value` = '冒烟测试环节' WHERE `module` = 'testcase'
UPDATE `zt_lang` SET `value` = '版本验证环节' WHERE `module` = 'testcase' AND `section` = 'stageList' AND `key` = 'bvt' AND `value` = '版本验证阶段';
ALTER TABLE `zt_review` ADD `version` varchar(255) NOT NULL DEFAULT '' AFTER `docVersion`;
ALTER TABLE `zt_review` ADD `deliverable` mediumint(8) NOT NULL DEFAULT '0' AFTER `title`;
ALTER TABLE `zt_review` ADD `deliverable` mediumint(8) unsigned NOT NULL DEFAULT '0' AFTER `title`;
+2 -1
View File
@@ -596,6 +596,7 @@ CREATE TABLE `zt_deliverable` (
`id` int(8) unsigned NOT NULL AUTO_INCREMENT,
`workflowGroup` int(8) unsigned NOT NULL DEFAULT 0,
`module` mediumint(8) unsigned NOT NULL DEFAULT 0,
`buitin` tinyint(1) unsigned NOT NULL DEFAULT 0,
`name` varchar(255) NOT NULL,
`status` varchar(30) NOT NULL DEFAULT 'enabled',
`activity` int(8) unsigned NOT NULL DEFAULT 0,
@@ -14333,7 +14334,7 @@ CREATE TABLE IF NOT EXISTS `zt_review` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`project` mediumint(8) unsigned NOT NULL DEFAULT '0',
`title` varchar(255) NOT NULL DEFAULT '',
`deliverable` mediumint(8) NOT NULL DEFAULT '0',
`deliverable` mediumint(8) unsigned NOT NULL DEFAULT '0',
`object` mediumint(8) NOT NULL DEFAULT '0',
`template` mediumint(8) NOT NULL DEFAULT '0',
`doc` varchar(255) NOT NULL DEFAULT '',
+1 -1
View File
@@ -112,7 +112,7 @@ $config->upgrade->execFlow['21_6_beta'] = array('functions' => 'processCharter
$config->upgrade->execFlow['21_6_1'] = array('xxsqls' => "$appRoot/db/upgradexuanxuan9.1.2.sql");
$config->upgrade->execFlow['21_7'] = array('functions' => 'fixWorkflowNameForExecution');
$config->upgrade->execFlow['21_7_1'] = array('functions' => 'convertCharset,processActionProduct');
$config->upgrade->execFlow['21_7_3'] = array('functions' => 'upgradeProcessAndActivity,addDefaultDeliverableModule,upgradeDesignToDeliverable,upgradeDeliverable,buildInBaselineReview,upgradeBaselineObjects,upgradeReviewToDeliverable');
$config->upgrade->execFlow['21_7_3'] = array('functions' => 'upgradeProcessAndActivity,addDefaultDeliverableModule,upgradeDesignToDeliverable,buildinTestcaseStageDeliverable,upgradeDeliverable,buildinBaselineReview,upgradeBaselineObjects,upgradeReviewToDeliverable');
if(!empty($config->isINT))
{
+1
View File
@@ -104,6 +104,7 @@ $lang->upgrade->projectName = 'Project Name';
$lang->upgrade->projectManage = 'Project Manage';
$lang->upgrade->compatibleEXT = 'Extension mechanism compatible';
$lang->upgrade->fileName = 'File Name';
$lang->upgrade->list = ' List';
$lang->upgrade->next = 'Next';
$lang->upgrade->back = 'Back';
+1
View File
@@ -104,6 +104,7 @@ $lang->upgrade->projectName = 'Project Name';
$lang->upgrade->projectManage = 'Project Manage';
$lang->upgrade->compatibleEXT = 'Extension mechanism compatible';
$lang->upgrade->fileName = 'File Name';
$lang->upgrade->list = ' List';
$lang->upgrade->next = 'Next';
$lang->upgrade->back = 'Back';
+1
View File
@@ -104,6 +104,7 @@ $lang->upgrade->projectName = 'Project Name';
$lang->upgrade->projectManage = 'Project Manage';
$lang->upgrade->compatibleEXT = 'Extension mechanism compatible';
$lang->upgrade->fileName = 'File Name';
$lang->upgrade->list = ' List';
$lang->upgrade->next = 'Next';
$lang->upgrade->back = 'Back';
+1
View File
@@ -104,6 +104,7 @@ $lang->upgrade->projectName = '项目名称';
$lang->upgrade->projectManage = '项目管理';
$lang->upgrade->compatibleEXT = '扩展机制兼容';
$lang->upgrade->fileName = '文件名称';
$lang->upgrade->list = '列表';
$lang->upgrade->next = '下一步';
$lang->upgrade->back = '上一步';
+53 -3
View File
@@ -11311,7 +11311,7 @@ class upgradeModel extends model
* @access public
* @return int
*/
public function addDeliverable(string $name, object $deliverable, object $deliverableStage, array &$nameFilter): int
public function addDeliverable(string $name, object $deliverable, object $deliverableStage, array &$nameFilter = array()): int
{
/* 重名的交付物名称后面加数字。 */
if(!empty($nameFilter[$name]))
@@ -11542,6 +11542,56 @@ class upgradeModel extends model
return $activityID;
}
/**
* 内置测试环节列表交付物。
* Buildin testcase stage deliverable.
*
* @access public
* @return void
*/
public function buildinTestcaseStageDeliverable()
{
$this->app->loadLang('testcase');
$clientLang = $this->app->getClientLang();
$testcaseStageList = $this->dao->select('`key`, value')->from(TABLE_LANG)
->where('module')->eq('testcase')
->andWhere('section')->eq('stageList')
->andWhere('lang')->in(array($clientLang, 'all'))
->orderBy('id_asc')
->fetchPairs();
if(empty($typeList)) $testcaseStageList = $this->lang->testcase->stageList;
$modules = $this->dao->select('root,id')->from(TABLE_MODULE)
->where('type')->eq('deliverable')
->andWhere('extra')->eq('test')
->fetchPairs();
$deliverable = new stdClass();
$deliverable->status = 'enabled';
$deliverable->createdBy = 'system';
$deliverable->createdDate = helper::now();
$deliverable->template = '[]';
$deliverable->buitin = '1';
$deliverableStage = new stdClass();
$deliverableStage->stage = 'project';
$deliverableStage->required = '0';
$workflows = $this->dao->select('id')->from(TABLE_WORKFLOWGROUP)->where('type')->eq('project')->fetchAll('id');
foreach($workflows as $workflow)
{
$deliverable->module = zget($modules, $workflow->id, 0);
$deliverable->workflowGroup = $workflow->id;
foreach($testcaseStageList as $key => $name)
{
if(empty($name)) continue;
$deliverable->category = $key; // 标记交付物的类型。
$this->addDeliverable($name . $this->lang->upgrade->list, $deliverable, $deliverableStage);
}
}
}
/**
* 升级项目和迭代的交付物配置。
* Upgrade project deliverable.
@@ -11698,12 +11748,12 @@ class upgradeModel extends model
/**
* 内置基线评审到项目流程中。
* buildInBaselineReviewFlow
* Buildin baseline review flow.
*
* @access public
* @return void
*/
public function buildInBaselineReview()
public function buildinBaselineReview()
{
$reviewFlow = new stdclass();
$reviewFlow->flow = '1';