+ finish task#558

This commit is contained in:
chencongzhi520@gmail.com
2011-10-16 06:02:06 +00:00
parent 6bca18807b
commit 13d1bbebb1
8 changed files with 40 additions and 17 deletions

View File

@@ -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`;

View File

@@ -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';

View File

@@ -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;

View File

@@ -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 = '用例状态';

View File

@@ -41,6 +41,10 @@
<th class='rowhead'><?php echo $lang->testcase->title;?></th>
<td><?php echo html::input('title', $title, "class='text-1'");?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->testcase->precondition;?></th>
<td><?php echo html::textarea('precondition', $precondition, " rows='4' class='w-p100'");?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->testcase->steps;?></th>
<td>

View File

@@ -24,6 +24,10 @@
<tr valign='top'>
<td>
<table class='table-1'>
<fieldset>
<legend><?php echo $lang->testcase->precondition;?></legend>
<?php echo html::textarea('precondition', $case->precondition, "rows='4' class='w-p100'");?>
</fieldset>
<tr class='colhead'>
<th class='w-30px'><?php echo $lang->testcase->stepID;?></th>
<th><?php echo $lang->testcase->stepDesc;?></th>

View File

@@ -12,6 +12,10 @@
?>
<?php include '../../common/view/header.lite.html.php';?>
<h1>CASE#<?php echo $run->case->id. $lang->colon . $run->case->title;?></h1>
<fieldset>
<legend><?php echo $lang->testcase->precondition;?></legend>
<?php echo $run->case->precondition;?>
</fieldset>
<?php foreach($results as $result):?>
<table class='table-1'>
<caption>RESULT#<?php echo $result->id . ' ' . $result->date . " <span class='$result->caseResult'>" . $lang->testcase->resultList[$result->caseResult] . '</span>';?></caption>

View File

@@ -14,6 +14,10 @@
<form method='post'>
<table class='table-1'>
<caption class='caption-tl'>CASE#<?php echo $run->case->id. $lang->colon . $run->case->title;?></caption>
<fieldset>
<legend><?php echo $lang->testcase->precondition;?></legend>
<?php echo $run->case->precondition;?>
</fieldset>
<tr class='colhead'>
<th class='w-30px'><?php echo $lang->testcase->stepID;?></th>
<th class='w-p40'><?php echo $lang->testcase->stepDesc;?></th>