-
- story->spec;?>
fetch('user', 'ajaxPrintTemplates', 'type=story&link=spec');?>
- story->specTemplate . "\n" . $lang->noticePasteImg) . "'");?>
+ noticePasteImg) . "'");?>
@@ -166,7 +166,7 @@
- goback, '', 'class="btn btn-wide"') : html::backButton();?>
+
diff --git a/extension/lite/story/ext/view/review.lite.html.hook.php b/extension/lite/story/ext/view/review.lite.html.hook.php
new file mode 100644
index 0000000000..13d0ce6107
--- /dev/null
+++ b/extension/lite/story/ext/view/review.lite.html.hook.php
@@ -0,0 +1,4 @@
+
diff --git a/extension/lite/task/ext/control/create.php b/extension/lite/task/ext/control/create.php
index 9a7b7914cf..3565608eb4 100644
--- a/extension/lite/task/ext/control/create.php
+++ b/extension/lite/task/ext/control/create.php
@@ -11,6 +11,6 @@ class myTask extends task
die(js::locate(helper::createLink('execution', 'create')));
}
- return parent::create($executionID = 0, $storyID = 0, $moduleID = 0, $taskID = 0, $todoID = 0, $extra = '');
+ return parent::create($executionID, $storyID, $moduleID, $taskID, $todoID, $extra);
}
}
diff --git a/extension/lite/task/ext/lang/zh-cn/lite.php b/extension/lite/task/ext/lang/zh-cn/lite.php
index 33e7713e1b..aee0d15ed5 100644
--- a/extension/lite/task/ext/lang/zh-cn/lite.php
+++ b/extension/lite/task/ext/lang/zh-cn/lite.php
@@ -9,68 +9,69 @@
* @version $Id: zh-cn.php 5040 2013-07-06 06:22:18Z zhujinyonging@gmail.com $
* @link http://www.zentao.net
*/
-$lang->task->index = "卡片一览";
-$lang->task->create = "建卡片";
-$lang->task->batchCreateChildren = "批量建子卡片";
-$lang->task->edit = "编辑卡片";
-$lang->task->deleteAction = "删除卡片";
-$lang->task->view = "查看卡片";
-$lang->task->startAction = "开始卡片";
-$lang->task->restartAction = "继续卡片";
-$lang->task->finishAction = "完成卡片";
-$lang->task->pauseAction = "暂停卡片";
-$lang->task->closeAction = "关闭卡片";
-$lang->task->cancelAction = "取消卡片";
-$lang->task->activateAction = "激活卡片";
-$lang->task->exportAction = "导出卡片";
-$lang->task->copy = '复制卡片';
-$lang->task->waitTask = '未开始的卡片';
+$lang->task->index = "任务一览";
+$lang->task->create = "建任务";
+$lang->task->batchCreateChildren = "批量建子任务";
+$lang->task->edit = "编辑任务";
+$lang->task->deleteAction = "删除任务";
+$lang->task->view = "查看任务";
+$lang->task->startAction = "开始任务";
+$lang->task->restartAction = "继续任务";
+$lang->task->finishAction = "完成任务";
+$lang->task->pauseAction = "暂停任务";
+$lang->task->closeAction = "关闭任务";
+$lang->task->cancelAction = "取消任务";
+$lang->task->activateAction = "激活任务";
+$lang->task->exportAction = "导出任务";
+$lang->task->copy = '复制任务';
+$lang->task->waitTask = '未开始的任务';
-$lang->task->common = '卡片';
-$lang->task->name = '卡片名称';
-$lang->task->type = '卡片类型';
-$lang->task->status = '卡片状态';
-$lang->task->desc = '卡片描述';
-$lang->task->assignAction = '指派卡片';
-$lang->task->multiple = '多人卡片';
-$lang->task->children = '子卡片';
-$lang->task->parent = '父卡片';
+$lang->task->module = '所属目录';
+$lang->task->common = '任务';
+$lang->task->name = '任务名称';
+$lang->task->type = '任务类型';
+$lang->task->status = '任务状态';
+$lang->task->desc = '任务描述';
+$lang->task->assignAction = '指派任务';
+$lang->task->multiple = '多人任务';
+$lang->task->children = '子任务';
+$lang->task->parent = '父任务';
/* Fields of zt_taskestimate. */
-$lang->task->task = '卡片';
+$lang->task->task = '任务';
-$lang->task->dittoNotice = "该卡片与上一卡片不属于同一%s!";
-$lang->task->yesterdayFinished = '昨日完成卡片数';
-$lang->task->allTasks = '总卡片';
+$lang->task->dittoNotice = "该任务与上一任务不属于同一%s!";
+$lang->task->yesterdayFinished = '昨日完成任务数';
+$lang->task->allTasks = '总任务';
-$lang->task->afterChoices['continueAdding'] = "继续为该{$lang->SRCommon}添加卡片";
-$lang->task->afterChoices['toTaskList'] = '返回卡片列表';
+$lang->task->afterChoices['continueAdding'] = "继续为该{$lang->SRCommon}添加任务";
+$lang->task->afterChoices['toTaskList'] = '返回任务列表';
-$lang->task->legendLife = '卡片的一生';
-$lang->task->legendDesc = '卡片描述';
-$lang->task->legendDetail = '卡片详情';
+$lang->task->legendLife = '任务的一生';
+$lang->task->legendDesc = '任务描述';
+$lang->task->legendDetail = '任务详情';
-$lang->task->confirmDelete = "您确定要删除这个卡片吗?";
+$lang->task->confirmDelete = "您确定要删除这个任务吗?";
$lang->task->confirmDeleteEstimate = "您确定要删除这个记录吗?";
-$lang->task->confirmFinish = '"预计剩余"为0,确认将卡片状态改为"已完成"吗?';
-$lang->task->confirmRecord = '"剩余"为0,卡片将标记为"已完成",您确定吗?';
-$lang->task->confirmTransfer = '"当前剩余"为0,卡片将被转交,您确定吗?';
-$lang->task->noTask = '暂时没有卡片。';
+$lang->task->confirmFinish = '"预计剩余"为0,确认将任务状态改为"已完成"吗?';
+$lang->task->confirmRecord = '"剩余"为0,任务将标记为"已完成",您确定吗?';
+$lang->task->confirmTransfer = '"当前剩余"为0,任务将被转交,您确定吗?';
+$lang->task->noTask = '暂时没有任务。';
$lang->task->kanbanDenied = '请先创建看板';
-$lang->task->createDenied = '你不能在该项目添加卡片';
-$lang->task->cannotDeleteParent = '不能删除父卡片。';
-$lang->task->addChildTask = '因该卡片已经产生消耗,为保证数据一致性,我们会帮您创建一条同名子卡片记录该消耗。';
+$lang->task->createDenied = '你不能在该项目添加任务';
+$lang->task->cannotDeleteParent = '不能删除父任务。';
+$lang->task->addChildTask = '因该任务已经产生消耗,为保证数据一致性,我们会帮您创建一条同名子任务记录该消耗。';
-$lang->task->error->skipClose = '卡片:%s 不是“已完成”或“已取消”状态,确定要关闭吗?';
-$lang->task->error->consumed = '卡片:%s工时不能小于0,忽略该卡片工时的改动';
-$lang->task->error->assignedTo = '当前状态的多人卡片不能指派给卡片团队外的成员。';
-$lang->task->error->alreadyStarted = '此卡片已被启动,不能重复启动!';
-$lang->task->error->alreadyConsumed = '当前选中的父卡片已有消耗。';
+$lang->task->error->skipClose = '任务:%s 不是“已完成”或“已取消”状态,确定要关闭吗?';
+$lang->task->error->consumed = '任务:%s工时不能小于0,忽略该任务工时的改动';
+$lang->task->error->assignedTo = '当前状态的多人任务不能指派给任务团队外的成员。';
+$lang->task->error->alreadyStarted = '此任务已被启动,不能重复启动!';
+$lang->task->error->alreadyConsumed = '当前选中的父任务已有消耗。';
/* Report. */
-$lang->task->report->value = '卡片数';
+$lang->task->report->value = '任务数';
-$lang->task->report->charts['tasksPerExecution'] = '按' . $lang->executionCommon . '卡片数统计';
-$lang->task->report->charts['tasksPerModule'] = '按模块卡片数统计';
-$lang->task->report->charts['tasksPerType'] = '按卡片类型统计';
-$lang->task->report->charts['tasksPerStatus'] = '按卡片状态统计';
+$lang->task->report->charts['tasksPerExecution'] = '按' . $lang->executionCommon . '任务数统计';
+$lang->task->report->charts['tasksPerModule'] = '按模块任务数统计';
+$lang->task->report->charts['tasksPerType'] = '按任务类型统计';
+$lang->task->report->charts['tasksPerStatus'] = '按任务状态统计';
diff --git a/extension/lite/todo/ext/lang/zh-cn/lite.php b/extension/lite/todo/ext/lang/zh-cn/lite.php
index f520b30c77..34e05cbbc0 100644
--- a/extension/lite/todo/ext/lang/zh-cn/lite.php
+++ b/extension/lite/todo/ext/lang/zh-cn/lite.php
@@ -1,4 +1,7 @@
todo->typeList['task'] = '卡片';
+$lang->todo->typeList['task'] = '任务';
+
+$lang->effort->common = '日志';
+
unset($lang->todo->typeList['bug']);
unset($lang->todo->typeList['testtask']);
diff --git a/extension/lite/todo/ext/view/calendar.html.php b/extension/lite/todo/ext/view/calendar.html.php
index 6560bd2feb..1376e469df 100644
--- a/extension/lite/todo/ext/view/calendar.html.php
+++ b/extension/lite/todo/ext/view/calendar.html.php
@@ -44,7 +44,7 @@
-
- createLink($this->app->rawModule, $this->app->rawMethod, $projectIDParam . "productID=$productID&branch=$branch&browseType=$browseType¶m=0&storyType=$storyType&orderBy=$orderBy&recTotal=0&recPerPage={$pager->recPerPage}") : 'javascript:removeCookieByKey("storyModuleParam")';
- echo html::a($removeLink, "", '', "class='text-muted btn btn-link' style='padding-left: 0;'");
- }
- ?>
-
-
+$('#dataform table tbody tr:first-child').hide();
+$('#dataform table tbody tr:nth-child(7)').hide();
+$('#dataform table tbody tr:nth-child(8)').hide();
+$('#dataform table tbody tr:nth-child(12)').hide();
+
diff --git a/extension/lite/search/ext/lang/zh-cn/lite.php b/extension/lite/search/ext/lang/zh-cn/lite.php
index fa6a21ff59..7d7c6c1faf 100644
--- a/extension/lite/search/ext/lang/zh-cn/lite.php
+++ b/extension/lite/search/ext/lang/zh-cn/lite.php
@@ -1,5 +1,5 @@
search->modules['task'] = '卡片';
+$lang->search->modules['task'] = '任务';
$lang->search->modules['execution'] = '看板';
$lang->search->modules['story'] = '目标';
diff --git a/extension/lite/story/ext/view/close.lite.html.hook.php b/extension/lite/story/ext/view/close.lite.html.hook.php
new file mode 100644
index 0000000000..e1c92f8639
--- /dev/null
+++ b/extension/lite/story/ext/view/close.lite.html.hook.php
@@ -0,0 +1,9 @@
+
diff --git a/extension/lite/story/ext/view/create.html.php b/extension/lite/story/ext/view/create.html.php
index 96ed248326..1f6bfd7cfb 100644
--- a/extension/lite/story/ext/view/create.html.php
+++ b/extension/lite/story/ext/view/create.html.php
@@ -131,7 +131,7 @@
- createLink('todo', 'calendar'), $lang->todo->common);?> - + config->edition != 'open' and common::hasPriv('effort', 'calendar')):?>
- createLink('effort', 'calendar'), $lang->effort->common);?>
- createLink('my', 'effort'), $lang->effort->common);?> @@ -115,10 +115,10 @@
- - createLink('task', 'view', "id=$id", 'html', true), $todo, '', "class='iframe $class' data-id='{$id}' data-type='{$type}' data-title='{$todo}' title='{$todo}' data-width='70%'");?> + createLink('task', 'view', "id=$id", 'html', true), $todo, '', "class='iframe $class' data-id='{$id}' data-type='task' data-title='{$todo}' title='{$todo}' data-width='70%'");?>
-
$todo):?>
-
+
+
+
+ session->taskList ? $this->session->taskList : 'javascript:history.go(-1)';?>
+
+ goback;?>
+
+
+
+
+ tree->common . $lang->colon . $root->name;?>
+
+
+
+
+app->getModuleRoot() . 'common/view/footer.html.php';?>
diff --git a/extension/lite/user/ext/lang/zh-cn/lite.php b/extension/lite/user/ext/lang/zh-cn/lite.php
index 9adf4eb7fe..d2f5818794 100644
--- a/extension/lite/user/ext/lang/zh-cn/lite.php
+++ b/extension/lite/user/ext/lang/zh-cn/lite.php
@@ -1,2 +1,2 @@
user->task = '卡片';
+$lang->user->task = '任务';
diff --git a/extension/lite/user/ext/model/lite.php b/extension/lite/user/ext/model/lite.php
new file mode 100644
index 0000000000..8f74ddca58
--- /dev/null
+++ b/extension/lite/user/ext/model/lite.php
@@ -0,0 +1,106 @@
+dao->select('t1.*,t2.*')->from(TABLE_TEAM)->alias('t1')
+ ->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.root = t2.id')
+ ->where('t1.type')->eq($type)
+ ->andWhere('t2.type')->in($objectType)
+ ->beginIF(strpos('doing|wait|suspended|closed', $status) !== false)->andWhere('status')->eq($status)->fi()
+ ->beginIF($status == 'done')->andWhere('status')->in('done,closed')->fi()
+ ->beginIF($status == 'undone')->andWhere('status')->notin('done,closed')->fi()
+ ->beginIF($status == 'openedbyme')->andWhere('openedBy')->eq($account)->fi()
+ ->beginIF($type == 'execution' and !$this->app->user->admin)->andWhere('t2.id')->in($this->app->user->view->sprints)->fi()
+ ->beginIF($type == 'project' and !$this->app->user->admin)->andWhere('t2.id')->in($this->app->user->view->projects)->fi()
+ ->andWhere('t1.account')->eq($account)
+ ->andWhere('t2.deleted')->eq(0)
+ ->andWhere('t2.vision')->eq($this->config->vision)
+ ->orderBy("t2.$orderBy")
+ ->page($pager)
+ ->fetchAll('root');
+
+ $objectIdList = array();
+ $projectIdList = array();
+ foreach($myObjectsList as $object)
+ {
+ $objectIdList[] = $object->id;
+ $projectIdList[] = $object->project;
+ }
+
+ /* Get all tasks and compute totalConsumed, totalLeft, totalWait, progress according to them. */
+ $hours = array();
+ $emptyHour = array('totalConsumed' => 0, 'totalLeft' => 0, 'progress' => 0, 'waitTasks' => 0, 'assignedToMeTasks' => 0, 'doneTasks' => 0, 'taskTotal' => 0);
+ $searchField = $type == 'project' ? 'project' : 'execution';
+ $tasks = $this->dao->select('id, project, execution, consumed, `left`, status, assignedTo,finishedBy')
+ ->from(TABLE_TASK)
+ ->where('parent')->lt(1)
+ ->andWhere($searchField)->in($objectIdList)->fi()
+ ->andWhere('deleted')->eq(0)
+ ->fetchGroup($searchField, 'id');
+
+ /* Compute totalEstimate, totalConsumed, totalLeft. */
+ foreach($tasks as $objectID => $objectTasks)
+ {
+ $hour = (object)$emptyHour;
+ $hour->taskTotal = count($objectTasks);
+ foreach($objectTasks as $task)
+ {
+ if($task->status == 'wait') $hour->waitTasks += 1;
+ if($task->finishedBy != '') $hour->doneTasks += 1;
+ if($task->status != 'cancel') $hour->totalConsumed += $task->consumed;
+ if($task->status != 'cancel' and $task->status != 'closed') $hour->totalLeft += $task->left;
+ if($task->assignedTo == $account) $hour->assignedToMeTasks += 1;
+ }
+ $hours[$objectID] = $hour;
+ }
+
+ /* Compute totalReal and progress. */
+ foreach($hours as $hour)
+ {
+ $hour->totalConsumed = round($hour->totalConsumed, 1);
+ $hour->totalLeft = round($hour->totalLeft, 1);
+ $hour->totalReal = $hour->totalConsumed + $hour->totalLeft;
+ $hour->progress = $hour->totalReal ? round($hour->totalConsumed / $hour->totalReal, 2) * 100 : 0;
+ }
+
+ $myObjects = array();
+ $projectList = $this->loadModel('project')->getByIdList($projectIdList);
+ foreach($myObjectsList as $object)
+ {
+ /* Judge whether the project or execution is delayed. */
+ if($object->status != 'done' and $object->status != 'closed' and $object->status != 'suspended')
+ {
+ $delay = helper::diffDate(helper::today(), $object->end);
+ if($delay > 0) $object->delay = $delay;
+ }
+
+ /* Process the hours. */
+ $object->progress = isset($hours[$object->id]) ? $hours[$object->id]->progress : 0;
+ $object->waitTasks = isset($hours[$object->id]) ? $hours[$object->id]->waitTasks : 0;
+ $object->doneTasks = isset($hours[$object->id]) ? $hours[$object->id]->doneTasks : 0;
+ $object->taskTotal = isset($hours[$object->id]) ? $hours[$object->id]->taskTotal : 0;
+ $object->totalConsumed = isset($hours[$object->id]) ? $hours[$object->id]->totalConsumed : 0;
+ $object->assignedToMeTasks = isset($hours[$object->id]) ? $hours[$object->id]->assignedToMeTasks : 0;
+
+ if($object->project)
+ {
+ $parentProject = zget($projectList, $object->project, '');
+ $object->projectName = $parentProject ? $parentProject->name : '';
+ }
+ $myObjects[$object->id] = $object;
+ }
+
+ return $myObjects;
+}
+
diff --git a/extension/lite/user/ext/view/execution.html.php b/extension/lite/user/ext/view/execution.html.php
new file mode 100644
index 0000000000..6b6c8d08f8
--- /dev/null
+++ b/extension/lite/user/ext/view/execution.html.php
@@ -0,0 +1,63 @@
+
+ * @package dashboard
+ * @version $Id: project.html.php 4129 2013-01-18 01:58:14Z wwccss $
+ * @link http://www.zentao.net
+ */
+?>
+app->getModuleRoot() . 'common/view/header.html.php';?>
+app->getModuleRoot() . 'common/view/tablesorter.html.php';?>
+app->getModuleRoot() . 'user/view/featurebar.html.php';?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+app->getModuleRoot() . 'common/view/footer.html.php';?>
diff --git a/framework/base/router.class.php b/framework/base/router.class.php
index 92bc24ccef..f01484d775 100644
--- a/framework/base/router.class.php
+++ b/framework/base/router.class.php
@@ -696,6 +696,7 @@ class baseRouter
$account = isset($_SESSION['user']) ? $_SESSION['user']->account : '';
if($this->config->installed) $vision = $this->dbh->query("SELECT * FROM " . TABLE_CONFIG . " WHERE owner = '$account' AND `key` = 'vision' LIMIT 1")->fetch();
+ if(!empty($_SESSION['user']->visions) and empty($vision)) list($vision) = explode(',', $_SESSION['user']->visions);
$this->config->vision = $vision ? $vision->value : 'rnd';
}
diff --git a/module/block/lang/en.php b/module/block/lang/en.php
index b0a9a555e3..566c2e53a1 100644
--- a/module/block/lang/en.php
+++ b/module/block/lang/en.php
@@ -99,6 +99,7 @@ $lang->block->productName = $lang->productCommon . ' Name';
$lang->block->totalStory = 'The Total ' . $lang->SRCommon;
$lang->block->totalBug = 'The Total Bug';
$lang->block->totalRelease = 'Release The Number';
+$lang->block->totalTask = 'The Total ' . $lang->task->common;
$lang->block->totalInvestment = 'Total investment';
$lang->block->totalPeople = 'Total number';
diff --git a/module/block/lang/zh-cn.php b/module/block/lang/zh-cn.php
index c7beac6250..dfdf15e786 100644
--- a/module/block/lang/zh-cn.php
+++ b/module/block/lang/zh-cn.php
@@ -99,6 +99,7 @@ $lang->block->productName = $lang->productCommon . '名称';
$lang->block->totalStory = '总' . $lang->SRCommon;
$lang->block->totalBug = '总Bug';
$lang->block->totalRelease = '发布次数';
+$lang->block->totalTask = '总' . $lang->task->common;
$lang->block->totalInvestment = '总投入';
$lang->block->totalPeople = '总人数';
diff --git a/module/block/view/scrumoverviewblock.html.php b/module/block/view/scrumoverviewblock.html.php
index fcf990cc03..cf05b83451 100644
--- a/module/block/view/scrumoverviewblock.html.php
+++ b/module/block/view/scrumoverviewblock.html.php
@@ -10,6 +10,7 @@
* @link http://www.zentao.net
*/
?>
+config->vision;?>
+
+ id}&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}"; ?>
+
+
+
+
+| idAB);?> | +user->name);?> | +statusAB);?> | +team->role;?> | +execution->begin);?> | +execution->end);?> | +team->join;?> | +team->hours;?> | +|
|---|---|---|---|---|---|---|---|---|
| id);?> | ++ maxVersion)):?> + user->executionTypeList, $execution->type);?> + + name);?> + | + delay)):?> +execution->delayed;?> | + +processStatus('execution', $execution);?> | + +role;?> | +begin;?> | +end;?> | +join;?> | +hours;?> | +
show('right', 'pagerjs');?>
+
+ " . $lang->project->create, '', "class='btn btn-primary'")?>
@@ -22,7 +23,11 @@