* finish task#1439.

This commit is contained in:
azhi
2013-07-17 09:12:04 +08:00
parent 2a3c6b09c3
commit 6c92b0ec48
29 changed files with 89 additions and 51 deletions
+8 -3
View File
@@ -38,9 +38,14 @@ $config->bug->list->exportFields = 'id, product, module, project, story, task,
lastEditedDate, files';
$config->bug->editor = new stdclass();
$config->bug->editor->create = array('id' => 'steps', 'tools' => 'bugTools');
$config->bug->editor->edit = array('id' => 'steps,comment', 'tools' => 'bugTools');
$config->bug->editor->view = array('id' => 'comment', 'tools' => 'bugTools');
$config->bug->editor->create = array('id' => 'steps', 'tools' => 'bugTools');
$config->bug->editor->edit = array('id' => 'steps,comment', 'tools' => 'bugTools');
$config->bug->editor->view = array('id' => 'comment', 'tools' => 'bugTools');
$config->bug->editor->confirmbug = array('id' => 'comment', 'tools' => 'bugTools');
$config->bug->editor->assignto = array('id' => 'comment', 'tools' => 'bugTools');
$config->bug->editor->resolve = array('id' => 'comment', 'tools' => 'bugTools');
$config->bug->editor->close = array('id' => 'comment', 'tools' => 'bugTools');
$config->bug->editor->activate = array('id' => 'comment', 'tools' => 'bugTools');
global $lang;
$config->bug->search['module'] = 'bug';
+3 -2
View File
@@ -6,11 +6,12 @@
* @license LGPL (http://www.gnu.org/licenses/lgpl.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package bug
* @version $Id$
* @version $Id: activate.html.php 4129 2013-01-18 01:58:14Z wwccss $
* @link http://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/kindeditor.html.php';?>
<form method='post' enctype='multipart/form-data' target='hiddenwin'>
<table class='table-1'>
<caption><?php echo $bug->title;?></caption>
@@ -24,7 +25,7 @@
</tr>
<tr>
<td class='rowhead'><?php echo $lang->comment;?></td>
<td><?php echo html::textarea('comment', '', "rows='6' class='area-1'");?></td>
<td><?php echo html::textarea('comment', '', "rows='6' class='w-p98'");?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->bug->files;?></th>
+2 -1
View File
@@ -12,6 +12,7 @@
?>
<?php
include '../../common/view/header.html.php';
include '../../common/view/kindeditor.html.php';
include '../../common/view/autocomplete.html.php';
js::set('holders', $lang->bug->placeholder);
js::set('userList', array_keys($users));
@@ -30,7 +31,7 @@ js::set('page', 'assignedto');
</tr>
<tr>
<td class='rowhead'><?php echo $lang->comment;?></td>
<td><?php echo html::textarea('comment', '', "rows='6' class='area-1'");?></td>
<td><?php echo html::textarea('comment', '', "rows='6' class='w-p98'");?></td>
</tr>
<tr>
<td colspan='2' class='a-center'><?php echo html::submitButton() . html::linkButton($lang->goback, $this->server->http_referer);?></td>
+3 -2
View File
@@ -6,17 +6,18 @@
* @license LGPL (http://www.gnu.org/licenses/lgpl.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package bug
* @version $Id$
* @version $Id: close.html.php 4129 2013-01-18 01:58:14Z wwccss $
* @link http://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/kindeditor.html.php';?>
<form method='post' target='hiddenwin'>
<table class='table-1'>
<caption><?php echo $bug->title;?></caption>
<tr>
<td class='rowhead'><?php echo $lang->comment;?></td>
<td><?php echo html::textarea('comment', '', "rows='6' class='area-1'");?></td>
<td><?php echo html::textarea('comment', '', "rows='6' class='w-p98'");?></td>
</tr>
<tr>
<td colspan='2' class='a-center'>
+2 -1
View File
@@ -12,6 +12,7 @@
?>
<?php
include '../../common/view/header.html.php';
include '../../common/view/kindeditor.html.php';
include '../../common/view/autocomplete.html.php';
js::set('holders', $lang->bug->placeholder);
js::set('userList', array_keys($users));
@@ -31,7 +32,7 @@ js::set('page', 'confirmbug');
</tr>
<tr>
<td class='rowhead'><?php echo $lang->comment;?></td>
<td><?php echo html::textarea('comment', '', "rows='6' class='area-1'");?></td>
<td><?php echo html::textarea('comment', '', "rows='6' class='w-p98'");?></td>
</tr>
<tr>
<td colspan='2' class='a-center'>
+3 -2
View File
@@ -6,11 +6,12 @@
* @license LGPL (http://www.gnu.org/licenses/lgpl.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package bug
* @version $Id$
* @version $Id: resolve.html.php 4129 2013-01-18 01:58:14Z wwccss $
* @link http://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/kindeditor.html.php';?>
<form method='post' target='hiddenwin'>
<table class='table-1'>
<caption><?php echo $bug->title;?></caption>
@@ -36,7 +37,7 @@
</tr>
<tr>
<td class='rowhead'><?php echo $lang->comment;?></td>
<td><?php echo html::textarea('comment', '', "rows='6' class='area-1'");?></td>
<td><?php echo html::textarea('comment', '', "rows='6' class='w-p98'");?></td>
</tr>
<tr>
<td colspan='2' class='a-center'>
+1 -1
View File
@@ -14,7 +14,7 @@ $config->doc->edit->requiredFields = 'title';
$config->doc->editor = new stdclass();
$config->doc->editor->create = array('id' => 'content', 'tools' => 'fullTools');
$config->doc->editor->edit = array('id' => 'content,comment', 'tools' => 'fullTools');
$config->doc->editor->edit = array('id' => 'content,digest,comment', 'tools' => 'fullTools');
$config->doc->search['module'] = 'doc';
$config->doc->search['fields']['title'] = $lang->doc->title;
+1
View File
@@ -76,3 +76,4 @@ $config->product->edit->requiredFields = 'name,code';
$config->product->editor = new stdclass();
$config->product->editor->create = array('id' => 'desc', 'tools' => 'simpleTools');
$config->product->editor->edit = array('id' => 'desc', 'tools' => 'simpleTools');
$config->product->editor->close = array('id' => 'comment', 'tools' => 'simpleTools');
+1
View File
@@ -11,6 +11,7 @@
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/kindeditor.html.php';?>
<form method='post' target='hiddenwin'>
<table class='table-1'>
<caption><?php echo $product->name;?></caption>
+3
View File
@@ -14,6 +14,9 @@ $config->project->edit->requiredFields = 'name,code,begin,end';
$config->project->editor = new stdclass();
$config->project->editor->create = array('id' => 'desc,goal', 'tools' => 'simpleTools');
$config->project->editor->edit = array('id' => 'desc,goal', 'tools' => 'simpleTools');
$config->project->editor->putoff = array('id' => 'comment', 'tools' => 'simpleTools');
$config->project->editor->close = array('id' => 'comment', 'tools' => 'simpleTools');
$config->project->editor->suspend = array('id' => 'comment', 'tools' => 'simpleTools');
$config->project->search['module'] = 'task';
$config->project->search['fields']['name'] = $lang->task->name;
+1
View File
@@ -11,6 +11,7 @@
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/kindeditor.html.php';?>
<form method='post' target='hiddenwin'>
<table class='table-1'>
<caption><?php echo $project->name;?></caption>
+1
View File
@@ -11,6 +11,7 @@
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/kindeditor.html.php';?>
<?php include '../../common/view/datepicker.html.php';?>
<?php js::import($jsRoot . 'misc/date.js');?>
<form method='post' target='hiddenwin'>
+1
View File
@@ -11,6 +11,7 @@
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/kindeditor.html.php';?>
<form method='post' target='hiddenwin'>
<table class='table-1'>
<caption><?php echo $project->name;?></caption>
+2
View File
@@ -26,6 +26,8 @@ $config->story->editor->create = array('id' => 'spec,verify', 'tools' => 'simple
$config->story->editor->change = array('id' => 'spec,verify,comment', 'tools' => 'simpleTools');
$config->story->editor->edit = array('id' => 'comment', 'tools' => 'simpleTools');
$config->story->editor->view = array('id' => 'comment', 'tools' => 'simpleTools');
$config->story->editor->close = array('id' => 'comment', 'tools' => 'simpleTools');
$config->story->editor->review = array('id' => 'comment', 'tools' => 'simpleTools');
$config->story->list = new stdclass();
$config->story->list->exportFields = '
+2 -2
View File
@@ -6,7 +6,7 @@
* @license LGPL (http://www.gnu.org/licenses/lgpl.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package story
* @version $Id$
* @version $Id: control.php 5145 2013-07-15 06:47:26Z chencongzhi520@gmail.com $
* @link http://www.zentao.net
*/
class story extends control
@@ -645,7 +645,7 @@ class story extends control
{
foreach($allChanges as $storyID => $changes)
{
$actionID = $this->action->create('story', $storyID, 'Closed', $this->post->comments[$storyID], ucfirst($this->post->closedReasons[$storyID]));
$actionID = $this->action->create('story', $storyID, 'Closed', htmlspecialchars($this->post->comments[$storyID]), ucfirst($this->post->closedReasons[$storyID]));
$this->action->logHistory($actionID);
$this->sendMail($storyID, $actionID);
}
+2 -2
View File
@@ -6,7 +6,7 @@
* @license LGPL (http://www.gnu.org/licenses/lgpl.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package story
* @version $Id$
* @version $Id: close.html.php 4129 2013-01-18 01:58:14Z wwccss $
* @link http://www.zentao.net
*/
?>
@@ -28,7 +28,7 @@
</tr>
<tr>
<th class='rowhead'><?php echo $lang->story->comment;?></th>
<td><?php echo html::textarea('comment', '', "rows='8' class='area-1'");?></td>
<td><?php echo html::textarea('comment', '', "rows='8' class='w-p98'");?></td>
</tr>
<tr>
<td colspan='2' class='a-center'>
+1
View File
@@ -1,5 +1,6 @@
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/autocomplete.html.php';?>
<?php include '../../common/view/kindeditor.html.php';?>
<?php if(isset($users)) js::set('userList', array_keys($users)); ?>
<script language='Javascript'>
function loadProduct(productID)
+9 -3
View File
@@ -18,9 +18,15 @@ $config->task->batchEdit = new stdclass();
$config->task->batchEdit->columns = 13;
$config->task->editor = new stdclass();
$config->task->editor->create = array('id' => 'desc', 'tools' => 'simpleTools');
$config->task->editor->edit = array('id' => 'desc,comment', 'tools' => 'simpleTools');
$config->task->editor->view = array('id' => 'comment', 'tools' => 'simpleTools');
$config->task->editor->create = array('id' => 'desc', 'tools' => 'simpleTools');
$config->task->editor->edit = array('id' => 'desc,comment', 'tools' => 'simpleTools');
$config->task->editor->view = array('id' => 'comment', 'tools' => 'simpleTools');
$config->task->editor->assignto = array('id' => 'comment', 'tools' => 'simpleTools');
$config->task->editor->start = array('id' => 'comment', 'tools' => 'simpleTools');
$config->task->editor->finish = array('id' => 'comment', 'tools' => 'simpleTools');
$config->task->editor->close = array('id' => 'comment', 'tools' => 'simpleTools');
$config->task->editor->activate = array('id' => 'comment', 'tools' => 'simpleTools');
$config->task->editor->cancel = array('id' => 'comment', 'tools' => 'simpleTools');
$config->task->exportFields = '
id, project, module, story,
+24 -24
View File
@@ -6,7 +6,7 @@
* @license LGPL (http://www.gnu.org/licenses/lgpl.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package task
* @version $Id$
* @version $Id: model.php 5154 2013-07-16 05:51:02Z chencongzhi520@gmail.com $
* @link http://www.zentao.net
*/
?>
@@ -274,15 +274,15 @@ class taskModel extends model
switch($task->status)
{
case 'done':
{
$task->left = 0;
if(!$task->finishedBy) $task->finishedBy = $this->app->user->account;
if($task->closedReason) $task->closedDate = $now;
$task->finishedDate = $oldTask->status == 'done' ? $oldTask->finishedDate : $now;
}
break;
case 'cancel':
case 'done':
{
$task->left = 0;
if(!$task->finishedBy) $task->finishedBy = $this->app->user->account;
if($task->closedReason) $task->closedDate = $now;
$task->finishedDate = $oldTask->status == 'done' ? $oldTask->finishedDate : $now;
}
break;
case 'cancel':
{
$task->assignedTo = $oldTask->openedBy;
$task->assignedDate = $now;
@@ -290,19 +290,19 @@ class taskModel extends model
if(!$task->canceledBy) $task->canceledBy = $this->app->user->account;
if(!$task->canceledDate) $task->canceledDate = $now;
}
break;
case 'closed':
{
if(!$task->closedBy) $task->closedBy = $this->app->user->account;
if(!$task->closedDate) $task->closedDate = $now;
}
break;
case 'wait':
{
if($task->consumed > 0 and $task->left > 0) $task->status = 'doing';
if($task->left == $oldTask->left and $task->consumed == 0) $task->left = $task->estimate;
}
default:break;
break;
case 'closed':
{
if(!$task->closedBy) $task->closedBy = $this->app->user->account;
if(!$task->closedDate) $task->closedDate = $now;
}
break;
case 'wait':
{
if($task->consumed > 0 and $task->left > 0) $task->status = 'doing';
if($task->left == $oldTask->left and $task->consumed == 0) $task->left = $task->estimate;
}
default:break;
}
if($task->assignedTo) $task->assignedDate = $now;
@@ -453,7 +453,7 @@ class taskModel extends model
{
$consumed += $estimate->consumed;
$left = $estimate->left;
$work = $estimate->work;
$work = htmlspecialchars($estimate->work);
$this->dao->insert(TABLE_TASKESTIMATE)->data($estimate)
->autoCheck()
->exec();
+2 -1
View File
@@ -11,6 +11,7 @@
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/kindeditor.html.php';?>
<form method='post' target='hiddenwin'>
<table class='table-1'>
<caption><?php echo $task->name;?></caption>
@@ -24,7 +25,7 @@
</tr>
<tr>
<td class='rowhead'><?php echo $lang->comment;?></td>
<td><?php echo html::textarea('comment', '', "rows='6' class='area-1'");?></td>
<td><?php echo html::textarea('comment', '', "rows='6' class='w-p98'");?></td>
</tr>
<tr>
<td colspan='2' class='a-center'>
+2 -1
View File
@@ -11,6 +11,7 @@
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/kindeditor.html.php';?>
<form method='post' target='hiddenwin'>
<table class='table-1'>
<caption><?php echo $task->name;?></caption>
@@ -24,7 +25,7 @@
</tr>
<tr>
<td class='rowhead'><?php echo $lang->comment;?></td>
<td><?php echo html::textarea('comment', '', "rows='6' class='area-1'");?></td>
<td><?php echo html::textarea('comment', '', "rows='6' class='w-p98'");?></td>
</tr>
<tr>
<td colspan='2' class='a-center'><?php echo html::submitButton();?></td>
+2 -1
View File
@@ -11,12 +11,13 @@
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/kindeditor.html.php';?>
<form method='post' target='hiddenwin'>
<table class='table-1'>
<caption><?php echo $task->name;?></caption>
<tr>
<td class='rowhead'><?php echo $lang->comment;?></td>
<td><?php echo html::textarea('comment', '', "rows='6' class='area-1'");?></td>
<td><?php echo html::textarea('comment', '', "rows='6' class='w-p98'");?></td>
</tr>
<tr><td colspan='2' class='a-center'><?php echo html::submitButton();?></td></tr>
</table>
+2 -1
View File
@@ -11,12 +11,13 @@
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/kindeditor.html.php';?>
<form method='post' target='hiddenwin'>
<table class='table-1'>
<caption><?php echo $task->name;?></caption>
<tr>
<td class='rowhead'><?php echo $lang->comment;?></td>
<td><?php echo html::textarea('comment', '', "rows='6' class='area-1'");?></td>
<td><?php echo html::textarea('comment', '', "rows='6' class='w-p98'");?></td>
</tr>
<tr>
<td colspan='2' class='a-center'><?php echo html::submitButton();?></td>
+2 -1
View File
@@ -11,6 +11,7 @@
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/kindeditor.html.php';?>
<form method='post' target='hiddenwin'>
<table class='table-1'>
<caption><?php echo $task->name;?></caption>
@@ -29,7 +30,7 @@
<tr>
<td class='rowhead'><?php echo $lang->comment;?></td>
<td><?php echo html::textarea('comment', '', "rows='6' class='area-1'");?></td>
<td><?php echo html::textarea('comment', '', "rows='6' class='w-p98'");?></td>
</tr>
<tr>
<td colspan='2' class='a-center'><?php echo html::submitButton();?></td>
+2 -1
View File
@@ -11,6 +11,7 @@
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/kindeditor.html.php';?>
<?php include '../../common/view/datepicker.html.php';?>
<?php js::set('confirmFinish', $lang->task->confirmFinish);?>
<form method='post' target='hiddenwin' onsubmit='return checkLeft();'>
@@ -30,7 +31,7 @@
</tr>
<tr>
<td class='rowhead'><?php echo $lang->comment;?></td>
<td><?php echo html::textarea('comment', '', "rows='6' class='area-1'");?></td>
<td><?php echo html::textarea('comment', '', "rows='6' class='w-p98'");?></td>
</tr>
<tr>
<td colspan='2' class='a-center'><?php echo html::submitButton(); ?></td>
+1
View File
@@ -8,4 +8,5 @@ $config->testtask->edit->requiredFields = 'project,build,begin,end,name';
$config->testtask->editor = new stdclass();
$config->testtask->editor->create = array('id' => 'desc', 'tools' => 'simpleTools');
$config->testtask->editor->edit = array('id' => 'desc,report', 'tools' => 'simpleTools');
$config->testtask->editor->start = array('id' => 'comment', 'tools' => 'simpleTools');
$config->testtask->editor->close = array('id' => 'report,comment', 'tools' => 'simpleTools');
+3 -1
View File
@@ -6,7 +6,7 @@
* @license LGPL (http://www.gnu.org/licenses/lgpl.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package testtask
* @version $Id$
* @version $Id: control.php 5114 2013-07-12 06:02:59Z chencongzhi520@gmail.com $
* @link http://www.zentao.net
*/
class testtask extends control
@@ -557,6 +557,8 @@ class testtask extends control
$this->view->run = $run;
$this->view->preCase = $preCase;
$this->view->nextCase = $nextCase;
$this->view->results = $this->testtask->getResults(0, $caseID);
$this->view->users = $this->loadModel('user')->getPairs('noclosed, noletter');
die($this->display());
}
+2 -1
View File
@@ -6,7 +6,7 @@
* @license LGPL (http://www.gnu.org/licenses/lgpl.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package testtask
* @version $Id$
* @version $Id: runcase.html.php 4723 2013-05-03 05:19:29Z chencongzhi520@gmail.com $
* @link http://www.zentao.net
*/
?>
@@ -58,4 +58,5 @@
</tr>
</table>
</form>
<?php $case = $run->case; include './results.html.php'; ?>
<?php include '../../common/view/footer.lite.html.php';?>
+1
View File
@@ -11,6 +11,7 @@
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/kindeditor.html.php';?>
<?php include '../../common/view/datepicker.html.php';?>
<form method='post' target='hiddenwin'>
<table class='table-1'>