* finish task #1662.
This commit is contained in:
@@ -353,7 +353,7 @@ class bug extends control
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$actions = $this->bug->batchCreate($productID);
|
||||
foreach($actions as $bugID => $action) $this->sendmail($bugID, $actionID);
|
||||
foreach($actions as $bugID => $actionID) $this->sendmail($bugID, $actionID);
|
||||
die(js::locate($this->session->bugList, 'parent'));
|
||||
}
|
||||
|
||||
@@ -377,7 +377,6 @@ class bug extends control
|
||||
$this->view->position[] = html::a($this->createLink('bug', 'browse', "productID=$productID"), $this->products[$productID]);
|
||||
$this->view->position[] = $this->lang->bug->batchCreate;
|
||||
|
||||
$this->view->projectBuilds = $projectBuilds;
|
||||
$this->view->productID = $productID;
|
||||
$this->view->stories = $stories;
|
||||
$this->view->builds = $builds;
|
||||
|
||||
@@ -286,6 +286,7 @@ class bugModel extends model
|
||||
{
|
||||
$oldBug = $this->getByID($bugID);
|
||||
|
||||
$bug = new stdclass();
|
||||
$bug->lastEditedBy = $this->app->user->account;
|
||||
$bug->lastEditedDate = $now;
|
||||
$bug->type = $this->post->types[$bugID];
|
||||
|
||||
@@ -113,6 +113,7 @@ class buildModel extends model
|
||||
*/
|
||||
public function create($projectID)
|
||||
{
|
||||
$build = new stdclass();
|
||||
$build->stories = '';
|
||||
$build->bugs = '';
|
||||
|
||||
@@ -169,16 +170,20 @@ class buildModel extends model
|
||||
*/
|
||||
public function updateLinkedBug($build)
|
||||
{
|
||||
$bugs = $this->dao->select('*')->from(TABLE_BUG)->where('id')->in($build->bugs)->fetchAll();
|
||||
$bugs = empty($build->bugs) ? '' : $this->dao->select('*')->from(TABLE_BUG)->where('id')->in($build->bugs)->fetchAll();
|
||||
$now = helper::now();
|
||||
|
||||
$resolvedPairs = array();
|
||||
if(isset($_POST['bugs']))
|
||||
{
|
||||
foreach($this->post->bugs as $key => $bugID)
|
||||
{
|
||||
if(isset($_POST['resolvedBy'][$key]))$resolvedPairs[$bugID] = $this->post->resolvedBy[$key];
|
||||
}
|
||||
}
|
||||
|
||||
$this->loadModel('action');
|
||||
if(!$bugs) return false;
|
||||
foreach($bugs as $bug)
|
||||
{
|
||||
if($bug->status == 'resolved') continue;
|
||||
|
||||
@@ -224,6 +224,7 @@ class groupModel extends model
|
||||
{
|
||||
foreach($moduleActions as $actionName)
|
||||
{
|
||||
$data = new stdclass();
|
||||
$data->group = $groupID;
|
||||
$data->module = $moduleName;
|
||||
$data->method = $actionName;
|
||||
@@ -244,6 +245,7 @@ class groupModel extends model
|
||||
{
|
||||
foreach($moduleActions as $actionName)
|
||||
{
|
||||
$data = new stdclass();
|
||||
$data->group = $groupID;
|
||||
$data->module = $moduleName;
|
||||
$data->method = $actionName;
|
||||
@@ -268,6 +270,7 @@ class groupModel extends model
|
||||
{
|
||||
foreach($this->post->groups as $group)
|
||||
{
|
||||
$data = new stdclass();
|
||||
$data->group = $group;
|
||||
$data->module = $this->post->module;
|
||||
$data->method = $action;
|
||||
@@ -293,6 +296,7 @@ class groupModel extends model
|
||||
if($this->post->members == false) return;
|
||||
foreach($this->post->members as $account)
|
||||
{
|
||||
$data = new stdclass();
|
||||
$data->account = $account;
|
||||
$data->group = $groupID;
|
||||
$this->dao->insert(TABLE_USERGROUP)->data($data)->exec();
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
<td><?php echo $users[$case->lastRunner];?></td>
|
||||
<td><?php if(!helper::isZeroDate($case->lastRunDate)) echo date(DT_MONTHTIME1, strtotime($case->lastRunDate));?></td>
|
||||
<td class='<?php echo $case->lastRunResult;?>'><?php if($case->lastRunResult) echo $lang->testcase->resultList[$case->lastRunResult];?></td>
|
||||
<td class='<?php echo $run->status;?>'><?php echo $lang->testcase->statusList[$case->status];?></td>
|
||||
<td class='<?php if(isset($run)) echo $run->status;?>'><?php echo $lang->testcase->statusList[$case->status];?></td>
|
||||
<td>
|
||||
<?php
|
||||
common::printIcon('testtask', 'runCase', "runID=0&caseID=$case->id&version=$case->version", '', 'list', '', '', 'iframe');
|
||||
|
||||
@@ -604,8 +604,9 @@ class productModel extends model
|
||||
}
|
||||
|
||||
$cases = $this->dao->select('DISTINCT story')->from(TABLE_CASE)->where('story')->in($storyIDs)->fetchAll();
|
||||
$rate = count($stories) == 0 ? 0 : round(count($cases) / count($stories), 2);
|
||||
|
||||
return sprintf($this->lang->product->storySummary, count($stories), $totalEstimate, round(count($cases) / count($stories), 2) * 100 . "%");
|
||||
return sprintf($this->lang->product->storySummary, count($stories), $totalEstimate, $rate * 100 . "%");
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
<?php include '../../common/view/treeview.html.php';?>
|
||||
<?php include './taskheader.html.php';?>
|
||||
<?php js::set('moduleID', $moduleID);?>
|
||||
<?php js::set('productID', $productID);?>
|
||||
<script language='Javascript'>
|
||||
var browseType = '<?php echo $browseType;?>';
|
||||
</script>
|
||||
|
||||
@@ -9,5 +9,6 @@
|
||||
* @version $Id: en.php 4129 2013-01-18 01:58:14Z wwccss $
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
$lang->qa = new stdclass();
|
||||
$lang->qa->common = 'Test';
|
||||
$lang->qa->index = "Index";
|
||||
|
||||
@@ -9,5 +9,6 @@
|
||||
* @version $Id: zh-cn.php 4129 2013-01-18 01:58:14Z wwccss $
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
$lang->qa = new stdclass();
|
||||
$lang->qa->common = '测试视图';
|
||||
$lang->qa->index = "测试首页";
|
||||
|
||||
@@ -98,7 +98,7 @@ class releaseModel extends model
|
||||
|
||||
$this->dao->insert(TABLE_RELEASE)->data($release)->autoCheck()->batchCheck($this->config->release->create->requiredFields, 'notempty')->check('name','unique')->exec();
|
||||
$releaseID = $this->dao->lastInsertID();
|
||||
$this->dao->update(TABLE_STORY)->set('stage')->eq('released')->where('id')->in($release->stories)->exec();
|
||||
if($release->stories) $this->dao->update(TABLE_STORY)->set('stage')->eq('released')->where('id')->in($release->stories)->exec();
|
||||
if(!dao::isError()) return $releaseID;
|
||||
}
|
||||
|
||||
|
||||
@@ -222,6 +222,7 @@ class storyModel extends model
|
||||
$storyID = $this->dao->lastInsertID();
|
||||
$this->setStage($storyID);
|
||||
|
||||
$specData[$i] = new stdclass();
|
||||
$specData[$i]->story = $storyID;
|
||||
$specData[$i]->version = 1;
|
||||
$specData[$i]->title = htmlspecialchars($stories->title[$i]);
|
||||
@@ -230,6 +231,7 @@ class storyModel extends model
|
||||
|
||||
$this->loadModel('action');
|
||||
$actionID = $this->action->create('story', $storyID, 'Opened', '');
|
||||
$mails[$i] = new stdclass();
|
||||
$mails[$i]->storyID = $storyID;
|
||||
$mails[$i]->actionID = $actionID;
|
||||
}
|
||||
|
||||
@@ -616,6 +616,7 @@ class task extends control
|
||||
$this->action->logHistory($actionID, $changes);
|
||||
$this->sendmail($taskID, $actionID);
|
||||
}
|
||||
if(isonlybody()) die(js::closeColorbox('parent.parent'));
|
||||
die(js::locate($this->createLink('task', 'view', "taskID=$taskID"), 'parent'));
|
||||
}
|
||||
|
||||
|
||||
@@ -238,6 +238,7 @@ class taskModel extends model
|
||||
{
|
||||
$oldTask = $this->getById($taskID);
|
||||
|
||||
$task = new stdclass();
|
||||
$task->name = htmlspecialchars($this->post->names[$taskID]);
|
||||
$task->module = isset($this->post->modules[$taskID]) ? $this->post->modules[$taskID] : 0;
|
||||
$task->type = $this->post->types[$taskID];
|
||||
@@ -438,6 +439,7 @@ class taskModel extends model
|
||||
{
|
||||
if(!$record->consumed[$id]) die(js::alert($this->lang->task->error->consumedThisTime));
|
||||
if($record->left[$id] === '') die(js::alert($this->lang->task->error->left));
|
||||
$estimates[$id] = new stdclass();
|
||||
$estimates[$id]->date = $record->dates[$id];
|
||||
$estimates[$id]->task = $taskID;
|
||||
$estimates[$id]->consumed = $record->consumed[$id];
|
||||
|
||||
@@ -285,14 +285,15 @@ class testcaseModel extends model
|
||||
/* Initialize cases from the post data.*/
|
||||
foreach($caseIDList as $caseID)
|
||||
{
|
||||
$case = new stdclass();
|
||||
$case->lastEditedBy = $this->app->user->account;
|
||||
$caee->lastEditedDate = $now;
|
||||
$case->lastEditedDate = $now;
|
||||
$case->pri = $this->post->pris[$caseID];
|
||||
$case->status = $this->post->statuses[$caseID];
|
||||
$case->module = $this->post->modules[$caseID];
|
||||
$case->title = htmlspecialchars($this->post->titles[$caseID]);
|
||||
$case->type = $this->post->types[$caseID];
|
||||
$case->stage = implode(',', $this->post->stages[$caseID]);
|
||||
$case->stage = empty($this->post->stages[$caseID]) ? '' : implode(',', $this->post->stages[$caseID]);
|
||||
|
||||
$cases[$caseID] = $case;
|
||||
unset($case);
|
||||
|
||||
@@ -35,9 +35,9 @@
|
||||
?>
|
||||
<tr>
|
||||
<th><?php echo $i;?></th>
|
||||
<td><?php echo nl2br($stepResult['desc']);?></td>
|
||||
<td><?php echo nl2br($stepResult['expect']);?></td>
|
||||
<?php if(!empty($result->stepResults)):?>
|
||||
<td><?php if(isset($stepResult['desc'])) echo nl2br($stepResult['desc']);?></td>
|
||||
<td><?php if(isset($stepResult['expect'])) echo nl2br($stepResult['expect']);?></td>
|
||||
<?php if(!empty($stepResult['result'])):?>
|
||||
<td class='<?php echo $stepResult['result'];?> a-center'><?php echo $lang->testcase->resultList[$stepResult['result']];?></td>
|
||||
<td><?php echo $stepResult['real'];?></td>
|
||||
</tr>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php include '../../common/view/kindeditor.html.php';?>
|
||||
<div id='titlebar'>
|
||||
<div id='main' <?php if($task->deleted) echo "class='deleted'";?>>TESTTASK #<?php echo $task->id . ' ' . $task->title;?></div>
|
||||
<div id='main' <?php if($task->deleted) echo "class='deleted'";?>>TESTTASK #<?php echo $task->id . ' ' . $task->name;?></div>
|
||||
<div>
|
||||
<?php
|
||||
$browseLink = $this->session->testtaskList ? $this->session->testtaskList : $this->createLink('testtask', 'browse', "productID=$task->product");
|
||||
|
||||
@@ -59,7 +59,7 @@ class todo extends control
|
||||
$this->view->position[] = $this->lang->todo->common;
|
||||
$this->view->position[] = $this->lang->todo->create;
|
||||
$this->view->date = strftime("%Y-%m-%d", strtotime($date));
|
||||
$this->view->time = date::buildTimeList($this->config->todo->times->begin, $this->config->todo->times->end, $this->config->todo->times->delta);
|
||||
$this->view->times = date::buildTimeList($this->config->todo->times->begin, $this->config->todo->times->end, $this->config->todo->times->delta);
|
||||
$this->view->time = date::now();
|
||||
$this->display();
|
||||
}
|
||||
|
||||
@@ -329,6 +329,7 @@ class userModel extends model
|
||||
$this->dao->delete()->from(TABLE_USERGROUP)->where('account')->eq($oldUser->account)->exec();
|
||||
foreach($this->post->groups as $groupID)
|
||||
{
|
||||
$data = new stdclass();
|
||||
$data->account = $this->post->account;
|
||||
$data->group = $groupID;
|
||||
$this->dao->insert(TABLE_USERGROUP)->data($data)->exec();
|
||||
|
||||
Reference in New Issue
Block a user