* Update the object associated with the use case through the operation record.
This commit is contained in:
@@ -0,0 +1,183 @@
|
||||
ALTER TABLE `zt_doc` ADD `editedList` text NULL AFTER `editingDate`;
|
||||
|
||||
ALTER TABLE `zt_case` ADD INDEX `scene` (`scene`);
|
||||
UPDATE `zt_case` SET `scene` = `scene` - 100000000 WHERE `scene` > 100000000;
|
||||
UPDATE `zt_scene` SET `sort` = `sort` - 100000000 WHERE `sort` > 100000000;
|
||||
UPDATE `zt_scene` SET `parent` = `parent` - 100000000 WHERE `parent` > 100000000;
|
||||
UPDATE `zt_scene` SET `path` = REPLACE(`path`, ',10000000', ','), `path` = REPLACE(`path`, ',1000000', ','), `path` = REPLACE(`path`, ',100000', ','), `path` = REPLACE(`path`, ',10000', ',');
|
||||
|
||||
-- DROP TABLE IF EXISTS `zt_actionlatest`;
|
||||
CREATE TABLE IF NOT EXISTS `zt_actionlatest` (
|
||||
`id` int(9) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`objectType` varchar(30) NOT NULL DEFAULT '',
|
||||
`objectID` mediumint(8) unsigned NOT NULL DEFAULT '0',
|
||||
`product` text NULL,
|
||||
`project` mediumint(8) unsigned NOT NULL DEFAULT '0',
|
||||
`execution` mediumint(8) unsigned NOT NULL DEFAULT '0',
|
||||
`actor` varchar(100) NOT NULL DEFAULT '',
|
||||
`action` varchar(80) NOT NULL DEFAULT '',
|
||||
`date` datetime NULL,
|
||||
`comment` text NULL,
|
||||
`extra` text NULL,
|
||||
`read` enum('0','1') NOT NULL DEFAULT '0',
|
||||
`vision` varchar(10) NOT NULL DEFAULT 'rnd',
|
||||
`efforted` tinyint(1) NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
CREATE INDEX `date` ON `zt_actionlatest`(`date`);
|
||||
CREATE INDEX `actor` ON `zt_actionlatest`(`actor`);
|
||||
CREATE INDEX `project` ON `zt_actionlatest`(`project`);
|
||||
CREATE INDEX `action` ON `zt_actionlatest`(`action`);
|
||||
CREATE INDEX `objectID` ON `zt_actionlatest`(`objectID`);
|
||||
|
||||
INSERT INTO `zt_actionlatest`(`objectType`,`objectID`,`product`,`project`,`execution`,`actor`,`action`,`date`,`comment`,`extra`,`read`,`vision`,`efforted`)
|
||||
SELECT `objectType`,`objectID`,`product`,`project`,`execution`,`actor`,`action`,`date`,`comment`,`extra`,`read`,`vision`,`efforted` FROM `zt_action`
|
||||
WHERE `date` >= DATE(DATE_SUB(NOW(), INTERVAL 1 MONTH));
|
||||
|
||||
INSERT INTO `zt_cron` (`m`, `h`, `dom`, `mon`, `dow`, `command`, `remark`, `type`, `buildin`, `status`) VALUES ('15', '0', '*', '*', '*', 'moduleName=action&methodName=cleanActions', '清除超过一个月的动态', 'zentao', 1, 'normal');
|
||||
|
||||
|
||||
ALTER TABLE `zt_notify`
|
||||
MODIFY COLUMN `toList` text NOT NULL AFTER `action`,
|
||||
MODIFY COLUMN `subject` text NOT NULL AFTER `ccList`,
|
||||
DROP INDEX `objectType_toList_status`,
|
||||
ADD INDEX `objectType`(`objectType` ASC),
|
||||
ADD INDEX `status`(`status` ASC);
|
||||
|
||||
CREATE INDEX deleted ON zt_bug (deleted);
|
||||
CREATE INDEX project ON zt_bug (project);
|
||||
CREATE INDEX product_status_deleted ON zt_bug (product,status,deleted);
|
||||
|
||||
UPDATE `zt_cron` SET `m` = '*/1' WHERE `command` in ('moduleName=mail&methodName=asyncSend', 'moduleName=webhook&methodName=asyncSend') and `type` = 'zentao';
|
||||
|
||||
ALTER TABLE `zt_project` ADD INDEX `type_order` (`type`, `order`);
|
||||
|
||||
ALTER TABLE `zt_case`
|
||||
ADD `bugs` MEDIUMINT NOT NULL DEFAULT '0' AFTER `sort`,
|
||||
ADD `steps` MEDIUMINT NOT NULL DEFAULT '0' AFTER `bugs`,
|
||||
ADD `executions` MEDIUMINT NOT NULL DEFAULT '0' AFTER `steps`,
|
||||
ADD `fails` MEDIUMINT NOT NULL DEFAULT '0' AFTER `executions`;
|
||||
|
||||
ALTER TABLE `zt_testrun`
|
||||
ADD `taskBugs` MEDIUMINT NOT NULL DEFAULT '0' AFTER `status`,
|
||||
ADD `taskSteps` MEDIUMINT NOT NULL DEFAULT '0' AFTER `taskBugs`,
|
||||
ADD `taskExecutions` MEDIUMINT NOT NULL DEFAULT '0' AFTER `taskSteps`,
|
||||
ADD `taskFails` MEDIUMINT NOT NULL DEFAULT '0' AFTER `taskExecutions`;
|
||||
|
||||
DROP VIEW IF EXISTS `ztv_scenecase`;
|
||||
CREATE OR REPLACE VIEW `ztv_scenecase` AS SELECT
|
||||
`zt_case`.`id` AS `id`,
|
||||
`zt_case`.`title` AS `title`,
|
||||
`zt_case`.`project` AS `project`,
|
||||
`zt_case`.`product` AS `product`,
|
||||
`zt_case`.`execution` AS `execution`,
|
||||
`zt_case`.`branch` AS `branch`,
|
||||
`zt_case`.`lib` AS `lib`,
|
||||
`zt_case`.`module` AS `module`,
|
||||
`zt_case`.`story` AS `story`,
|
||||
`zt_case`.`storyVersion` AS `storyVersion`,
|
||||
`zt_case`.`precondition` AS `precondition`,
|
||||
`zt_case`.`keywords` AS `keywords`,
|
||||
`zt_case`.`pri` AS `pri`,
|
||||
`zt_case`.`type` AS `type`,
|
||||
`zt_case`.`auto` AS `auto`,
|
||||
`zt_case`.`frame` AS `frame`,
|
||||
`zt_case`.`stage` AS `stage`,
|
||||
`zt_case`.`howRun` AS `howRun`,
|
||||
`zt_case`.`scriptedBy` AS `scriptedBy`,
|
||||
`zt_case`.`scriptedDate` AS `scriptedDate`,
|
||||
`zt_case`.`scriptStatus` AS `scriptStatus`,
|
||||
`zt_case`.`scriptLocation` AS `scriptLocation`,
|
||||
`zt_case`.`status` AS `status`,
|
||||
`zt_case`.`subStatus` AS `subStatus`,
|
||||
`zt_case`.`color` AS `color`,
|
||||
`zt_case`.`frequency` AS `frequency`,
|
||||
IF(`zt_case`.`sort` = 0, `zt_case`.`id`, `zt_case`.`sort`) AS `sort`,
|
||||
`zt_case`.`openedBy` AS `openedBy`,
|
||||
`zt_case`.`openedDate` AS `openedDate`,
|
||||
`zt_case`.`reviewedBy` AS `reviewedBy`,
|
||||
`zt_case`.`reviewedDate` AS `reviewedDate`,
|
||||
`zt_case`.`lastEditedBy` AS `lastEditedBy`,
|
||||
`zt_case`.`lastEditedDate` AS `lastEditedDate`,
|
||||
`zt_case`.`version` AS `version`,
|
||||
`zt_case`.`linkCase` AS `linkCase`,
|
||||
`zt_case`.`fromBug` AS `fromBug`,
|
||||
`zt_case`.`fromCaseID` AS `fromCaseID`,
|
||||
`zt_case`.`fromCaseVersion` AS `fromCaseVersion`,
|
||||
`zt_case`.`deleted` AS `deleted`,
|
||||
`zt_case`.`lastRunner` AS `lastRunner`,
|
||||
`zt_case`.`lastRunDate` AS `lastRunDate`,
|
||||
`zt_case`.`lastRunResult` AS `lastRunResult`,
|
||||
`zt_case`.`bugs` AS `bugs`,
|
||||
`zt_case`.`steps` AS `steps`,
|
||||
`zt_case`.`executions` AS `executions`,
|
||||
`zt_case`.`fails` AS `fails`,
|
||||
`zt_case`.`scene` AS `parent`,
|
||||
`zt_case`.`scene` AS `scene`,
|
||||
ifnull(`zt_scene`.`grade` + 1 , 1) AS `grade`,
|
||||
ifnull(
|
||||
concat(
|
||||
`zt_scene`.`path`,
|
||||
`zt_case`.`id`,
|
||||
','
|
||||
),
|
||||
CONVERT(
|
||||
concat(',' , `zt_case`.`id` , ',') USING utf8
|
||||
)
|
||||
) AS `path`,
|
||||
1 AS `isCase`
|
||||
FROM (`zt_case` LEFT JOIN `zt_scene` ON( `zt_case`.`scene` = `zt_scene`.`id`+100000000))
|
||||
UNION
|
||||
SELECT
|
||||
`zt_scene`.`id`+ 100000000 AS `id`,
|
||||
`zt_scene`.`title` AS `title`,
|
||||
0 AS `project`,
|
||||
`zt_scene`.`product` AS `product`,
|
||||
0 AS `execution`,
|
||||
`zt_scene`.`branch` AS `branch`,
|
||||
0 AS `lib`,
|
||||
`zt_scene`.`module` AS `module`,
|
||||
0 AS `story`,
|
||||
0 AS `storyVersion`,
|
||||
'' AS `precondition`,
|
||||
'' AS `keywords`,
|
||||
0 AS `pri`,
|
||||
'' AS `type`,
|
||||
'' AS `auto`,
|
||||
'' AS `frame`,
|
||||
'' AS `stage`,
|
||||
'' AS `howRun`,
|
||||
'' AS `scriptedBy`,
|
||||
'' AS `scriptedDate`,
|
||||
'' AS `scriptStatus`,
|
||||
'' AS `scriptLocation`,
|
||||
'' AS `status`,
|
||||
'' AS `subStatus`,
|
||||
'' AS `color`,
|
||||
'' AS `frequency`,
|
||||
`zt_scene`.`sort` AS `sort`,
|
||||
`zt_scene`.`openedBy` AS `openedBy`,
|
||||
`zt_scene`.`openedDate` AS `openedDate`,
|
||||
'' AS `reviewedBy`,
|
||||
'' AS `reviewedDate`,
|
||||
`zt_scene`.`lastEditedBy` AS `lastEditedBy`,
|
||||
`zt_scene`.`lastEditedDate` AS `lastEditedDate`,
|
||||
0 AS `version`,
|
||||
'' AS `linkCase`,
|
||||
0 AS `fromBug`,
|
||||
0 AS `fromCaseID`,
|
||||
'' AS `fromCaseVersion`,
|
||||
`zt_scene`.`deleted` AS `deleted`,
|
||||
'' AS `lastRunner`,
|
||||
'' AS `lastRunDate`,
|
||||
'' AS `lastRunResult`,
|
||||
0 AS `bugs`,
|
||||
0 AS `steps`,
|
||||
0 AS `executions`,
|
||||
0 AS `fails`,
|
||||
`zt_scene`.`parent` AS `parent`,
|
||||
`zt_scene`.`parent` AS `scene`,
|
||||
`zt_scene`.`grade` AS `grade`,
|
||||
`zt_scene`.`path` AS `path`,
|
||||
2 AS `isCase`
|
||||
FROM `zt_scene`;
|
||||
@@ -90,6 +90,9 @@ class actionModel extends model
|
||||
/* Add index for global search. */
|
||||
$this->saveIndex($objectType, $objectID, $actionType);
|
||||
|
||||
$changeFunc = 'after' . ucfirst($objectType);
|
||||
if(method_exists($this, $changeFunc)) call_user_func_array(array($this, $changeFunc), array($action, $actionID));
|
||||
|
||||
return $actionID;
|
||||
}
|
||||
|
||||
@@ -872,6 +875,18 @@ class actionModel extends model
|
||||
return $this->dao->select('objectType')->from(TABLE_ACTION)->where('action')->eq('deleted')->andWhere('extra')->eq($extra)->andWhere('vision')->eq($this->config->vision)->fetchAll('objectType');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get histories of an action.
|
||||
*
|
||||
* @param int $actionID
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getHistoryByActionID($actionID)
|
||||
{
|
||||
return $this->dao->select('*')->from(TABLE_HISTORY)->where('action')->eq($actionID)->fetchAll();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get histories of an action.
|
||||
*
|
||||
@@ -907,6 +922,13 @@ class actionModel extends model
|
||||
}
|
||||
$this->dao->insert(TABLE_HISTORY)->data($change)->exec();
|
||||
}
|
||||
|
||||
if(isset($this->session->calllbackActionList[$actionID]))
|
||||
{
|
||||
$callbackMethod = $this->session->calllbackActionList[$actionID];
|
||||
unset($this->session->calllbackActionList[$actionID]);
|
||||
if(method_exists($this, $callbackMethod)) call_user_func_array(array($this, $callbackMethod), array($actionID));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2255,6 +2277,127 @@ class actionModel extends model
|
||||
$this->search->saveIndex($objectType, $data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Trigger to update the field.
|
||||
*
|
||||
* @param object $action
|
||||
* @param int $actionID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function afterBug($action, $actionID)
|
||||
{
|
||||
if(in_array($action->action, array('opened', 'edited', 'deleted', 'undeleted')))
|
||||
{
|
||||
$bug = $this->dao->select('id,`case`,result')->from(TABLE_BUG)->where('id')->eq($action->objectID)->fetch();
|
||||
$caseID = $bug->case;
|
||||
$resultID = $bug->result;
|
||||
$this->computeLinkBugs($caseID, $resultID);
|
||||
$this->session->set('calllbackActionList', array($actionID => 'afterBugCallback'));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Trigger to update the field.
|
||||
*
|
||||
* @param int $actionID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function afterBugCallback($actionID)
|
||||
{
|
||||
$action = $this->getByID($actionID);
|
||||
$histories = $this->getHistoryByActionID($actionID);
|
||||
$caseID = 0;
|
||||
$resultID = 0;
|
||||
foreach($histories as $history)
|
||||
{
|
||||
if($history->field == 'case') $caseID = $history->old;
|
||||
if($history->field == 'result') $resultID = $history->old;
|
||||
}
|
||||
$this->computeLinkBugs($caseID, $resultID);
|
||||
}
|
||||
|
||||
/**
|
||||
* Count the number of bugs associated with a case.
|
||||
*
|
||||
* @param int $caseID
|
||||
* @param int $resultID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function computeLinkBugs($caseID, $resultID)
|
||||
{
|
||||
if($caseID)
|
||||
{
|
||||
$bugs = $this->dao->select('count(*) as count')->from(TABLE_BUG)->where('`case`')->eq($caseID)->andWhere('deleted')->eq('0')->fetch('count');
|
||||
$bugs = $bugs ? $bugs : 0;
|
||||
$this->dao->update(TABLE_CASE)->set('bugs')->eq($bugs)->where('id')->eq($caseID)->exec();
|
||||
}
|
||||
|
||||
$testRun = $this->dao->select('id,task,`case`')->from(TABLE_TESTRUN)->where('id')->eq($resultID)->fetch();
|
||||
if(!empty($testRun))
|
||||
{
|
||||
$taskBugs = $this->dao->select('count(*) as count')->from(TABLE_BUG)->where('result')->eq($resultID)->andWhere('`case`')->eq($caseID)->andWhere('deleted')->eq('0')->fetch('count');
|
||||
$taskBugs = $taskBugs ? $taskBugs : 0;
|
||||
$this->dao->update(TABLE_TESTRUN)->set('taskBugs')->eq($taskBugs)->where('id')->eq($resultID)->exec();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Trigger to update the field.
|
||||
*
|
||||
* @param object $action
|
||||
* @param int $actionID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function afterCase($action)
|
||||
{
|
||||
$objectID = $action->objectID;
|
||||
if(in_array($action->action, array('opened', 'edited', 'deleted', 'undeleted', 'linked2testtask', 'unlinkedfromtesttask')))
|
||||
{
|
||||
$case = $this->dao->select('id,version')->from(TABLE_CASE)->where('id')->eq($objectID)->fetch();
|
||||
$steps = $this->dao->select('count(*) as count')->from(TABLE_CASESTEP)->where('`case`')->eq($objectID)->andWhere('version')->eq($case->version)->fetch('count');
|
||||
$steps = $steps ? $steps : 0;
|
||||
$this->dao->update(TABLE_CASE)->set('steps')->eq($steps)->where('id')->eq($objectID)->exec();
|
||||
|
||||
$testrunList = $this->dao->select('*')->from(TABLE_TESTRUN)->where('`case`')->eq($objectID)->fetchAll();
|
||||
foreach($testrunList as $testrun)
|
||||
{
|
||||
$taskSteps = $this->dao->select('count(distinct t1.id) as count')->from(TABLE_CASESTEP)->alias('t1')
|
||||
->leftJoin(TABLE_TESTRUN)->alias('t2')->on('t1.`case`=t2.`case`')
|
||||
->where('t2.id')->eq($testrun->id)
|
||||
->andWhere('t1.`case`')->eq($testrun->case)
|
||||
->andWhere('t1.type')->ne('group')
|
||||
->andWhere('t1.version=t2.version')
|
||||
->fetch('count');
|
||||
|
||||
$taskSteps = $taskSteps ? $taskSteps : 0;
|
||||
$this->dao->update(TABLE_TESTRUN)->set('taskSteps')->eq($taskSteps)->where('id')->eq($testrun->id)->exec();
|
||||
}
|
||||
}
|
||||
|
||||
if($action->action == 'run')
|
||||
{
|
||||
$executions = $this->dao->select('count(*) as count')->from(TABLE_TESTRESULT)->where('`case`')->eq($objectID)->fetch('count');
|
||||
$fails = $this->dao->select('count(*) as count')->from(TABLE_TESTRESULT)->where('`case`')->eq($objectID)->andWhere('caseResult')->eq('fail')->fetch('count');
|
||||
$executions = $executions ? $executions : 0;
|
||||
$fails = $fails ? $fails : 0;
|
||||
$this->dao->update(TABLE_CASE)->set('executions')->eq($executions)->set('fails')->eq($fails)->where('id')->eq($objectID)->exec();
|
||||
|
||||
$testrunList = $this->dao->select('*')->from(TABLE_TESTRUN)->where('`case`')->eq($objectID)->fetchAll();
|
||||
foreach($testrunList as $testrun)
|
||||
{
|
||||
$taskExecutions = $this->dao->select('count(*) as count')->from(TABLE_TESTRESULT)->where('`run`')->eq($testrun->id)->fetch('count');
|
||||
$taskFails = $this->dao->select('count(*) as count')->from(TABLE_TESTRESULT)->where('`run`')->eq($testrun->id)->andWhere('caseResult')->eq('fail')->fetch('count');
|
||||
$taskExecutions = $taskExecutions ? $taskExecutions : 0;
|
||||
$taskFails = $taskFails ? $taskFails : 0;
|
||||
$this->dao->update(TABLE_TESTRUN)->set('taskExecutions')->eq($taskExecutions)->set('taskFails')->eq($taskFails)->where('id')->eq($testrun->id)->exec();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Print actions of an object for API(JIHU).
|
||||
*
|
||||
|
||||
@@ -1220,7 +1220,6 @@ class execution extends control
|
||||
$cases = $this->loadModel('testcase')->getExecutionCases($executionID, $productID, $branchID, $moduleID, $orderBy, $pager, $type);
|
||||
$this->loadModel('common')->saveQueryCondition($this->dao->get(), 'testcase', false);
|
||||
|
||||
$cases = $this->testcase->appendData($cases, 'case');
|
||||
$cases = $this->loadModel('story')->checkNeedConfirm($cases);
|
||||
|
||||
$modules = $this->tree->getAllModulePairs('case');
|
||||
|
||||
@@ -279,7 +279,6 @@ class job extends control
|
||||
$runs = $this->testtask->getRuns($taskID, 0, 'id');
|
||||
|
||||
$cases = array();
|
||||
$runs = $this->loadModel('testcase')->appendData($runs, 'testrun');
|
||||
foreach($runs as $run) $cases[$run->case] = $run;
|
||||
|
||||
$results = $this->dao->select('*')->from(TABLE_TESTRESULT)->where('`case`')->in(array_keys($cases))->andWhere('run')->in(array_keys($runs))->fetchAll('run');
|
||||
|
||||
@@ -690,7 +690,6 @@ EOF;
|
||||
$this->loadModel('common')->saveQueryCondition($this->dao->get(), 'testcase', false);
|
||||
|
||||
$cases = $this->loadModel('story')->checkNeedConfirm($cases);
|
||||
$cases = $this->testcase->appendData($cases, $type == 'assigntome' ? 'run' : 'case');
|
||||
|
||||
/* Build the search form. */
|
||||
$currentMethod = $this->app->rawMethod;
|
||||
|
||||
@@ -208,7 +208,6 @@ class testcase extends control
|
||||
|
||||
/* Process case for check story changed. */
|
||||
$cases = $this->loadModel('story')->checkNeedConfirm($cases);
|
||||
$cases = $this->testcase->appendData($cases);
|
||||
foreach($cases as $case)
|
||||
{
|
||||
$case->parent = 0;
|
||||
@@ -217,6 +216,8 @@ class testcase extends control
|
||||
$case->isScene = false;
|
||||
}
|
||||
|
||||
$scenes = $this->loadModel('story')->checkNeedConfirm($scenes);
|
||||
|
||||
/* Build the search form. */
|
||||
$currentModule = $this->app->tab == 'project' ? 'project' : 'testcase';
|
||||
$currentMethod = $this->app->tab == 'project' ? 'testcase' : 'browse';
|
||||
@@ -327,7 +328,6 @@ class testcase extends control
|
||||
$cases = $this->testcase->getModuleCases($productID, $branch, 0, '', 'no', $caseType, $groupBy);
|
||||
$this->loadModel('common')->saveQueryCondition($this->dao->get(), 'testcase', false);
|
||||
$cases = $this->loadModel('story')->checkNeedConfirm($cases);
|
||||
$cases = $this->testcase->appendData($cases);
|
||||
|
||||
$groupCases = array();
|
||||
$groupByList = array();
|
||||
@@ -1812,7 +1812,6 @@ class testcase extends control
|
||||
$relatedFiles = $this->dao->select('id, objectID, pathname, title')->from(TABLE_FILE)->where('objectType')->eq('testcase')->andWhere('objectID')->in(@array_keys($cases))->andWhere('extra')->ne('editor')->fetchGroup('objectID');
|
||||
$relatedScenes = $this->testcase->getSceneMenu($productID, 0);
|
||||
|
||||
$cases = $this->testcase->appendData($cases);
|
||||
foreach($cases as $case)
|
||||
{
|
||||
$case->stepDesc = '';
|
||||
@@ -1880,9 +1879,9 @@ class testcase extends control
|
||||
if(isset($users[$case->lastRunner])) $case->lastRunner = $users[$case->lastRunner];
|
||||
if(isset($caseLang->resultList[$case->lastRunResult])) $case->lastRunResult = $caseLang->resultList[$case->lastRunResult];
|
||||
|
||||
$case->bugsAB = $case->bugs; unset($case->bugs);
|
||||
$case->resultsAB = $case->results; unset($case->results);
|
||||
$case->stepNumberAB = $case->stepNumber; unset($case->stepNumber);
|
||||
$case->bugsAB = $taskID ? $case->taskBugs : $case->bugs;
|
||||
$case->resultsAB = $taskID ? $case->taskExecutions : $case->executions;
|
||||
$case->stepNumberAB = $taskID ? $case->taskSteps : $case->steps;
|
||||
unset($case->caseFails);
|
||||
|
||||
$case->stage = explode(',', $case->stage);
|
||||
|
||||
@@ -683,7 +683,7 @@ class testcaseModel extends model
|
||||
*/
|
||||
public function getByAssignedTo($account, $orderBy = 'id_desc', $pager = null, $auto = 'no')
|
||||
{
|
||||
return $this->dao->select('t1.id as run, t1.task,t1.case,t1.version,t1.assignedTo,t1.lastRunner,t1.lastRunDate,t1.lastRunResult,t1.status as lastRunStatus,t2.id as id,t2.project,t2.pri,t2.title,t2.type,t2.openedBy,t2.color,t2.product,t2.branch,t2.module,t2.status,t2.story,t2.storyVersion,t3.name as taskName')->from(TABLE_TESTRUN)->alias('t1')
|
||||
return $this->dao->select('t1.id as run, t1.task,t1.case,t1.version,t1.assignedTo,t1.lastRunner,t1.lastRunDate,t1.lastRunResult,t1.status as lastRunStatus,t1.taskFails as fails,t2.id as id,t2.project,t2.pri,t2.title,t2.type,t2.openedBy,t2.color,t2.product,t2.branch,t2.module,t2.status,t2.story,t2.storyVersion,t3.name as taskName')->from(TABLE_TESTRUN)->alias('t1')
|
||||
->leftJoin(TABLE_CASE)->alias('t2')->on('t1.case = t2.id')
|
||||
->leftJoin(TABLE_TESTTASK)->alias('t3')->on('t1.task = t3.id')
|
||||
->where('t1.assignedTo')->eq($account)
|
||||
@@ -747,7 +747,7 @@ class testcaseModel extends model
|
||||
->andWhere('t1.deleted')->eq('0')
|
||||
->orderBy($orderBy)->page($pager)
|
||||
->fetchAll('id');
|
||||
return $this->appendData($cases);
|
||||
return $cases;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1545,7 +1545,7 @@ class testcaseModel extends model
|
||||
|
||||
$action = strtolower($action);
|
||||
|
||||
if($module == 'testcase' && $action == 'createbug') return $case->caseFails > 0;
|
||||
if($module == 'testcase' && $action == 'createbug') return $case->fails > 0;
|
||||
if($module == 'testcase' && $action == 'review') return isset($case->caseStatus) ? $case->caseStatus == 'wait' : $case->status == 'wait';
|
||||
|
||||
return true;
|
||||
@@ -2288,7 +2288,9 @@ class testcaseModel extends model
|
||||
$class .= $case->status;
|
||||
$title = "title='" . $this->processStatus('testcase', $case) . "'";
|
||||
}
|
||||
if(strpos(',bugs,results,stepNumber,', ",$id,") !== false) $title = "title='{$case->$id}'";
|
||||
if($id == 'bugs') $title = "title='{$case->$id}'";
|
||||
if($id == 'results') $title = "title='{$case->executions}'";
|
||||
if($id == 'stepNumber') $title = "title='{$case->steps}'";
|
||||
if($id == 'actions') $class .= ' c-actions';
|
||||
if($id == 'lastRunResult') $class .= " {$case->lastRunResult}";
|
||||
if(strpos(',stage,precondition,keywords,story,', ",{$id},") !== false) $class .= ' text-ellipsis';
|
||||
@@ -2454,10 +2456,10 @@ class testcaseModel extends model
|
||||
if(!$isScene) echo (common::hasPriv('testcase', 'bugs') and $case->bugs) ? html::a(helper::createLink('testcase', 'bugs', "runID=0&caseID={$case->id}"), $case->bugs, '', "class='iframe'") : $case->bugs;
|
||||
break;
|
||||
case 'results':
|
||||
if(!$isScene) echo (common::hasPriv('testtask', 'results') and $case->results) ? html::a(helper::createLink('testtask', 'results', "runID=0&caseID={$case->id}"), $case->results, '', "class='iframe'") : $case->results;
|
||||
if (!$isScene) echo (common::hasPriv('testtask', 'results') and $case->executions) ? html::a(helper::createLink('testtask', 'results', "runID=0&caseID={$case->id}"), $case->executions, '', "class='iframe'") : $case->executions;
|
||||
break;
|
||||
case 'stepNumber':
|
||||
if(!$isScene) echo $case->stepNumber;
|
||||
if (!$isScene) echo $case->steps;
|
||||
break;
|
||||
case 'actions':
|
||||
if(!$isScene)
|
||||
@@ -2475,69 +2477,6 @@ class testcaseModel extends model
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Append bugs and results.
|
||||
*
|
||||
* @param int $cases
|
||||
* @param string $type
|
||||
* @param array $caseIdlist
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function appendData($cases, $type = 'case', $caseIdlist = array())
|
||||
{
|
||||
if(empty($caseIdlist)) $caseIdList = array_keys($cases);
|
||||
if($type == 'case')
|
||||
{
|
||||
$caseBugs = $this->dao->select('count(*) as count, `case`')->from(TABLE_BUG)->where('`case`')->in($caseIdList)->andWhere('deleted')->eq(0)->groupBy('`case`')->fetchPairs('case', 'count');
|
||||
$results = $this->dao->select('count(*) as count, `case`')->from(TABLE_TESTRESULT)->where('`case`')->in($caseIdList)->groupBy('`case`')->fetchPairs('case', 'count');
|
||||
|
||||
$caseFails = $this->dao->select('count(*) as count, `case`')->from(TABLE_TESTRESULT)
|
||||
->where('caseResult')->eq('fail')
|
||||
->andwhere('`case`')->in($caseIdList)
|
||||
->groupBy('`case`')
|
||||
->fetchPairs('case','count');
|
||||
|
||||
$steps = $this->dao->select('count(distinct t1.id) as count, t1.`case`')->from(TABLE_CASESTEP)->alias('t1')
|
||||
->leftJoin(TABLE_CASE)->alias('t2')->on('t1.`case`=t2.`id`')
|
||||
->where('t1.`case`')->in($caseIdList)
|
||||
->andWhere('t1.type')->ne('group')
|
||||
->andWhere('t1.version=t2.version')
|
||||
->groupBy('t1.`case`')
|
||||
->fetchPairs('case', 'count');
|
||||
}
|
||||
else
|
||||
{
|
||||
$caseBugs = $this->dao->select('count(*) as count, `case`')->from(TABLE_BUG)->where('`result`')->in($caseIdList)->andWhere('deleted')->eq(0)->groupBy('`case`')->fetchPairs('case', 'count');
|
||||
$results = $this->dao->select('count(*) as count, `case`')->from(TABLE_TESTRESULT)->where('`run`')->in($caseIdList)->groupBy('`case`')->fetchPairs('case', 'count');
|
||||
|
||||
$caseFails = $this->dao->select('count(*) as count, `case`')->from(TABLE_TESTRESULT)
|
||||
->where('caseResult')->eq('fail')
|
||||
->andwhere('`run`')->in($caseIdList)
|
||||
->groupBy('`case`')
|
||||
->fetchPairs('case','count');
|
||||
|
||||
$steps = $this->dao->select('count(distinct t1.id) as count, t1.`case`')->from(TABLE_CASESTEP)->alias('t1')
|
||||
->leftJoin(TABLE_TESTRUN)->alias('t2')->on('t1.`case`=t2.`case`')
|
||||
->where('t2.`id`')->in($caseIdList)
|
||||
->andWhere('t1.type')->ne('group')
|
||||
->andWhere('t1.version=t2.version')
|
||||
->groupBy('t1.`case`')
|
||||
->fetchPairs('case', 'count');
|
||||
}
|
||||
|
||||
foreach($cases as $key => $case)
|
||||
{
|
||||
$caseID = $type == 'case' ? $case->id : $case->case;
|
||||
$case->bugs = isset($caseBugs[$caseID]) ? $caseBugs[$caseID] : 0;
|
||||
$case->results = isset($results[$caseID]) ? $results[$caseID] : 0;
|
||||
$case->caseFails = isset($caseFails[$caseID]) ? $caseFails[$caseID] : 0;
|
||||
$case->stepNumber = isset($steps[$caseID]) ? $steps[$caseID] : 0;
|
||||
}
|
||||
|
||||
return $cases;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check whether force not review.
|
||||
*
|
||||
|
||||
@@ -88,8 +88,8 @@
|
||||
?>
|
||||
</td>
|
||||
<td><?php echo (common::hasPriv('testcase', 'bugs') and $case->bugs) ? html::a(inlink('bugs', "runID=0&caseID={$case->id}"), $case->bugs, '', "class='iframe'") : $case->bugs;?></td>
|
||||
<td><?php echo (common::hasPriv('testtask', 'results') and $case->results) ? html::a($this->createLink('testtask', 'results', "runID=0&caseID={$case->id}"), $case->results, '', "class='iframe'") : $case->results;?></td>
|
||||
<td><?php echo $case->stepNumber;?></td>
|
||||
<td><?php echo (common::hasPriv('testtask', 'results') and $case->executions) ? html::a($this->createLink('testtask', 'results', "runID=0&caseID={$case->id}"), $case->executions, '', "class='iframe'") : $case->executions;?></td>
|
||||
<td><?php echo $case->steps;?></td>
|
||||
<td class='c-actions'>
|
||||
<?php common::printIcon('testcase', 'edit', "caseID=$case->id", $case, 'list');?>
|
||||
<?php common::printIcon('testcase', 'delete', "caseID=$case->id", $case, 'list', 'trash', 'hiddenwin');?>
|
||||
|
||||
@@ -236,7 +236,7 @@ class testsuiteModel extends model
|
||||
if(!$append) return $cases;
|
||||
|
||||
$this->loadModel('common')->saveQueryCondition($this->dao->get(), 'testcase', false);
|
||||
return $this->loadModel('testcase')->appendData($cases);
|
||||
return $cases;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -394,7 +394,6 @@ class testtask extends control
|
||||
$this->loadModel('common')->saveQueryCondition($this->dao->get(), 'testcase', false);
|
||||
|
||||
$cases = array();
|
||||
$runs = $this->loadModel('testcase')->appendData($runs, 'testrun');
|
||||
foreach($runs as $run) $cases[$run->case] = $run;
|
||||
|
||||
$results = $this->dao->select('*')->from(TABLE_TESTRESULT)->where('`case`')->in(array_keys($cases))->andWhere('run')->in(array_keys($runs))->fetchAll('run');
|
||||
@@ -552,9 +551,6 @@ class testtask extends control
|
||||
unset($this->config->testcase->search['params']['branch']);
|
||||
$this->loadModel('search')->setSearchParams($this->config->testcase->search);
|
||||
|
||||
/* Append bugs and results. */
|
||||
$runs = $this->testcase->appendData($runs, 'run');
|
||||
|
||||
$case2RunMap = array();
|
||||
foreach($runs as $run) $case2RunMap[$run->case] = $run->id;
|
||||
|
||||
@@ -708,7 +704,6 @@ class testtask extends control
|
||||
|
||||
$runs = $this->testtask->getRuns($taskID, 0, $groupBy);
|
||||
$this->loadModel('common')->saveQueryCondition($this->dao->get(), 'testcase', false);
|
||||
$runs = $this->testcase->appendData($runs, 'run');
|
||||
$groupCases = array();
|
||||
$groupByList = array();
|
||||
foreach($runs as $run)
|
||||
|
||||
@@ -1735,6 +1735,7 @@ class testtaskModel extends model
|
||||
echo $run->stepNumber;
|
||||
break;
|
||||
case 'actions':
|
||||
$run->fails = $run->taskFails;
|
||||
common::printIcon('testcase', 'createBug', "product=$run->product&branch=$run->branch&extra=executionID=$task->execution,buildID=$task->build,caseID=$run->case,version=$run->version,runID=$run->id,testtask=$task->id", $run, 'list', 'bug', '', 'iframe', '', "data-width='90%'");
|
||||
|
||||
common::printIcon('testtask', 'runCase', "id=$run->id", $run, 'list', 'play', '', 'runCase iframe', false, "data-width='95%'");
|
||||
|
||||
@@ -72,9 +72,9 @@
|
||||
<td><?php if(!helper::isZeroDate($run->lastRunDate)) echo date(DT_MONTHTIME1, strtotime($run->lastRunDate));?></td>
|
||||
<td class='<?php echo $run->lastRunResult;?>'><?php if($run->lastRunResult) echo $lang->testcase->resultList[$run->lastRunResult];?></td>
|
||||
<td class='<?php echo $run->status;?>'><?php echo $this->processStatus('testcase', $run);?></td>
|
||||
<td><?php echo (common::hasPriv('testcase', 'bugs') and $run->bugs) ? html::a($this->createLink('testcase', 'bugs', "runID={$run->id}&caseID={$run->case}"), $run->bugs, '', "class='iframe'") : $run->bugs;?></td>
|
||||
<td><?php echo (common::hasPriv('testtask', 'results') and $run->results) ? html::a($this->createLink('testtask', 'results', "runID={$run->id}&caseID={$run->case}"), $run->results, '', "class='iframe'") : $run->results;?></td>
|
||||
<td><?php echo $run->stepNumber;?></td>
|
||||
<td><?php echo (common::hasPriv('testcase', 'bugs') and $run->taskBugs) ? html::a($this->createLink('testcase', 'bugs', "runID={$run->id}&caseID={$run->case}"), $run->taskBugs, '', "class='iframe'") : $run->taskBugs;?></td>
|
||||
<td><?php echo (common::hasPriv('testtask', 'results') and $run->taskExecutions) ? html::a($this->createLink('testtask', 'results', "runID={$run->id}&caseID={$run->case}"), $run->taskExecutions, '', "class='iframe'") : $run->taskExecutions;?></td>
|
||||
<td><?php echo $run->taskSteps;?></td>
|
||||
<td class='c-actions'>
|
||||
<?php if($canBeChanged):?>
|
||||
<?php common::printIcon('testtask', 'runCase', "runID=$run->id&caseID=$run->case&version=$run->version", '', 'list', 'play', '', 'runCase iframe', false, "data-width='95%'");?>
|
||||
|
||||
@@ -881,6 +881,15 @@ class upgrade extends control
|
||||
return $this->display('upgrade', 'execute');
|
||||
}
|
||||
|
||||
if(empty($this->config->global->processCaseRecord))
|
||||
{
|
||||
$total = $this->dao->select("count(*) as total")->from(TABLE_CASE)->fetch('total');
|
||||
|
||||
$this->view->total = $total;
|
||||
$this->view->fromVersion = $fromVersion;
|
||||
return $this->display('upgrade', 'processcase');
|
||||
}
|
||||
|
||||
unset($_SESSION['user']);
|
||||
|
||||
if($processed == 'no')
|
||||
@@ -1062,4 +1071,146 @@ class upgrade extends control
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* Process use case data from older versions of the system.
|
||||
*
|
||||
* @param int $begin
|
||||
* @param int $end
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public function processCase($begin = 0, $end = 100)
|
||||
{
|
||||
$result = array('result' => 'pending', 'message' => '', 'next' => '');
|
||||
|
||||
$total = $this->dao->select("count(*) as total")->from(TABLE_CASE)->fetch('total');
|
||||
$cases = $this->dao->select("id,bugs,executions,fails,steps")->from(TABLE_CASE)->orderBy('id')->limit("$begin,$end")->fetchAll('id');
|
||||
if(empty($cases))
|
||||
{
|
||||
$result['result'] = 'finish';
|
||||
$result['message'] = $this->lang->upgrade->processCaseFinish;
|
||||
$result = json_encode($result);
|
||||
|
||||
$this->loadModel('setting')->setItem('system.common.global.processCaseRecord', '1');
|
||||
return print($result);
|
||||
}
|
||||
|
||||
$caseIdList = array_keys($cases);
|
||||
$cases = $this->appendCaseData($cases, $caseIdList);
|
||||
foreach($cases as $case)
|
||||
{
|
||||
$this->dao->update(TABLE_CASE)
|
||||
->set('bugs')->eq($case->bugs)
|
||||
->set('executions')->eq($case->executions)
|
||||
->set('fails')->eq($case->fails)
|
||||
->set('steps')->eq($case->steps)
|
||||
->where('id')->eq($case->id)
|
||||
->exec();
|
||||
}
|
||||
|
||||
/* Update the use case associated with the test task. */
|
||||
$taskcaseList = $this->dao->select('id,taskBugs,taskSteps,taskExecutions,taskFails')->from(TABLE_TESTRUN)->where('`case`')->in($caseIdList)->fetchAll('id');
|
||||
$testRunIdList = array_keys($taskcaseList);
|
||||
$taskcaseList = $this->appendTaskCaseData($taskcaseList, $testRunIdList);
|
||||
foreach($taskcaseList as $testcase)
|
||||
{
|
||||
$this->dao->update(TABLE_TESTRUN)
|
||||
->set('taskBugs')->eq($testcase->taskBugs)
|
||||
->set('taskExecutions')->eq($testcase->taskExecutions)
|
||||
->set('taskFails')->eq($testcase->taskFails)
|
||||
->set('taskSteps')->eq($testcase->taskSteps)
|
||||
->where('id')->eq($testcase->id)
|
||||
->exec();
|
||||
}
|
||||
|
||||
$total = $total - $end;
|
||||
$total = $total < 0 ? 0 : $total;
|
||||
$begin += 100;
|
||||
|
||||
$result['next'] = $this->createLink('upgrade', 'processCase', "begin=$begin&end=100");
|
||||
$result['message'] = sprintf($this->lang->upgrade->processCaseNumber, count($cases), $total);
|
||||
|
||||
$result = json_encode($result);
|
||||
return print($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* Append bugs, executions, fails and steps fields.
|
||||
*
|
||||
* @param int $cases
|
||||
* @param array $caseIdList
|
||||
* @access public
|
||||
* @return object
|
||||
*/
|
||||
public function appendCaseData($cases, $caseIdList = array())
|
||||
{
|
||||
$bugs = $this->dao->select('count(*) as count, `case`')->from(TABLE_BUG)->where('`case`')->in($caseIdList)->andWhere('deleted')->eq(0)->groupBy('`case`')->fetchPairs('case', 'count');
|
||||
$executions = $this->dao->select('count(*) as count, `case`')->from(TABLE_TESTRESULT)->where('`case`')->in($caseIdList)->groupBy('`case`')->fetchPairs('case', 'count');
|
||||
|
||||
$fails = $this->dao->select('count(*) as count, `case`')->from(TABLE_TESTRESULT)
|
||||
->where('caseResult')->eq('fail')
|
||||
->andwhere('`case`')->in($caseIdList)
|
||||
->groupBy('`case`')
|
||||
->fetchPairs('case','count');
|
||||
|
||||
$steps = $this->dao->select('count(distinct t1.id) as count, t1.`case`')->from(TABLE_CASESTEP)->alias('t1')
|
||||
->leftJoin(TABLE_CASE)->alias('t2')->on('t1.`case`=t2.`id`')
|
||||
->where('t1.`case`')->in($caseIdList)
|
||||
->andWhere('t1.type')->ne('group')
|
||||
->andWhere('t1.version=t2.version')
|
||||
->groupBy('t1.`case`')
|
||||
->fetchPairs('case', 'count');
|
||||
|
||||
foreach($cases as $key => $case)
|
||||
{
|
||||
$caseID = $case->id;
|
||||
|
||||
$case->bugs = isset($bugs[$caseID]) ? $bugs[$caseID] : 0;
|
||||
$case->executions = isset($executions[$caseID]) ? $executions[$caseID] : 0;
|
||||
$case->fails = isset($fails[$caseID]) ? $fails[$caseID] : 0;
|
||||
$case->steps = isset($steps[$caseID]) ? $steps[$caseID] : 0;
|
||||
}
|
||||
|
||||
return $cases;
|
||||
}
|
||||
|
||||
/**
|
||||
* Append taskBugs, taskExecutions, taskFails and taskSteps fields.
|
||||
*
|
||||
* @param int $cases
|
||||
* @param array $caseIdList
|
||||
* @access public
|
||||
* @return object
|
||||
*/
|
||||
public function appendTaskCaseData($cases, $caseIdList = array())
|
||||
{
|
||||
$bugs = $this->dao->select('count(*) as count, `result`')->from(TABLE_BUG)->where('`result`')->in($caseIdList)->andWhere('deleted')->eq(0)->groupBy('`result`')->fetchPairs('result', 'count');
|
||||
$executions = $this->dao->select('count(*) as count, `run`')->from(TABLE_TESTRESULT)->where('`run`')->in($caseIdList)->groupBy('`run`')->fetchPairs('run', 'count');
|
||||
|
||||
$fails = $this->dao->select('count(*) as count, `run`')->from(TABLE_TESTRESULT)
|
||||
->where('caseResult')->eq('fail')
|
||||
->andwhere('`run`')->in($caseIdList)
|
||||
->groupBy('`run`')
|
||||
->fetchPairs('run','count');
|
||||
|
||||
$steps = $this->dao->select('count(distinct t1.id) as count, t2.`id` as run')->from(TABLE_CASESTEP)->alias('t1')
|
||||
->leftJoin(TABLE_TESTRUN)->alias('t2')->on('t1.`case`=t2.`case`')
|
||||
->where('t2.`id`')->in($caseIdList)
|
||||
->andWhere('t1.type')->ne('group')
|
||||
->andWhere('t1.version=t2.version')
|
||||
->groupBy('t1.`case`')
|
||||
->fetchPairs('run', 'count');
|
||||
|
||||
foreach($cases as $key => $case)
|
||||
{
|
||||
$caseID = $case->id;
|
||||
$case->taskBugs = isset($bugs[$caseID]) ? $bugs[$caseID] : 0;
|
||||
$case->taskExecutions = isset($executions[$caseID]) ? $executions[$caseID] : 0;
|
||||
$case->taskFails = isset($fails[$caseID]) ? $fails[$caseID] : 0;
|
||||
$case->taskSteps = isset($steps[$caseID]) ? $steps[$caseID] : 0;
|
||||
}
|
||||
|
||||
return $cases;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
.form-group {max-height: 425px; overflow-y: auto;}
|
||||
@@ -0,0 +1,24 @@
|
||||
$(document).ready(function()
|
||||
{
|
||||
$('#execButton').click(function()
|
||||
{
|
||||
$('#execButton').attr('disabled', true);
|
||||
|
||||
$.getJSON($(this).attr('href'), function(response)
|
||||
{
|
||||
if(response.result == 'finish')
|
||||
{
|
||||
$('#resultBox').append("<li class='text-success'>" + response.message + "</li>");
|
||||
$('#nextButton').removeClass('hidden');
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#execButton').attr('href', response.next);
|
||||
$('#resultBox').append("<li class='text-success'>" + response.message + "</li>");
|
||||
return $('#execButton').click();
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
})
|
||||
@@ -148,6 +148,10 @@ $lang->upgrade->mergeProjectTip = "历史的{$lang->projectCommon}将直接同
|
||||
$lang->upgrade->mergeExecutionTip = "系统将自动按年创建项目,将历史的{$lang->projectCommon}数据按照年份归并到对应的项目下。";
|
||||
$lang->upgrade->createProgramTip = "同时系统将自动创建一个默认的项目集,将所有的{$lang->projectCommon}都放在默认的项目集下。";
|
||||
$lang->upgrade->mergeManuallyTip = '可以手工选择数据归并的方式。';
|
||||
$lang->upgrade->processCaseTitle = '旧版本中的%s条用例数据需要进行升级';
|
||||
$lang->upgrade->processCaseFinish = '用例数据升级成功';
|
||||
$lang->upgrade->processCaseNumber = '成功升级%s条用例数据, 剩余%s条用例数据需要升级';
|
||||
$lang->upgrade->processCaseTip = '点击确认执行按钮,进行用例数据升级。';
|
||||
|
||||
$lang->upgrade->defaultGroup = '默认分组';
|
||||
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
/**
|
||||
* The html template file of execute method of upgrade module of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2015 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.cnezsoft.com)
|
||||
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package upgrade
|
||||
* @version $Id: execute.html.php 5119 2013-07-12 08:06:42Z wyd621@gmail.com $
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.lite.html.php';?>
|
||||
<div class='container'>
|
||||
<div class='modal-dialog'>
|
||||
<div class='modal-header'>
|
||||
<i class="icon-refresh"></i>
|
||||
<strong><?php echo sprintf($lang->upgrade->processCaseTitle, $total);?></strong>
|
||||
</div>
|
||||
<div class='modal-body'>
|
||||
<div>
|
||||
<div class='form-group'>
|
||||
<ul id='resultBox'>
|
||||
<li class="text-info"><?php echo $lang->upgrade->processCaseTip;?></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='modal-footer'>
|
||||
<div class='from-group'>
|
||||
<?php echo html::a($this->createLink('upgrade', 'processCase'), $lang->upgrade->sureExecute, '', "class='btn btn-primary' id='execButton'");?>
|
||||
<?php echo html::a($this->createLink('upgrade', 'afterExec', "fromVersion=$fromVersion"), $lang->upgrade->next, '', "class='btn btn-primary hidden' id='nextButton'");?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.lite.html.php';?>
|
||||
Reference in New Issue
Block a user