$lang->product->noProduct = "暂时没有{$lang->productCommon}。";
$lang->product->noMatched = '找不到包含"%s"的' . $lang->productCommon;
-$lang->product->featureBar['browse']['allstory'] = $lang->product->allStory;
+$lang->product->featureBar['browse']['allstory'] = '全部';
$lang->product->featureBar['browse']['unclosed'] = $lang->product->unclosed;
$lang->product->featureBar['browse']['assignedtome'] = $lang->product->assignedToMe;
$lang->product->featureBar['browse']['openedbyme'] = $lang->product->openedByMe;
@@ -216,7 +216,7 @@ $lang->product->featureBar['browse']['reviewbyme'] = $lang->product->reviewByM
$lang->product->featureBar['browse']['draftstory'] = $lang->product->draftStory;
$lang->product->featureBar['browse']['more'] = $lang->more;
-$lang->product->featureBar['all']['all'] = '所有' . $lang->productCommon;
+$lang->product->featureBar['all']['all'] = '全部' . $lang->productCommon;
$lang->product->featureBar['all']['noclosed'] = $lang->product->unclosed;
$lang->product->featureBar['all']['closed'] = $lang->product->statusList['closed'];
diff --git a/module/product/view/browse.html.php b/module/product/view/browse.html.php
index 9960a70f92..48cfe38868 100644
--- a/module/product/view/browse.html.php
+++ b/module/product/view/browse.html.php
@@ -388,8 +388,10 @@ $projectIDParam = $isProjectStory ? "projectID=$projectID&" : '';
createLink('story', 'batchEdit', "productID=$productID&projectID=$projectID&branch=$branch&storyType=$storyType");
+ foreach($stories as $story) $storyProductIds[$story->product] = $story->product;
+ $storyProductID = count($storyProductIds) > 1 ? 0 : $productID;
+ $disabled = $canBatchEdit ? '' : "disabled='disabled'";
+ $actionLink = $this->createLink('story', 'batchEdit', "productID=$storyProductID&projectID=$projectID&branch=$branch&storyType=$storyType");
?>
edit, "data-form-action='$actionLink' $disabled");?>
diff --git a/module/product/view/track.html.php b/module/product/view/track.html.php
index 7a515e738e..dfedd53cbe 100644
--- a/module/product/view/track.html.php
+++ b/module/product/view/track.html.php
@@ -72,7 +72,7 @@
$story):?>
- ';?>
+ 0) echo '
';?>
parent) and $story->parent > 0):?>lang->story->childrenAB;?>
createLink($module, 'view', "storyID=$storyID"), $story->title, '',"title='$story->title' data-app='$tab'");?>
@@ -108,7 +108,7 @@
createLink('bug', 'view', "bugID=$bugID"), $bug->title, '', "title='$bug->title'") . ' ';?>
|
- ';?>
+ 0) echo '
';?>
diff --git a/module/productplan/lang/zh-cn.php b/module/productplan/lang/zh-cn.php
index 766defd14e..4a93f1a59d 100644
--- a/module/productplan/lang/zh-cn.php
+++ b/module/productplan/lang/zh-cn.php
@@ -135,7 +135,7 @@ $lang->productplan->endLetterChildTip = "父计划[%s]的完成日期:%s,
$lang->productplan->beginLetterParentTip = "子计划[%s]的开始日期:%s,不能小于父计划的开始日期: %s";
$lang->productplan->endGreaterParentTip = "子计划[%s]的完成日期:%s,不能大于父计划的完成日期: %s";
-$lang->productplan->featureBar['browse']['all'] = '所有';
+$lang->productplan->featureBar['browse']['all'] = '全部';
$lang->productplan->featureBar['browse']['undone'] = '未完成';
$lang->productplan->featureBar['browse']['wait'] = '未开始';
$lang->productplan->featureBar['browse']['doing'] = '进行中';
diff --git a/module/program/css/browse.css b/module/program/css/browse.css
index 67db67ad80..ac6ac02bce 100644
--- a/module/program/css/browse.css
+++ b/module/program/css/browse.css
@@ -12,9 +12,11 @@ tbody.sortable > tr > td.sort-handler {color: #3c4353 !important;}
.has-prefix > span {flex: none;}
.has-prefix > a {padding-left: 5px;}
-.has-suffix > a {max-width: calc(100% - 100px); padding-right: 5px; color: #0c60e1; display: inline-block; max-width: calc(100% - 50px);}
+.has-suffix > a {padding-right: 5px; color: #0c60e1; display: inline-block; max-width: calc(100% - 50px);}
+.is-nest-child span.table-nest-icon {visibility: hidden; width: 0;}
div.checkbox-primary + span.table-nest-icon {margin-left: 0px !important;}
+
#checkAll + label.hover:after {border-width: 0px;}
.c-budget {width:100px; text-align: right; padding-right:16px !important;}
-.c-status {width: 65px !important;}
\ No newline at end of file
+.c-status {width: 65px !important;}
diff --git a/module/program/lang/zh-cn.php b/module/program/lang/zh-cn.php
index a7c9452f73..be8d971ddc 100644
--- a/module/program/lang/zh-cn.php
+++ b/module/program/lang/zh-cn.php
@@ -143,7 +143,7 @@ $lang->program->statusList['doing'] = '进行中';
$lang->program->statusList['suspended'] = '已挂起';
$lang->program->statusList['closed'] = '已关闭';
-$lang->program->featureBar['browse']['all'] = '所有';
+$lang->program->featureBar['browse']['all'] = '全部';
$lang->program->featureBar['browse']['unclosed'] = '未关闭';
$lang->program->featureBar['browse']['wait'] = '未开始';
$lang->program->featureBar['browse']['doing'] = '进行中';
diff --git a/module/program/view/browse.html.php b/module/program/view/browse.html.php
index a259bdc4c5..ea68ed1c09 100644
--- a/module/program/view/browse.html.php
+++ b/module/program/view/browse.html.php
@@ -29,7 +29,6 @@
$label";?>
- $lang->program->showClosed), '', $this->cookie->showClosed ? 'checked=checked' : '');?>
$lang->project->edit), '', $this->cookie->editProject ? 'checked=checked' : '');?>
user->search;?>
diff --git a/module/project/lang/zh-cn.php b/module/project/lang/zh-cn.php
index 5e4b4bd225..1c566719c3 100644
--- a/module/project/lang/zh-cn.php
+++ b/module/project/lang/zh-cn.php
@@ -245,14 +245,14 @@ $lang->project->modelList['scrum'] = "Scrum";
$lang->project->modelList['waterfall'] = "瀑布";
$lang->project->modelList['kanban'] = "看板";
-$lang->project->featureBar['browse']['all'] = '所有';
+$lang->project->featureBar['browse']['all'] = '全部';
$lang->project->featureBar['browse']['undone'] = '未完成';
$lang->project->featureBar['browse']['wait'] = '未开始';
$lang->project->featureBar['browse']['doing'] = '进行中';
$lang->project->featureBar['browse']['suspended'] = '已挂起';
$lang->project->featureBar['browse']['closed'] = '已关闭';
-$lang->project->featureBar['build']['all'] = '所有版本';
+$lang->project->featureBar['build']['all'] = '全部版本';
$lang->project->aclList['private'] = "私有 (只有项目负责人、团队成员和干系人可访问)";
$lang->project->aclList['open'] = "公开 (有项目视图权限即可访问)";
diff --git a/module/project/view/bug.html.php b/module/project/view/bug.html.php
index db8759d557..a87eb8463a 100644
--- a/module/project/view/bug.html.php
+++ b/module/project/view/bug.html.php
@@ -34,7 +34,7 @@
Build:{$build->name}" : '';
$module = $type != 'bysearch' ? "¶m=$param" : '';
- echo html::a($this->inlink('bug', "projectID={$project->id}&productID={$productID}&branch=$branchID&orderBy=status,id_desc&build=$buildID&type=all$module"), "
{$lang->bug->allBugs}" . ($type == 'all' ? "
{$pager->recTotal}$buildName" : ''), '', "id='allTab' class='btn btn-link" . ('all' == $type ? ' btn-active-text' : '') . "'");
+ echo html::a($this->inlink('bug', "projectID={$project->id}&productID={$productID}&branch=$branchID&orderBy=status,id_desc&build=$buildID&type=all$module"), "
{$lang->bug->featureBar['browse']['all']}" . ($type == 'all' ? "
{$pager->recTotal}$buildName" : ''), '', "id='allTab' class='btn btn-link" . ('all' == $type ? ' btn-active-text' : '') . "'");
echo html::a($this->inlink('bug', "projectID={$project->id}&productID={$productID}&branch=$branchID&orderBy=status,id_desc&build=$buildID&type=unresolved$module"), "
{$lang->bug->unResolved}" . ($type == 'unresolved' ? "
{$pager->recTotal}$buildName" : ''), '', "id='unresolvedTab' class='btn btn-link" . ('unresolved' == $type ? ' btn-active-text' : '') . "'");
?>
bug->search;?>
diff --git a/module/project/view/view.html.php b/module/project/view/view.html.php
index 2ae7484bee..d557bc92ab 100644
--- a/module/project/view/view.html.php
+++ b/module/project/view/view.html.php
@@ -210,7 +210,7 @@
| project->end;?> |
- end;?> |
+ end = $project->end == LONG_TIME ? $this->lang->project->longTime : $project->end;;?> |
project->realEndAB;?> |
realEnd == '0000-00-00' ? '' : $project->realEnd;?> |
@@ -246,6 +246,8 @@
taskCount;?> |
bug->common;?> |
bugCount;?> |
+
project->budget;?> |
+
budget;?> |
diff --git a/module/projectstory/lang/zh-cn.php b/module/projectstory/lang/zh-cn.php
index 567ac9cbd0..24a4aa54bd 100644
--- a/module/projectstory/lang/zh-cn.php
+++ b/module/projectstory/lang/zh-cn.php
@@ -24,7 +24,7 @@ $lang->projectstory->batchUnlinkTip = '其他需求已经移除,如下需求
global $app;
$app->loadLang('product');
-$lang->projectstory->featureBar['story']['allstory'] = $lang->product->allStory;
+$lang->projectstory->featureBar['story']['allstory'] = '全部';
$lang->projectstory->featureBar['story']['unclosed'] = $lang->product->unclosed;
$lang->projectstory->featureBar['story']['draft'] = $lang->product->draftStory;
$lang->projectstory->featureBar['story']['reviewing'] = $lang->product->reviewingStory;
diff --git a/module/release/lang/zh-cn.php b/module/release/lang/zh-cn.php
index e40eddf76f..d76ce29615 100644
--- a/module/release/lang/zh-cn.php
+++ b/module/release/lang/zh-cn.php
@@ -95,6 +95,6 @@ $lang->release->notifyList['ET'] = "所在{$lang->execution->common}团队成员
$lang->release->notifyList['PT'] = "所在项目团队成员";
$lang->release->notifyList['CT'] = "抄送给";
-$lang->release->featureBar['browse']['all'] = $lang->release->all;
+$lang->release->featureBar['browse']['all'] = '全部';
$lang->release->featureBar['browse']['normal'] = $lang->release->statusList['normal'];
$lang->release->featureBar['browse']['terminate'] = $lang->release->statusList['terminate'];
diff --git a/module/report/control.php b/module/report/control.php
index bb22198742..c620e28464 100644
--- a/module/report/control.php
+++ b/module/report/control.php
@@ -292,6 +292,8 @@ class report extends control
$this->loadModel('dept');
$this->loadModel('user');
+ $super = common::hasPriv('report', 'allAnnualData');
+
$firstAction = $this->dao->select('*')->from(TABLE_ACTION)->orderBy('id')->limit(1)->fetch();
$currentYear = date('Y');
$firstYear = empty($firstAction) ? $currentYear : substr($firstAction->date, 0, 4);
@@ -329,7 +331,7 @@ class report extends control
$noDepartment = array('0' => '/' . $this->lang->dept->noDepartment);
$depts = $this->dept->getOptionMenu();
- if(!$this->app->user->admin)
+ if(!$super)
{
$depts = ($dept and isset($depts[$dept])) ? array($dept => $depts[$dept]) : $noDepartment;
}
diff --git a/module/report/lang/en.php b/module/report/lang/en.php
index b2c6275cf3..b43e6e8acd 100644
--- a/module/report/lang/en.php
+++ b/module/report/lang/en.php
@@ -9,16 +9,17 @@
* @version $Id: en.php 5080 2013-07-10 00:46:59Z wyd621@gmail.com $
* @link http://www.zentao.net
*/
-$lang->report->index = 'Report Home';
-$lang->report->list = 'Report';
-$lang->report->item = 'Item';
-$lang->report->value = 'Value';
-$lang->report->percent = '%';
-$lang->report->undefined = 'Undefined';
-$lang->report->query = 'Query';
-$lang->report->annual = 'Annual Summary';
-$lang->report->project = 'Project';
-$lang->report->PO = 'PO';
+$lang->report->index = 'Report Home';
+$lang->report->list = 'Report';
+$lang->report->item = 'Item';
+$lang->report->value = 'Value';
+$lang->report->percent = '%';
+$lang->report->undefined = 'Undefined';
+$lang->report->query = 'Query';
+$lang->report->annual = 'Annual Summary';
+$lang->report->project = 'Project';
+$lang->report->PO = 'PO';
+$lang->report->viewEveryoneAnnual = 'View everyone annual summary';
$lang->report->colors[] = 'AFD8F8';
$lang->report->colors[] = 'F6BD0F';
diff --git a/module/report/lang/zh-cn.php b/module/report/lang/zh-cn.php
index b7988f9880..3ed99b8ad6 100644
--- a/module/report/lang/zh-cn.php
+++ b/module/report/lang/zh-cn.php
@@ -9,16 +9,17 @@
* @version $Id: zh-cn.php 5080 2013-07-10 00:46:59Z wyd621@gmail.com $
* @link http://www.zentao.net
*/
-$lang->report->index = '统计首页';
-$lang->report->list = '统计报表';
-$lang->report->item = '条目';
-$lang->report->value = '值';
-$lang->report->percent = '百分比';
-$lang->report->undefined = '未设定';
-$lang->report->query = '查询';
-$lang->report->annual = '年度总结';
-$lang->report->project = '项目';
-$lang->report->PO = 'PO';
+$lang->report->index = '统计首页';
+$lang->report->list = '统计报表';
+$lang->report->item = '条目';
+$lang->report->value = '值';
+$lang->report->percent = '百分比';
+$lang->report->undefined = '未设定';
+$lang->report->query = '查询';
+$lang->report->annual = '年度总结';
+$lang->report->project = '项目';
+$lang->report->PO = 'PO';
+$lang->report->viewEveryoneAnnual = '查看所有人年度总结';
$lang->report->colors[] = 'AFD8F8';
$lang->report->colors[] = 'F6BD0F';
diff --git a/module/report/model.php b/module/report/model.php
index 23dbb69c1b..1c91a1fe6f 100644
--- a/module/report/model.php
+++ b/module/report/model.php
@@ -98,12 +98,13 @@ class reportModel extends model
*/
public function getExecutions($begin = 0, $end = 0)
{
- $tasks = $this->dao->select('t1.*, t2.name as executionName, t3.name as projectName')->from(TABLE_TASK)->alias('t1')
+ $permission = common::hasPriv('report', 'showProject') or $this->app->user->admin;
+ $tasks = $this->dao->select('t1.*, t2.name as executionName, t3.name as projectName')->from(TABLE_TASK)->alias('t1')
->leftJoin(TABLE_EXECUTION)->alias('t2')->on('t1.execution = t2.id')
->leftJoin(TABLE_PROJECT)->alias('t3')->on('t1.project = t3.id')
->where('t1.status')->ne('cancel')
->andWhere('t1.deleted')->eq(0)
- ->beginIF(!$this->app->user->admin)->andWhere('t2.id')->in($this->app->user->view->sprints)->fi()
+ ->beginIF(!$permission)->andWhere('t2.id')->in($this->app->user->view->sprints)->fi()
->andWhere('t2.deleted')->eq(0)
->andWhere('t1.parent')->lt(1)
->andWhere('t2.status')->eq('closed')
@@ -140,11 +141,12 @@ class reportModel extends model
*/
public function getProducts($conditions, $storyType = 'story')
{
- $products = $this->dao->select('t1.id as id, t1.code, t1.name, t1.PO')->from(TABLE_PRODUCT)->alias('t1')
+ $permission = common::hasPriv('report', 'showProduct') or $this->app->user->admin;
+ $products = $this->dao->select('t1.id as id, t1.code, t1.name, t1.PO')->from(TABLE_PRODUCT)->alias('t1')
->leftJoin(TABLE_PROGRAM)->alias('t2')->on('t1.program = t2.id')
->where('t1.deleted')->eq(0)
->beginIF(strpos($conditions, 'closedProduct') === false)->andWhere('t1.status')->ne('closed')->fi()
- ->beginIF(!$this->app->user->admin)->andWhere('t1.id')->in($this->app->user->view->products)->fi()
+ ->beginIF(!$permission)->andWhere('t1.id')->in($this->app->user->view->products)->fi()
->orderBy('t2.order_asc, t1.line_desc, t1.order_asc')
->fetchAll('id');
diff --git a/module/story/control.php b/module/story/control.php
index 16b4b7158b..4f2d88331f 100644
--- a/module/story/control.php
+++ b/module/story/control.php
@@ -606,7 +606,7 @@ class story extends control
/* Init vars. */
$planID = $plan;
- $pri = 0;
+ $pri = 3;
$estimate = '';
$title = '';
$spec = '';
@@ -750,6 +750,7 @@ class story extends control
$this->loadModel('file');
$this->app->loadLang('bug');
$story = $this->story->getById($storyID, 0, true);
+ $this->commonAction($storyID);
if(!empty($_POST))
{
@@ -793,8 +794,6 @@ class story extends control
return print(js::locate($this->createLink($this->app->rawModule, 'view', $params), 'parent'));
}
- $this->commonAction($storyID);
-
/* Sort products. */
$myProducts = array();
$othersProducts = array();
@@ -847,7 +846,7 @@ class story extends control
if($product->type == 'normal' and !empty($story->branch)) $this->view->moduleOptionMenu += $this->tree->getModulesName($story->module);
$branch = $product->type == 'branch' ? ($story->branch > 0 ? $story->branch : '0') : 'all';
- $productStories = $this->story->getProductStoryPairs($story->product, $branch, 0, 'all', 'id_desc', 0, '');
+ $productStories = $this->story->getProductStoryPairs($story->product, $branch, 0, 'all', 'id_desc', 0, '', $story->type);
$this->view->title = $this->lang->story->edit . "STORY" . $this->lang->colon . $this->view->story->title;
$this->view->position[] = $this->lang->story->edit;
diff --git a/module/story/lang/zh-cn.php b/module/story/lang/zh-cn.php
index cbce6c57b7..70c5f3cfe7 100644
--- a/module/story/lang/zh-cn.php
+++ b/module/story/lang/zh-cn.php
@@ -460,7 +460,7 @@ $lang->story->subDivideTip['subStory'] = '子需求无法细分';
$lang->story->subDivideTip['notWait'] = '该需求%s,无法进行细分操作';
$lang->story->subDivideTip['notActive'] = '需求不是激活状态,无法进行细分操作';
-$lang->story->featureBar['browse']['all'] = $lang->all;
+$lang->story->featureBar['browse']['all'] = '全部';
$lang->story->featureBar['browse']['unclosed'] = $lang->story->unclosed;
$lang->story->featureBar['browse']['draft'] = $lang->story->statusList['draft'];
$lang->story->featureBar['browse']['reviewing'] = $lang->story->statusList['reviewing'];
diff --git a/module/story/model.php b/module/story/model.php
index 148c1a957e..da1161f4a3 100644
--- a/module/story/model.php
+++ b/module/story/model.php
@@ -497,11 +497,12 @@ class storyModel extends model
{
if(empty($title)) continue;
+ $stories->reviewer[$i] = array_filter($stories->reviewer[$i]);
if(empty($stories->reviewer[$i]) and empty($stories->reviewerDitto[$i])) $stories->reviewer[$i] = array();
$reviewers = (isset($stories->reviewDitto[$i])) ? $reviewers : $stories->reviewer[$i];
$stories->reviewer[$i] = $reviewers;
$_POST['reviewer'][$i] = $reviewers;
- if(empty(array_filter($stories->reviewer[$i])) and $forceReview)
+ if(empty($stories->reviewer[$i]) and $forceReview)
{
dao::$errors[] = $this->lang->story->errorEmptyReviewedBy;
return false;
@@ -4273,7 +4274,7 @@ class storyModel extends model
{
$menu .= "
";
}
-
+
$menu .= $this->buildMenu('story', 'edit', $params . "&kanbanGroup=default&storyType=$story->type", $story, $type, '', '', 'showinonlybody');
$tab = $this->app->tab == 'project' ? 'project' : 'qa';
diff --git a/module/task/config.php b/module/task/config.php
index 6a67b81f84..b0bca1614c 100644
--- a/module/task/config.php
+++ b/module/task/config.php
@@ -45,10 +45,10 @@ $config->task->defaultLoadCount = 50;
$config->task->custom = new stdclass();
$config->task->custom->createFields = $config->task->customCreateFields;
-$config->task->custom->batchCreateFields = 'module,story,assignedTo,estimate,desc,pri';
+$config->task->custom->batchCreateFields = 'module,story,assignedTo,estimate,estStarted,deadline,desc,pri';
$config->task->custom->batchEditFields = 'module,assignedTo,status,pri,estimate,record,left';
-$config->task->excludeCheckFileds = ',pri,estStartedDitto,deadlineDitto,parent,regions,lanes,';
+$config->task->excludeCheckFileds = ',pri,estStartedDitto,deadlineDitto,parent,regions,lanes,vision,region,';
$config->task->datatable = new stdclass();
$config->task->datatable->defaultField = array('id', 'pri', 'name', 'status', 'assignedTo', 'finishedBy', 'estimate', 'consumed', 'left', 'progress', 'deadline', 'actions');
diff --git a/module/task/control.php b/module/task/control.php
index 8fa8b9b497..e47e6d6074 100755
--- a/module/task/control.php
+++ b/module/task/control.php
@@ -1149,7 +1149,7 @@ class task extends control
$kanbanData = $this->loadModel('kanban')->getRDKanban($task->execution, $execLaneType, 'id_desc', 0, $execGroupBy, $rdSearchValue);
$kanbanData = json_encode($kanbanData);
- return print(js::closeModal('parent.parent', '', "parent.parent.updateKanban($kanbanData)"));
+ return print(js::reload('parent') . js::execute("parent.parent.updateKanban($kanbanData)"));
}
if($from == 'taskkanban')
{
@@ -1159,9 +1159,9 @@ class task extends control
$kanbanData = $kanbanData[$kanbanType];
$kanbanData = json_encode($kanbanData);
- return print(js::closeModal('parent.parent', '', "parent.parent.updateKanban(\"task\", $kanbanData)"));
+ return print(js::reload('parent') . js::execute("parent.parent.updateKanban(\"task\", $kanbanData)"));
}
- return print(js::closeModal('parent.parent', 'this'));
+ return print(js::reload('parent') . js::execute("if(typeof(parent.parent.ajaxRefresh) == 'function') parent.parent.ajaxRefresh()"));
}
return print(js::locate($this->createLink('task', 'view', "taskID=$taskID"), 'parent'));
}
@@ -1199,7 +1199,7 @@ class task extends control
$actionID = $this->loadModel('action')->create('task', $estimate->task, 'EditEstimate', $this->post->work);
$this->action->logHistory($actionID, $changes);
- $url = $this->session->estimateList ? $this->session->estimateList : inlink('record', "taskID={$estimate->task}");
+ $url = $this->session->estimateList ? $this->session->estimateList : inlink('recordEstimate', "taskID={$estimate->task}");
return print(js::locate($url, 'parent'));
}
diff --git a/module/task/css/create.css b/module/task/css/create.css
index b1d4fbd6ee..c668eb1d93 100644
--- a/module/task/css/create.css
+++ b/module/task/css/create.css
@@ -14,7 +14,7 @@
#testStoryBox table tr td input {border: 0px;}
#testStoryBox table tr td .input-group .input-group-addon {border-left: 1px solid #dcdcdc; border-right: 1px solid #dcdcdc;}
#testStoryBox table button.btn {border: 0px;}
-#testStoryBox .c-name {width: 300px;}
+#testStoryBox .c-name {width: 120px;}
#testStoryBox .c-pri, #testStoryBox .c-estimate, #testStoryBox .c-actions {width: 70px;}
#testStoryBox .c-date {width: 140px;}
#testStoryBox .c-assignedTo {width: 100px; padding: 7px;}
diff --git a/module/task/js/view.js b/module/task/js/view.js
index 111813487d..45c9d15b55 100644
--- a/module/task/js/view.js
+++ b/module/task/js/view.js
@@ -1,6 +1,7 @@
$(function()
{
if(config.onlybody == 'yes') $('.main-actions').css('width', '100%');
+ limitIframeLevel();
});
function assign(taskID, assignedTo)
@@ -10,7 +11,20 @@ function assign(taskID, assignedTo)
$('.assign').load(createLink('user', 'ajaxGetUser', 'taskID=' + taskID + '&assignedTo=' + assignedTo));
}
-$(document).ready(function()
+/**
+ * Ajax refresh
+ *
+ * @access public
+ * @return void
+ */
+function ajaxRefresh()
{
- limitIframeLevel();
-});
+ $.get(location.href, function(data)
+ {
+ $data = $(data);
+ $('#actionbox ol.histories-list').html($data.find('#actionbox ol.histories-list').html());
+ $('.side-col').html($data.find('.side-col').html());
+
+ if($('#actionbox ol.histories-list #lastComment').length > 0) $('#actionbox ol.histories-list #lastComment').kindeditor();
+ });
+}
diff --git a/module/task/view/create.html.php b/module/task/view/create.html.php
index 995fb04143..a4b271b2e0 100644
--- a/module/task/view/create.html.php
+++ b/module/task/view/create.html.php
@@ -165,6 +165,7 @@ foreach(explode(',', $config->task->create->requiredFields) as $field)
30) break;?>
+
diff --git a/module/task/view/finish.html.php b/module/task/view/finish.html.php
index 896ee890f5..42f5af056e 100644
--- a/module/task/view/finish.html.php
+++ b/module/task/view/finish.html.php
@@ -56,19 +56,23 @@
task->hour;?>
|
-
-
- | team) ? $lang->task->consumed : $lang->task->myConsumed;?> |
- team) ? $task->consumed : (float)$task->myConsumed;?>
- " . (float)$consumed . " " . $lang->workingHour . html::hidden('consumed', $consumed);
- js::set('consumed', $consumed);
- ?>
+
+ team) ? $lang->task->consumed : $lang->task->myConsumed;?>
+
+ team) ? $task->consumed : (float)$task->myConsumed;?>
+ " . (float)$consumed . " " . $lang->workingHour . html::hidden('consumed', $consumed);
+ js::set('consumed', $consumed);
+ ?>
+
+
|
+
+
'>
- | team) and $task->mode == 'linear') ? $lang->task->transferTo : $lang->task->assign;?> |
+ task->assign;?> |
team) and $task->mode == 'linear')
@@ -83,11 +87,25 @@
|
- | team) ? $lang->task->realStarted : $lang->task->my . $lang->task->realStarted;?> |
- realStarted != '0000-00-00 00:00:00' ? $task->realStarted : '', "class='form-control form-datetime'");?> | |
+ task->realStarted;?> |
+
+
+ realStarted;
+ $readonly = 'readonly';
+ if(helper::isZeroDate($realStarted))
+ {
+ $realStarted = '';
+ $readonly = '';
+ }
+ ?>
+
+
+ |
+ |
- | team) ? $lang->task->finishedDate : $lang->task->my . $lang->task->finishedDate;?> |
+ task->finishedDate;?> |
| |
diff --git a/module/testcase/lang/zh-cn.php b/module/testcase/lang/zh-cn.php
index 6b1dae6b4b..e9295dfee2 100644
--- a/module/testcase/lang/zh-cn.php
+++ b/module/testcase/lang/zh-cn.php
@@ -250,7 +250,7 @@ $lang->testcase->action->unlinkedfromproject = array('main' => '$date, 由 testcase->action->linked2execution = array('main' => '$date, 由 $actor 关联到' . $lang->executionCommon . ' $extra。');
$lang->testcase->action->unlinkedfromexecution = array('main' => '$date, 由 $actor 从' . $lang->executionCommon . ' $extra 移除。');
-$lang->testcase->featureBar['browse']['all'] = $lang->testcase->allCases;
+$lang->testcase->featureBar['browse']['all'] = '全部';
$lang->testcase->featureBar['browse']['wait'] = '待评审';
$lang->testcase->featureBar['browse']['needconfirm'] = $lang->testcase->needConfirm;
$lang->testcase->featureBar['browse']['group'] = '分组查看';
diff --git a/module/testcase/model.php b/module/testcase/model.php
index 29aa2d91dd..31b49ffd65 100644
--- a/module/testcase/model.php
+++ b/module/testcase/model.php
@@ -2504,8 +2504,8 @@ class testcaseModel extends model
return $this->buildMenu('testcase', 'confirmstorychange', $params, $case, 'browse', 'confirm', 'hiddenwin', '', '', '', $this->lang->confirm);
}
- $menu .= $this->buildMenu('testtask', 'results', "runID=0&$params", $case, 'browse', '', '', 'iframe', true, "data-width='95%'");
$menu .= $this->buildMenu('testtask', 'runCase', "runID=0&$params&version=$case->version", $case, 'browse', 'play', '', 'runCase iframe', false, "data-width='95%'");
+ $menu .= $this->buildMenu('testtask', 'results', "runID=0&$params", $case, 'browse', '', '', 'iframe', true, "data-width='95%'");
$editParams = $params;
if($this->app->tab == 'project') $editParams .= "&comment=false&projectID={$this->session->project}";
diff --git a/module/testtask/js/results.js b/module/testtask/js/results.js
index f9ee0f657c..b4f965d249 100644
--- a/module/testtask/js/results.js
+++ b/module/testtask/js/results.js
@@ -24,3 +24,4 @@ $(function()
$('tr:first').click();
});
+
diff --git a/module/testtask/lang/zh-cn.php b/module/testtask/lang/zh-cn.php
index 4739aa7e43..863099cbfe 100644
--- a/module/testtask/lang/zh-cn.php
+++ b/module/testtask/lang/zh-cn.php
@@ -148,7 +148,7 @@ $lang->testtask->finishedDateLess = '实际完成日期不能小于开始日期
$lang->testtask->finishedDateMore = '实际完成日期不能大于今天';
$lang->testtask->assignedToMe = '指派给我';
-$lang->testtask->allCases = '所有用例';
+$lang->testtask->allCases = '全部用例';
$lang->testtask->lblCases = '用例列表';
$lang->testtask->lblUnlinkCase = '移除用例';
diff --git a/module/testtask/model.php b/module/testtask/model.php
index 7468f426b1..78c163c20b 100755
--- a/module/testtask/model.php
+++ b/module/testtask/model.php
@@ -1622,8 +1622,8 @@ class testtaskModel extends model
common::printIcon('testcase', 'createBug', "product=$run->product&branch=$run->branch&extra=executionID=$task->execution,buildID=$task->build,caseID=$run->case,version=$run->version,runID=$run->id,testtask=$task->id", $run, 'list', 'bug', '', 'iframe', '', "data-width='90%'");
- common::printIcon('testtask', 'results', "id=$run->id", $run, 'list', '', '', 'iframe', '', "data-width='90%'");
common::printIcon('testtask', 'runCase', "id=$run->id", $run, 'list', 'play', '', 'runCase iframe', false, "data-width='95%'");
+ common::printIcon('testtask', 'results', "id=$run->id", $run, 'list', '', '', 'iframe', '', "data-width='90%'");
if(common::hasPriv('testtask', 'unlinkCase', $run))
{
diff --git a/module/tree/model.php b/module/tree/model.php
index 8c8a2582ec..ed31f2a3d9 100644
--- a/module/tree/model.php
+++ b/module/tree/model.php
@@ -1452,7 +1452,7 @@ class treeModel extends model
$module = $this->getById((int)$moduleID);
if(empty($module)) return array();
- return $this->dao->select('id')->from(TABLE_MODULE)->where("CONCAT(',', path, ',')")->like("%,$module->path,%")->andWhere('deleted')->eq(0)->fetchPairs();
+ return $this->dao->select('id')->from(TABLE_MODULE)->where("CONCAT(',', path, ',')")->like("%$module->path%")->andWhere('deleted')->eq(0)->fetchPairs();
}
/**
diff --git a/test/data/user.yaml b/test/data/user.yaml
index f1f96e460b..9891eb8a6d 100644
--- a/test/data/user.yaml
+++ b/test/data/user.yaml
@@ -29,7 +29,7 @@ fields:
range: [],1-99,1-100,1-100,1-100,1-100,1-100,1-100,1-100,1-100,1-100,1-100,[]{4}
- field: password
note: "密码"
- range: 123qwe!@#{346}
+ range: 123Qwe!@#{346}
format: md5
- field: role
note: "职位"
diff --git a/test/lib/controlapi.php b/test/lib/controlapi.php
index ca160059b4..23b4aa8beb 100755
--- a/test/lib/controlapi.php
+++ b/test/lib/controlapi.php
@@ -15,7 +15,7 @@ class apiCheckModel
global $argv;
$path = $argv[1];
$entries = '';
- if($argv[2]) $entries = $argv[2];
+ if(isset($argv[2])) $entries = $argv[2];
$this->run($argv[1], $entries);
}
diff --git a/test/lib/db.class.php b/test/lib/db.class.php
index e0cc0cf622..71a3b48d09 100644
--- a/test/lib/db.class.php
+++ b/test/lib/db.class.php
@@ -145,8 +145,14 @@ class db
{
$this->dao->query('DROP DATABASE IF EXISTS ' . $this->config->test->dbPrefix . $i);
$this->dao->query('CREATE DATABASE ' . $this->config->test->dbPrefix . $i);
-
- shell_exec("mysql -h{$this->config->db->host} -u {$this->config->db->user} -p{$this->config->db->password} -P {$this->config->db->port} {$this->config->test->dbPrefix}{$i} < {$this->sqlFile}");
+ if($this->config->db->host = 'localhost' and $this->config->db->port = '3306')
+ {
+ shell_exec("mysql -u {$this->config->db->user} -p{$this->config->db->password} {$this->config->test->dbPrefix}{$i} < {$this->sqlFile}");
+ }
+ else
+ {
+ shell_exec("mysql -h{$this->config->db->host} -u {$this->config->db->user} -p{$this->config->db->password} -P {$this->config->db->port} {$this->config->test->dbPrefix}{$i} < {$this->sqlFile}");
+ }
}
}
}
diff --git a/test/lib/utils.php b/test/lib/utils.php
index 60e0f6a9d5..baa2b68448 100755
--- a/test/lib/utils.php
+++ b/test/lib/utils.php
@@ -218,12 +218,19 @@ function zdRun()
function copyDB()
{
global $config, $dao;
-
- $dumpCommand = "mysqldump -h%s -P%s -u%s -p%s %s --add-drop-table=false > %s";
- $sqlFile = TEST_BASEHPATH . DS . 'tmp/raw.sql';
+ $sqlFile = TEST_BASEHPATH . DS . 'tmp/raw.sql';
+ if($config->db->host = 'localhost' and $config->db->port = '3306')
+ {
+ $dumpCommand = "mysqldump -u%s -p%s %s --add-drop-table=false > %s";
+ $dumpCommand = sprintf($dumpCommand, $config->db->user, $config->db->password, $config->test->rawDB, $sqlFile);
+ }
+ else
+ {
+ $dumpCommand = "mysqldump -h%s -P%s -u%s -p%s %s --add-drop-table=false > %s";
+ $dumpCommand = sprintf($dumpCommand, $config->db->host, $config->db->port, $config->db->user, $config->db->password, $config->test->rawDB, $sqlFile);
+ }
$currentDBNum = $dao->query("select count(*) as num from information_schema.SCHEMATA where SCHEMA_NAME like '" . $config->test->dbPrefix . "%'")->fetch();
- $dumpCommand = sprintf($dumpCommand, $config->db->host, $config->db->port, $config->db->user, $config->db->password, $config->test->rawDB, $sqlFile);
shell_exec($dumpCommand);
$dbNum = $config->test->dbNum;
@@ -238,7 +245,14 @@ function copyDB()
{
if($currentDBNum->num > 0) $dao->query('DROP DATABASE IF EXISTS ' . $db);
$dao->query('CREATE DATABASE ' . $db);
- shell_exec("mysql -h{$config->db->host} -P {$config->db->port} -u{$config->db->user} -p{$config->db->password} $db < $sqlFile");
+ if($config->db->host = 'localhost' and $config->db->port = '3306')
+ {
+ shell_exec("mysql -u{$config->db->user} -p{$config->db->password} $db < $sqlFile");
+ }
+ else
+ {
+ shell_exec("mysql -h{$config->db->host} -P {$config->db->port} -u{$config->db->user} -p{$config->db->password} $db < $sqlFile");
+ }
echo '数据库<' . $db . '>复制成功!' . PHP_EOL;
}
}