* [task#149142,doing,2h,2h] Upgrade testcase stagelist to deliverable.
This commit is contained in:
+2
-1
@@ -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 `buildin` enum('0','1') 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) NOT NULL DEFAULT '0' AFTER `title`;
|
||||
|
||||
@@ -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,
|
||||
`buildin` enum('0','1') NOT NULL DEFAULT '0',
|
||||
`name` varchar(255) NOT NULL,
|
||||
`status` varchar(30) NOT NULL DEFAULT 'enabled',
|
||||
`activity` int(8) unsigned NOT NULL DEFAULT 0,
|
||||
|
||||
@@ -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))
|
||||
{
|
||||
|
||||
@@ -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';
|
||||
|
||||
|
||||
@@ -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';
|
||||
|
||||
|
||||
@@ -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';
|
||||
|
||||
|
||||
@@ -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 = '上一步';
|
||||
|
||||
|
||||
@@ -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->buildin = '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';
|
||||
|
||||
Reference in New Issue
Block a user