diff --git a/db/update2.2.sql b/db/update2.2.sql index fe4520051a..0c7a22c31f 100644 --- a/db/update2.2.sql +++ b/db/update2.2.sql @@ -3,3 +3,6 @@ ALTER TABLE `zt_bug` ADD `activatedCount` SMALLINT( 6 ) NOT NULL AFTER `status` ALTER TABLE `zt_bug` CHANGE `status` `status` VARCHAR( 20 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ; ALTER TABLE `zt_bug` ADD `confirm` BOOL NOT NULL DEFAULT '0' AFTER `activatedCount` ; ALTER TABLE `zt_bug` ADD `confirmedBy` VARCHAR( 30 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL AFTER `closedDate` , ADD `confirmedDate` DATETIME NOT NULL AFTER `confirmedBy` ; + + -- 2011-10-16 add precondition field in zt_case +ALTER TABLE `zt_case` ADD `precondition` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL AFTER `title`; diff --git a/module/testcase/config.php b/module/testcase/config.php index a6ea67c830..ed039391a0 100644 --- a/module/testcase/config.php +++ b/module/testcase/config.php @@ -33,7 +33,7 @@ $config->testcase->edit->requiredFields = 'title,type'; $config->testcase->exportFields = ' id, product, module, story, - title, steps, keywords, + title, precondition, steps, keywords, pri, type, stage, status, frequency, openedBy, openedDate, lastEditedBy, lastEditedDate, version,linkCase'; diff --git a/module/testcase/control.php b/module/testcase/control.php index 1751a889ce..5418b71057 100644 --- a/module/testcase/control.php +++ b/module/testcase/control.php @@ -178,25 +178,27 @@ class testcase extends control $this->testcase->setMenu($this->products, $productID); /* Init vars. */ - $type = 'feature'; - $stage = ''; - $pri = 0; - $storyID = 0; - $title = ''; - $keywords = ''; - $steps = array(); + $type = 'feature'; + $stage = ''; + $pri = 0; + $storyID = 0; + $title = ''; + $precondition = ''; + $keywords = ''; + $steps = array(); if($testcaseID > 0) { - $testcase = $this->testcase->getById($testcaseID); - $productID = $testcase->product; - $type = $testcase->type ? $testcase->type : 'feature'; - $stage = $testcase->stage; - $pri = $testcase->pri; - $storyID = $testcase->story; - $title = $testcase->title; - $keywords = $testcase->keywords; - $steps = $testcase->steps; + $testcase = $this->testcase->getById($testcaseID); + $productID = $testcase->product; + $type = $testcase->type ? $testcase->type : 'feature'; + $stage = $testcase->stage; + $pri = $testcase->pri; + $storyID = $testcase->story; + $title = $testcase->title; + $precondition = $testcase->precondition; + $keywords = $testcase->keywords; + $steps = $testcase->steps; } /* Parse the extras. */ @@ -243,6 +245,7 @@ class testcase extends control $this->view->pri = $pri; $this->view->storyID = $storyID; $this->view->title = $title; + $this->view->precondition = $precondition; $this->view->keywords = $keywords; $this->view->steps = $steps; diff --git a/module/testcase/lang/zh-cn.php b/module/testcase/lang/zh-cn.php index b14392e409..426b235e95 100644 --- a/module/testcase/lang/zh-cn.php +++ b/module/testcase/lang/zh-cn.php @@ -15,6 +15,7 @@ $lang->testcase->module = '所属模块'; $lang->testcase->story = '相关需求'; $lang->testcase->storyVersion = '需求版本'; $lang->testcase->title = '用例标题'; +$lang->testcase->precondition = '前置条件'; $lang->testcase->pri = '优先级'; $lang->testcase->type = '用例类型'; $lang->testcase->status = '用例状态'; diff --git a/module/testcase/view/create.html.php b/module/testcase/view/create.html.php index d5e8898379..f89c0c75f2 100644 --- a/module/testcase/view/create.html.php +++ b/module/testcase/view/create.html.php @@ -41,6 +41,10 @@ testcase->title;?> + + testcase->precondition;?> + + testcase->steps;?> diff --git a/module/testcase/view/edit.html.php b/module/testcase/view/edit.html.php index 6f84d9f6d4..8f655b6b23 100644 --- a/module/testcase/view/edit.html.php +++ b/module/testcase/view/edit.html.php @@ -24,6 +24,10 @@ +
+ testcase->precondition;?> + precondition, "rows='4' class='w-p100'");?> +
diff --git a/module/testtask/view/results.html.php b/module/testtask/view/results.html.php index 250085c1c3..3d7801aa8a 100644 --- a/module/testtask/view/results.html.php +++ b/module/testtask/view/results.html.php @@ -12,6 +12,10 @@ ?>

CASE#case->id. $lang->colon . $run->case->title;?>

+
+ testcase->precondition;?> + case->precondition;?> +
testcase->stepID;?> testcase->stepDesc;?>
diff --git a/module/testtask/view/runcase.html.php b/module/testtask/view/runcase.html.php index 7cf309c1b2..f47ca97a40 100644 --- a/module/testtask/view/runcase.html.php +++ b/module/testtask/view/runcase.html.php @@ -14,6 +14,10 @@
RESULT#id . ' ' . $result->date . " " . $lang->testcase->resultList[$result->caseResult] . '';?>
+
+ testcase->precondition;?> + case->precondition;?> +
CASE#case->id. $lang->colon . $run->case->title;?>
testcase->stepID;?> testcase->stepDesc;?>