Merge branch 'master' of github.com:easysoft/zentaopms
This commit is contained in:
@@ -129,6 +129,12 @@ $lang->action->desc->diff2 = '修改了 <strong><i>%s</i></strong>,
|
||||
$lang->action->desc->diff3 = '将文件名 %s 改为 %s 。' . "\n";
|
||||
$lang->action->desc->linked2bug = '$date 由 <strong>$actor</strong> 关联到版本 <strong>$extra</strong>';
|
||||
|
||||
/* 子任务修改父任务的历史操作记录 */
|
||||
|
||||
$lang->action->desc->linkchildtask = '$date, 由 <strong>$actor</strong> 关联子任务 <strong>$extra</strong>。' . "\n";
|
||||
$lang->action->desc->unlinkchildrentask = '$date, 由 <strong>$actor</strong> 移除子任务 <strong>$extra</strong>。' . "\n";
|
||||
$lang->action->desc->linkparenttask = '$date, 由 <strong>$actor</strong> 关联父任务 <strong>$extra</strong>。' . "\n";
|
||||
|
||||
/* 关联用例和移除用例时的历史操作记录。*/
|
||||
$lang->action->desc->linkrelatedcase = '$date, 由 <strong>$actor</strong> 关联相关用例 <strong>$extra</strong>。' . "\n";
|
||||
$lang->action->desc->unlinkrelatedcase = '$date, 由 <strong>$actor</strong> 移除相关用例 <strong>$extra</strong>。' . "\n";
|
||||
|
||||
@@ -291,7 +291,7 @@ class actionModel extends model
|
||||
$title = $this->dao->select('title')->from(TABLE_STORY)->where('id')->eq($action->extra)->fetch('title');
|
||||
if($title) $action->extra = common::hasPriv('story', 'view') ? html::a(helper::createLink('story', 'view', "storyID=$action->extra"), "#$action->extra " . $title) : "#$action->extra " . $title;
|
||||
}
|
||||
elseif($actionName == 'totask')
|
||||
elseif($actionName == 'totask' or $actionName == 'linkchildtask' or $actionName == 'unlinkchildrentask' or $actionName == 'linkparenttask')
|
||||
{
|
||||
$name = $this->dao->select('name')->from(TABLE_TASK)->where('id')->eq($action->extra)->fetch('name');
|
||||
if($name) $action->extra = common::hasPriv('task', 'view') ? html::a(helper::createLink('task', 'view', "taskID=$action->extra"), "#$action->extra " . $name) : "#$action->extra " . $name;
|
||||
@@ -369,7 +369,7 @@ class actionModel extends model
|
||||
if($history->field == 'git') $history->diff = str_replace('+', '%2B', $history->diff);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$action->comment = $this->file->setImgSize($action->comment, $this->config->action->commonImgSize);
|
||||
$actions[$actionID] = $action;
|
||||
}
|
||||
|
||||
@@ -1670,13 +1670,12 @@ class bugModel extends model
|
||||
{
|
||||
$datas = $this->dao->select('openedBuild as name, count(openedBuild) as value')->from(TABLE_BUG)->where($this->reportCondition())->groupBy('openedBuild')->orderBy('value DESC')->fetchAll('name');
|
||||
if(!$datas) return array();
|
||||
/* Judge if all product or not. */
|
||||
$products = $this->session->product;
|
||||
preg_match('/`product` IN \((?P<productIds>.+)\)/', $this->reportCondition(), $matchs);
|
||||
if(!empty($matchs) and isset($matchs['productIds']))
|
||||
{
|
||||
$products = strtr($matchs['productIds'], array('\'' => ''));
|
||||
}
|
||||
preg_match('/`product` IN \((?P<productIdList>.+)\)/', $this->reportCondition(), $matchs);
|
||||
if(!empty($matchs) and isset($matchs['productIdList'])) $products = str_replace('\'', '', $matchs['productIdList']);
|
||||
$builds = $this->loadModel('build')->getProductBuildPairs($products, $branch = 0, $params = '');
|
||||
|
||||
/* Deal with the situation that a bug maybe associate more than one openedBuild. */
|
||||
foreach($datas as $buildIDList => $data)
|
||||
{
|
||||
|
||||
@@ -137,14 +137,9 @@ class release extends control
|
||||
$release = $this->release->getById((int)$releaseID, true);
|
||||
if(!$release) die(js::error($this->lang->notFound) . js::locate('back'));
|
||||
|
||||
$stories = array();
|
||||
/*task 5379*/
|
||||
if($link == 'false')
|
||||
{
|
||||
$stories = $this->dao->select('*')->from(TABLE_STORY)->where('id')->in($release->stories)->andWhere('deleted')->eq(0)
|
||||
$stories = $this->dao->select('*')->from(TABLE_STORY)->where('id')->in($release->stories)->andWhere('deleted')->eq(0)
|
||||
->beginIF($type == 'story')->orderBy($orderBy)->fi()
|
||||
->fetchAll('id');
|
||||
}
|
||||
|
||||
$this->loadModel('common')->saveQueryCondition($this->dao->get(), 'story');
|
||||
$stages = $this->dao->select('*')->from(TABLE_STORYSTAGE)->where('story')->in($release->stories)->andWhere('branch')->eq($release->branch)->fetchPairs('story', 'stage');
|
||||
|
||||
@@ -1453,7 +1453,8 @@ class story extends control
|
||||
}
|
||||
else
|
||||
{
|
||||
$stmt = $this->dbh->query($this->session->storyQueryCondition . ($this->post->exportType == 'selected' ? " AND t1.id IN({$this->cookie->checkedItem})" : '') . " ORDER BY " . strtr($orderBy, '_', ' '));
|
||||
$field = $projectID ? 't2.id' : 't1.id';
|
||||
$stmt = $this->dbh->query($this->session->storyQueryCondition . ($this->post->exportType == 'selected' ? " AND $field IN({$this->cookie->checkedItem})" : '') . " ORDER BY " . strtr($orderBy, '_', ' '));
|
||||
while($row = $stmt->fetch()) $stories[$row->id] = $row;
|
||||
}
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
.chosen-container[id^="story"] .chosen-drop {min-width: 450px !important;}
|
||||
.chosen-container[id^="module"] .chosen-drop {min-width: 400px !important;}
|
||||
[id^=name] {min-width: 165px;}
|
||||
#mainContent .main-header h2{max-width:300px}
|
||||
|
||||
#batchCreateForm .input-group,
|
||||
#batchCreateForm .input-group .form-control {position: static;}
|
||||
@@ -18,4 +19,4 @@
|
||||
.chosen-results > li.has-task,
|
||||
.chosen-results > li.has-new-task {position: relative; color: #388E3C;}
|
||||
.chosen-results > li.has-task.highlighted,
|
||||
.chosen-results > li.has-new-task.highlighted {color: #fff;}
|
||||
.chosen-results > li.has-new-task.highlighted {color: #fff;}
|
||||
|
||||
@@ -274,8 +274,3 @@ $lang->task->report->tasksPerClosedReason->graph->xAxisName = '关闭原因';
|
||||
|
||||
$lang->task->report->finishedTasksPerDay->type = 'bar';
|
||||
$lang->task->report->finishedTasksPerDay->graph->xAxisName = '日期';
|
||||
|
||||
$lang->task->action = new stdclass();
|
||||
$lang->task->action->batchcreate = array('main' => '$date, 由 <strong>$actor</strong> 创建子任务 。');
|
||||
$lang->task->action->unlink = array('main' => '$date, 由 <strong>$actor</strong> 取消关联父任务 。');
|
||||
$lang->task->action->linkto = array('main' => '$date, 由 <strong>$actor</strong> 关联到父任务 。');
|
||||
|
||||
@@ -679,10 +679,9 @@ class taskModel extends model
|
||||
|
||||
if(isset($task->parent) and $task->parent != $oldTask->parent)
|
||||
{
|
||||
$comment = html::a(helper::createLink('task', 'view', 'taskID=' . $taskID), $task->name);
|
||||
$this->loadModel('action')->create('task', $task->parent, 'linkTo', $comment);
|
||||
$this->loadModel('action')->create('task', $oldTask->parent, 'unLink', $comment);
|
||||
|
||||
$this->loadModel('action')->create('task', $task->parent, 'linkChildTask', '', $taskID);
|
||||
$this->loadModel('action')->create('task', $oldTask->parent, 'unLinkChildrenTask', '', $taskID);
|
||||
$this->loadModel('action')->create('task', $taskID, 'linkParentTask', '', $task->parent);
|
||||
}
|
||||
|
||||
$task = $this->loadModel('file')->processImgURL($task, $this->config->task->editor->edit['id'], $this->post->uid);
|
||||
@@ -751,7 +750,7 @@ class taskModel extends model
|
||||
if($oldTask->parent > 0)
|
||||
{
|
||||
if($task->parent == 0) $this->computeWorkingHours($oldTask->parent);
|
||||
$this->updateParentStatus($taskID);
|
||||
$this->updateParentStatus($taskID, false);
|
||||
$this->computeBeginAndEnd($oldTask->parent);
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<?php include '../../common/view/datepicker.html.php';?>
|
||||
<div id="mainContent" class="main-content fade">
|
||||
<div class="main-header clearfix">
|
||||
<h2 class="pull-left" style='max-width:300px'>
|
||||
<h2 class="pull-left">
|
||||
<?php if($parent):?>
|
||||
<span class='pull-left'><?php echo $parentTitle . $this->lang->colon;?></span>
|
||||
<?php echo $lang->task->batchCreateChildren;?>
|
||||
|
||||
@@ -152,6 +152,7 @@
|
||||
<?php if(!isonlybody()) echo "<div class='divider'></div>";?>
|
||||
<?php if(!$task->deleted):?>
|
||||
<?php
|
||||
if(empty($task->team) or empty($task->children)) common::printIcon('task', 'batchCreate', "project=$task->project&storyID=$task->story&moduleID=$task->module&taskID=$task->id", $task, 'button', 'treemap-alt', '', '', '', "title='{$lang->task->children}'", $lang->task->children);
|
||||
common::printIcon('task', 'assignTo', "projectID=$task->project&taskID=$task->id", $task, 'button', '', '', 'iframe', true, '', empty($task->team) ? $lang->task->assignTo : $lang->task->transfer);
|
||||
common::printIcon('task', 'start', "taskID=$task->id", $task, 'button', '', '', 'iframe showinonlybody', true);
|
||||
common::printIcon('task', 'restart', "taskID=$task->id", $task, 'button', '', '', 'iframe showinonlybody', true);
|
||||
@@ -163,7 +164,6 @@
|
||||
common::printIcon('task', 'cancel', "taskID=$task->id", $task, 'button', '', '', 'iframe showinonlybody', true);
|
||||
|
||||
if(!isonlybody()) echo "<div class='divider'></div>";
|
||||
if(empty($task->team) or empty($task->children)) common::printIcon('task', 'batchCreate', "project=$task->project&storyID=$task->story&moduleID=$task->module&taskID=$task->id", $task, 'button', 'treemap-alt', '', '', '', "title='{$lang->task->children}' target='__blank'", ' ');
|
||||
common::printIcon('task', 'edit', "taskID=$task->id", $task, 'button', '', '', 'showinonlybody');
|
||||
common::printIcon('task', 'create', "projctID={$task->project}&storyID=0&moduleID=0&taskID=$task->id", $task, 'button', 'copy');
|
||||
common::printIcon('task', 'delete', "projectID=$task->project&taskID=$task->id", $task, 'button', 'trash', 'hiddenwin');
|
||||
|
||||
@@ -807,16 +807,15 @@ class testcase extends control
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function delete($caseID, $runID ,$confirm = 'no')
|
||||
public function delete($caseID, $confirm = 'no')
|
||||
{
|
||||
if($confirm == 'no')
|
||||
{
|
||||
die(js::confirm($this->lang->testcase->confirmDelete, inlink('delete', "caseID=$caseID&runID=$runID&confirm=yes")));
|
||||
die(js::confirm($this->lang->testcase->confirmDelete, inlink('delete', "caseID=$caseID&confirm=yes")));
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->testcase->delete(TABLE_CASE, $caseID);
|
||||
$this->dao->delete()->from(TABLE_TESTRUN)->where('id')->eq($runID)->exec();
|
||||
/* if ajax request, send result. */
|
||||
if($this->server->ajax)
|
||||
{
|
||||
|
||||
@@ -117,7 +117,7 @@
|
||||
common::printIcon('testcase', 'edit',"caseID=$case->id", $case);
|
||||
if(!$isLibCase) common::printIcon('testcase', 'create', "productID=$case->product&branch=$case->branch&moduleID=$case->module&from=testcase¶m=$case->id", $case, 'button', 'copy');
|
||||
if($isLibCase and common::hasPriv('testsuite', 'createCase')) echo html::a($this->createLink('testsuite', 'createCase', "libID=$case->lib&moduleID=$case->module¶m=$case->id", $case), "<i class='icon-copy'></i>", '', "class='btn' title='{$lang->testcase->copy}'");
|
||||
common::printIcon('testcase', 'delete', "caseID=$case->id&runID=$runID", $case, 'button', 'trash', 'hiddenwin');
|
||||
common::printIcon('testcase', 'delete', "caseID=$case->id", $case, 'button', 'trash', 'hiddenwin');
|
||||
?>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
|
||||
@@ -499,7 +499,15 @@ class testtaskModel extends model
|
||||
*/
|
||||
public function getDataOfTestTaskPerRunResult($taskID)
|
||||
{
|
||||
$datas = $this->dao->select('lastRunResult AS name, COUNT(*) AS value')->from(TABLE_TESTRUN)->where('task')->eq($taskID)->groupBy('name')->orderBy('value DESC')->fetchAll('name');
|
||||
$datas = $this->dao->select("t1.lastRunResult AS name, COUNT('t1.*') AS value")->from(TABLE_TESTRUN)->alias('t1')
|
||||
->leftJoin(TABLE_CASE)->alias('t2')
|
||||
->on('t1.case = t2.id')
|
||||
->where('t1.task')->eq($taskID)
|
||||
->andWhere('t2.deleted')->eq(0)
|
||||
->groupBy('name')
|
||||
->orderBy('value DESC')
|
||||
->fetchAll('name');
|
||||
|
||||
if(!$datas) return array();
|
||||
|
||||
foreach($datas as $result => $data) $data->name = isset($this->lang->testcase->resultList[$result])? $this->lang->testcase->resultList[$result] : $this->lang->testtask->unexecuted;
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
#projectModal .modal-dialog, #productModal .modal-dialog {top: auto!important; bottom: 90px;}
|
||||
.body-modal #projectModal .modal-dialog, .body-modal #productModal .modal-dialog {top: auto!important; bottom: 55px;}
|
||||
.body-modal #projectModal .modal-dialog, .body-modal #productModal .modal-dialog {top: auto!important; bottom: 55px;}
|
||||
|
||||
@@ -243,8 +243,6 @@
|
||||
<?php echo $lang->todo->thisIsPrivate;?>
|
||||
<?php endif;?>
|
||||
<script>
|
||||
$(function(){
|
||||
parent.$('body.hide-modal-close').removeClass('hide-modal-close');
|
||||
})
|
||||
$(function() { parent.$('body.hide-modal-close').removeClass('hide-modal-close'); })
|
||||
</script>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
Reference in New Issue
Block a user