diff --git a/module/execution/control.php b/module/execution/control.php index ec7ffd8eab..e12748522b 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -2086,6 +2086,7 @@ class execution extends control $this->view->productNum = count($products); $this->view->branchID = $branchID; $this->view->projectID = $this->loadModel('task')->getProjectID($execution->id); + $this->view->allProducts = $this->product->getProductPairsByProject($this->view->projectID, 'noclosed'); $this->view->allPlans = $allPlans; $this->view->kanbanData = $kanbanData; $this->view->executionActions = $executionActions; diff --git a/module/execution/css/kanban.css b/module/execution/css/kanban.css index ca89881d63..a987329020 100644 --- a/module/execution/css/kanban.css +++ b/module/execution/css/kanban.css @@ -106,4 +106,5 @@ #mainMenu .divider {margin: 10px} -.kanbanRegion {margin:5px} +.kanbanRegion {margin: 5px} +.modal-header {padding: 15px 0;} diff --git a/module/execution/js/kanban.js b/module/execution/js/kanban.js index f9ebc24b0c..9e59198ef2 100644 --- a/module/execution/js/kanban.js +++ b/module/execution/js/kanban.js @@ -1,3 +1,13 @@ +$(function() +{ + $('#products').change(function() + { + var selectProductID = $('#products').val(); + var attr = createLink('story', 'batchCreate', 'productID=' + selectProductID + '&branch=0' + '&moduleID=0&story=0&execution=' + executionID, '', true); + $('#batchCreateStoryButton').attr('href',attr); + }); +}) + /** * When execution status change. * @@ -263,7 +273,7 @@ function createColumnCreateMenu(options) if(col.type == 'backlog') { if(priv.canCreateStory) items.push({label: storyLang.create, url: $.createLink('story', 'create', 'productID=' + productID + '&branch=0&moduleID=0&storyID=0&objectID=' + executionID + '&bugID=0&planID=0&todoID=0&extra=laneID=' + laneID + ',columnID=' + col.id, '', true), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '80%'}}); - if(priv.canBatchCreateStory) items.push({label: executionLang.batchCreateStroy, url: $.createLink('story', 'batchcreate', 'productID=' + productID + '&branch=0&moduleID=0&storyID=0&executionID=' + executionID + '&plan=0&type=story&extra=laneID=' + laneID + ',columnID=' + col.id, '', true), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '90%'}}); + if(priv.canBatchCreateStory) items.push({label: executionLang.batchCreateStory, url: productCount > 1 ? '#batchCreateStory' : $.createLink('story', 'batchcreate', 'productID=' + productID + '&branch=0&moduleID=0&storyID=0&executionID=' + executionID + '&plan=0&type=story&extra=laneID=' + laneID + ',columnID=' + col.id, '', true), className: 'iframe',attrs: {'data-toggle': 'modal', 'data-width': '90%'}}); if(priv.canLinkStory) items.push({label: executionLang.linkStory, url: $.createLink('execution', 'linkStory', 'executionID=' + executionID + '&browseType=¶m=0&recTotal=0&recPerPage=50,&pageID=1&extra=laneID=' + laneID + ',columnID=' + col.id, '', true), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '90%'}}); if(priv.canLinkStoryByPlan) items.push({label: executionLang.linkStoryByPlan, url: '#linkStoryByPlan', 'attrs' : {'data-toggle': 'modal', 'data-target': '#linkStoryByPlan','data-col' : col.id, 'data-lane' : laneID, 'class' : 'linkStoryByPlanButton'}}); } diff --git a/module/execution/lang/en.php b/module/execution/lang/en.php index a7de4f68fc..0e5b371ead 100644 --- a/module/execution/lang/en.php +++ b/module/execution/lang/en.php @@ -107,7 +107,7 @@ $lang->execution->unfoldClosed = 'Unfold Closed'; $lang->execution->editName = 'Edit Name'; $lang->execution->setWIP = 'WIP Settings'; $lang->execution->sortColumn = 'Kanban Card Sorting'; -$lang->execution->batchCreateStroy = "Batch create {$lang->SRCommon}"; +$lang->execution->batchCreateStory = "Batch create {$lang->SRCommon}"; $lang->execution->batchCreateTask = 'Batch create task'; $lang->execution->kanbanNoLinkProduct = "Kanban not linked {$lang->productCommon}"; @@ -292,44 +292,45 @@ $lang->execution->aboveAllProduct = "All the above {$lang->productCommon}s"; $lang->execution->aboveAllExecution = "All the above {$lang->executionCommon}s"; /* Page prompt. */ -$lang->execution->linkStoryByPlanTips = "This action will link all stories in this plan to the {$lang->executionCommon}."; -$lang->execution->selectExecution = "Select {$lang->executionCommon}"; -$lang->execution->beginAndEnd = 'Duration'; -$lang->execution->lblStats = 'Efforts'; -$lang->execution->stats = 'Available: %s(h). Estimates: %s(h). Cost: %s(h). Left: %s(h).'; -$lang->execution->taskSummary = "Total tasks on this page:%s. Waiting: %s. Doing: %s.     Estimates: %s(h). Cost: %s(h). Left: %s(h)."; -$lang->execution->pageSummary = "Total tasks: %total%. Waiting: %wait%. Doing: %doing%. Estimates: %estimate%(h). Cost: %consumed%(h). Left: %left%(h)."; -$lang->execution->checkedSummary = "Selected: %total%. Waiting: %wait%. Doing: %doing%. Estimates: %estimate%(h). Cost: %consumed%(h). Left: %left%(h)."; -$lang->execution->memberHoursAB = "%s has %s hours."; -$lang->execution->memberHours = '
%s Available Hours
%s
'; -$lang->execution->countSummary = '
Tasks
%s
Doing
%s
Waiting
%s
'; -$lang->execution->timeSummary = '
Estimates
%s
Cost
%s
Left
%s
'; -$lang->execution->groupSummaryAB = "
Tasks %s :Waiting %s   Doing %s
Estimates %s :Cost %s   Left %s
"; -$lang->execution->wbs = "Create Task"; -$lang->execution->batchWBS = "Batch Create Tasks"; -$lang->execution->howToUpdateBurn = "Help "; -$lang->execution->whyNoStories = "No story can be linked. Please check whether there is any story in {$lang->executionCommon} which is linked to {$lang->productCommon} and make sure it has been reviewed."; -$lang->execution->productStories = "Stories linked to {$lang->executionCommon} are the subeset of stories linked to {$lang->productCommon}. Stories can only be linked after they pass the review. Link Stories now."; -$lang->execution->haveDraft = "%s stories in draft, so they can't be linked."; -$lang->execution->doneExecutions = 'Finished'; -$lang->execution->selectDept = 'Select Department'; -$lang->execution->selectDeptTitle = 'Select User'; -$lang->execution->copyTeam = 'Copy Team'; -$lang->execution->copyFromTeam = "Copy from {$lang->execution->common} Team: %s"; -$lang->execution->noMatched = "No {$lang->execution->common} including '%s'can be found."; -$lang->execution->copyTitle = "Choose a {$lang->execution->common} to copy."; -$lang->execution->copyNoExecution = "No {$lang->execution->common} can be copied."; -$lang->execution->copyFromExecution = "Copy from {$lang->execution->common} %s"; -$lang->execution->cancelCopy = 'Cancel Copy'; -$lang->execution->byPeriod = 'By Time'; -$lang->execution->byUser = 'By User'; -$lang->execution->noExecution = "No {$lang->executionCommon}. "; -$lang->execution->noExecutions = "No {$lang->execution->common}."; -$lang->execution->noPrintData = "No data can be printed."; -$lang->execution->noMembers = 'No team members yet. '; -$lang->execution->workloadTotal = "The cumulative workload ratio should not exceed 100, and the total workload under the current product is: %s"; -// $lang->execution->linkProjectStoryTip = "(Link {$lang->SRCommon} comes from {$lang->SRCommon} linked under the execution)"; -$lang->execution->linkAllStoryTip = "({$lang->SRCommon} has never been linked under the execution, and can be directly linked with {$lang->SRCommon} of the product linked with the sprint/stage)"; +$lang->execution->linkStoryByPlanTips = "This action will link all stories in this plan to the {$lang->executionCommon}."; +$lang->execution->batchCreateStoryTips = "Please select the product that needs to be created in batches"; +$lang->execution->selectExecution = "Select {$lang->executionCommon}"; +$lang->execution->beginAndEnd = 'Duration'; +$lang->execution->lblStats = 'Efforts'; +$lang->execution->stats = 'Available: %s(h). Estimates: %s(h). Cost: %s(h). Left: %s(h).'; +$lang->execution->taskSummary = "Total tasks on this page:%s. Waiting: %s. Doing: %s.     Estimates: %s(h). Cost: %s(h). Left: %s(h)."; +$lang->execution->pageSummary = "Total tasks: %total%. Waiting: %wait%. Doing: %doing%. Estimates: %estimate%(h). Cost: %consumed%(h). Left: %left%(h)."; +$lang->execution->checkedSummary = "Selected: %total%. Waiting: %wait%. Doing: %doing%. Estimates: %estimate%(h). Cost: %consumed%(h). Left: %left%(h)."; +$lang->execution->memberHoursAB = "%s has %s hours."; +$lang->execution->memberHours = '
%s Available Hours
%s
'; +$lang->execution->countSummary = '
Tasks
%s
Doing
%s
Waiting
%s
'; +$lang->execution->timeSummary = '
Estimates
%s
Cost
%s
Left
%s
'; +$lang->execution->groupSummaryAB = "
Tasks %s :Waiting %s   Doing %s
Estimates %s :Cost %s   Left %s
"; +$lang->execution->wbs = "Create Task"; +$lang->execution->batchWBS = "Batch Create Tasks"; +$lang->execution->howToUpdateBurn = "Help "; +$lang->execution->whyNoStories = "No story can be linked. Please check whether there is any story in {$lang->executionCommon} which is linked to {$lang->productCommon} and make sure it has been reviewed."; +$lang->execution->productStories = "Stories linked to {$lang->executionCommon} are the subeset of stories linked to {$lang->productCommon}. Stories can only be linked after they pass the review. Link Stories now."; +$lang->execution->haveDraft = "%s stories in draft, so they can't be linked."; +$lang->execution->doneExecutions = 'Finished'; +$lang->execution->selectDept = 'Select Department'; +$lang->execution->selectDeptTitle = 'Select User'; +$lang->execution->copyTeam = 'Copy Team'; +$lang->execution->copyFromTeam = "Copy from {$lang->execution->common} Team: %s"; +$lang->execution->noMatched = "No {$lang->execution->common} including '%s'can be found."; +$lang->execution->copyTitle = "Choose a {$lang->execution->common} to copy."; +$lang->execution->copyNoExecution = "No {$lang->execution->common} can be copied."; +$lang->execution->copyFromExecution = "Copy from {$lang->execution->common} %s"; +$lang->execution->cancelCopy = 'Cancel Copy'; +$lang->execution->byPeriod = 'By Time'; +$lang->execution->byUser = 'By User'; +$lang->execution->noExecution = "No {$lang->executionCommon}. "; +$lang->execution->noExecutions = "No {$lang->execution->common}."; +$lang->execution->noPrintData = "No data can be printed."; +$lang->execution->noMembers = 'No team members yet. '; +$lang->execution->workloadTotal = "The cumulative workload ratio should not exceed 100, and the total workload under the current product is: %s"; +// $lang->execution->linkProjectStoryTip = "(Link {$lang->SRCommon} comes from {$lang->SRCommon} linked under the execution)"; +$lang->execution->linkAllStoryTip = "({$lang->SRCommon} has never been linked under the execution, and can be directly linked with {$lang->SRCommon} of the product linked with the sprint/stage)"; if($config->systemMode == 'classic') $lang->execution->copyTeamTitle = "Choose a {$lang->execution->common} Team to copy."; if($config->systemMode == 'new') $lang->execution->copyTeamTitle = "Choose a {$lang->project->common} or {$lang->execution->common} Team to copy."; diff --git a/module/execution/lang/zh-cn.php b/module/execution/lang/zh-cn.php index 61b7bf3e66..c47309f24b 100644 --- a/module/execution/lang/zh-cn.php +++ b/module/execution/lang/zh-cn.php @@ -107,7 +107,7 @@ $lang->execution->unfoldClosed = '展开已结束'; $lang->execution->editName = '编辑名称'; $lang->execution->setWIP = '在制品数量设置(WIP)'; $lang->execution->sortColumn = '看板列卡片排序'; -$lang->execution->batchCreateStroy = "批量新建{$lang->SRCommon}"; +$lang->execution->batchCreateStory = "批量新建{$lang->SRCommon}"; $lang->execution->batchCreateTask = '批量建任务'; $lang->execution->kanbanNoLinkProduct = "看板没有关联{$lang->productCommon}"; @@ -292,44 +292,45 @@ $lang->execution->aboveAllProduct = "以上所有{$lang->productCommon}"; $lang->execution->aboveAllExecution = "以上所有{$lang->executionCommon}"; /* 页面提示。*/ -$lang->execution->linkStoryByPlanTips = "此操作会将所选计划下面的{$lang->SRCommon}全部关联到此{$lang->executionCommon}中"; -$lang->execution->selectExecution = "请选择{$lang->execution->common}"; -$lang->execution->beginAndEnd = '起止时间'; -$lang->execution->lblStats = '工时统计'; -$lang->execution->stats = '可用工时 %s 工时,总共预计 %s 工时,已经消耗 %s 工时,预计剩余 %s 工时'; -$lang->execution->taskSummary = "本页共 %s 个任务,未开始 %s,进行中 %s,总预计 %s 工时,已消耗 %s 工时,剩余 %s 工时。"; -$lang->execution->pageSummary = "本页共 %total% 个任务,未开始 %wait%,进行中 %doing%,总预计 %estimate% 工时,已消耗 %consumed% 工时,剩余 %left% 工时。"; -$lang->execution->checkedSummary = "选中 %total% 个任务,未开始 %wait%,进行中 %doing%,总预计 %estimate% 工时,已消耗 %consumed% 工时,剩余 %left% 工时。"; -$lang->execution->memberHoursAB = "
%s有 %s 工时
"; -$lang->execution->memberHours = '
%s可用工时
%s
'; -$lang->execution->countSummary = '
总任务
%s
进行中
%s
未开始
%s
'; -$lang->execution->timeSummary = '
总预计
%s
已消耗
%s
剩余
%s
'; -$lang->execution->groupSummaryAB = "
总任务 %s : 未开始 %s   进行中 %s
总预计 %s : 已消耗 %s   剩余 %s
"; -$lang->execution->wbs = "分解任务"; -$lang->execution->batchWBS = "批量分解"; -$lang->execution->howToUpdateBurn = "帮助 "; -$lang->execution->whyNoStories = "看起来没有{$lang->SRCommon}可以关联。请检查下{$lang->executionCommon}关联的{$lang->productCommon}中有没有{$lang->SRCommon},而且要确保它们已经审核通过。"; -$lang->execution->productStories = "{$lang->executionCommon}关联的{$lang->SRCommon}是{$lang->productCommon}{$lang->SRCommon}的子集,并且只有评审通过的{$lang->SRCommon}才能关联。请关联{$lang->SRCommon}。"; -$lang->execution->haveDraft = "有%s条草稿状态的{$lang->SRCommon}无法关联到该{$lang->executionCommon}"; -$lang->execution->doneExecutions = '已结束'; -$lang->execution->selectDept = '选择部门'; -$lang->execution->selectDeptTitle = '选择一个部门的成员'; -$lang->execution->copyTeam = '复制团队'; -$lang->execution->copyFromTeam = "复制自{$lang->execution->common}团队: %s"; -$lang->execution->noMatched = "找不到包含'%s'的{$lang->execution->common}"; -$lang->execution->copyTitle = "请选择一个{$lang->execution->common}来复制"; -$lang->execution->copyNoExecution = "没有可用的{$lang->execution->common}来复制"; -$lang->execution->copyFromExecution = "复制自{$lang->execution->common} %s"; -$lang->execution->cancelCopy = '取消复制'; -$lang->execution->byPeriod = '按时间段'; -$lang->execution->byUser = '按用户'; -$lang->execution->noExecution = "暂时没有{$lang->executionCommon}。"; -$lang->execution->noExecutions = "暂时没有{$lang->execution->common}。"; -$lang->execution->noPrintData = "暂无数据可打印"; -$lang->execution->noMembers = '暂时没有团队成员。'; -$lang->execution->workloadTotal = "工作量占比累计不应当超过100, 当前产品下的工作量之和为%s"; +$lang->execution->linkStoryByPlanTips = "此操作会将所选计划下面的{$lang->SRCommon}全部关联到此{$lang->executionCommon}中"; +$lang->execution->batchCreateStoryTips = '请选择需要批量新建研发需求的产品'; +$lang->execution->selectExecution = "请选择{$lang->execution->common}"; +$lang->execution->beginAndEnd = '起止时间'; +$lang->execution->lblStats = '工时统计'; +$lang->execution->stats = '可用工时 %s 工时,总共预计 %s 工时,已经消耗 %s 工时,预计剩余 %s 工时'; +$lang->execution->taskSummary = "本页共 %s 个任务,未开始 %s,进行中 %s,总预计 %s 工时,已消耗 %s 工时,剩余 %s 工时。"; +$lang->execution->pageSummary = "本页共 %total% 个任务,未开始 %wait%,进行中 %doing%,总预计 %estimate% 工时,已消耗 %consumed% 工时,剩余 %left% 工时。"; +$lang->execution->checkedSummary = "选中 %total% 个任务,未开始 %wait%,进行中 %doing%,总预计 %estimate% 工时,已消耗 %consumed% 工时,剩余 %left% 工时。"; +$lang->execution->memberHoursAB = "
%s有 %s 工时
"; +$lang->execution->memberHours = '
%s可用工时
%s
'; +$lang->execution->countSummary = '
总任务
%s
进行中
%s
未开始
%s
'; +$lang->execution->timeSummary = '
总预计
%s
已消耗
%s
剩余
%s
'; +$lang->execution->groupSummaryAB = "
总任务 %s : 未开始 %s   进行中 %s
总预计 %s : 已消耗 %s   剩余 %s
"; +$lang->execution->wbs = "分解任务"; +$lang->execution->batchWBS = "批量分解"; +$lang->execution->howToUpdateBurn = "帮助 "; +$lang->execution->whyNoStories = "看起来没有{$lang->SRCommon}可以关联。请检查下{$lang->executionCommon}关联的{$lang->productCommon}中有没有{$lang->SRCommon},而且要确保它们已经审核通过。"; +$lang->execution->productStories = "{$lang->executionCommon}关联的{$lang->SRCommon}是{$lang->productCommon}{$lang->SRCommon}的子集,并且只有评审通过的{$lang->SRCommon}才能关联。请关联{$lang->SRCommon}。"; +$lang->execution->haveDraft = "有%s条草稿状态的{$lang->SRCommon}无法关联到该{$lang->executionCommon}"; +$lang->execution->doneExecutions = '已结束'; +$lang->execution->selectDept = '选择部门'; +$lang->execution->selectDeptTitle = '选择一个部门的成员'; +$lang->execution->copyTeam = '复制团队'; +$lang->execution->copyFromTeam = "复制自{$lang->execution->common}团队: %s"; +$lang->execution->noMatched = "找不到包含'%s'的{$lang->execution->common}"; +$lang->execution->copyTitle = "请选择一个{$lang->execution->common}来复制"; +$lang->execution->copyNoExecution = "没有可用的{$lang->execution->common}来复制"; +$lang->execution->copyFromExecution = "复制自{$lang->execution->common} %s"; +$lang->execution->cancelCopy = '取消复制'; +$lang->execution->byPeriod = '按时间段'; +$lang->execution->byUser = '按用户'; +$lang->execution->noExecution = "暂时没有{$lang->executionCommon}。"; +$lang->execution->noExecutions = "暂时没有{$lang->execution->common}。"; +$lang->execution->noPrintData = "暂无数据可打印"; +$lang->execution->noMembers = '暂时没有团队成员。'; +$lang->execution->workloadTotal = "工作量占比累计不应当超过100, 当前产品下的工作量之和为%s"; // $lang->execution->linkProjectStoryTip = "(关联{$lang->SRCommon}来源于项目下所关联的{$lang->SRCommon})"; -$lang->execution->linkAllStoryTip = "(项目下还未关联{$lang->SRCommon},可直接关联该{$lang->execution->common}所关联产品的{$lang->SRCommon})"; +$lang->execution->linkAllStoryTip = "(项目下还未关联{$lang->SRCommon},可直接关联该{$lang->execution->common}所关联产品的{$lang->SRCommon})"; if($config->systemMode == 'classic') $lang->execution->copyTeamTitle = "选择一个{$lang->execution->common}团队来复制"; if($config->systemMode == 'new') $lang->execution->copyTeamTitle = "选择一个{$lang->project->common}或{$lang->execution->common}团队来复制"; diff --git a/module/execution/lang/zh-tw.php b/module/execution/lang/zh-tw.php index d13a43b35f..39047bd819 100644 --- a/module/execution/lang/zh-tw.php +++ b/module/execution/lang/zh-tw.php @@ -107,7 +107,7 @@ $lang->execution->unfoldClosed = '展開已結束'; $lang->execution->editName = '編輯名稱'; $lang->execution->setWIP = '在製品數量設置(WIP)'; $lang->execution->sortColumn = '看板列卡片排序'; -$lang->execution->batchCreateStroy = "批量新建{$lang->SRCommon}"; +$lang->execution->batchCreateStory = "批量新建{$lang->SRCommon}"; $lang->execution->batchCreateTask = '批量建任務'; /* Fields of zt_team. */ diff --git a/module/execution/view/kanban.html.php b/module/execution/view/kanban.html.php index 639849fd79..c87a8ccfa6 100644 --- a/module/execution/view/kanban.html.php +++ b/module/execution/view/kanban.html.php @@ -49,7 +49,8 @@ js::set('colorListLang', $lang->kanbancard->colorList); js::set('colorList', $this->config->kanban->cardColorList); js::set('projectID', $projectID); js::set('vision', $this->config->vision); -js::set('branchID', $branchID); +js::set('productCount', count($allProducts)); +js::set('executionID', $execution->id); $canSortRegion = commonModel::hasPriv('kanban', 'sortRegion') && count($regions) > 1; $canEditRegion = commonModel::hasPriv('kanban', 'editRegion'); @@ -165,7 +166,19 @@ js::set('hasTaskButton', $hasTaskButton);