diff --git a/module/productplan/control.php b/module/productplan/control.php index 4510cef8eb..ff03f410c3 100644 --- a/module/productplan/control.php +++ b/module/productplan/control.php @@ -441,7 +441,7 @@ class productplan extends control $this->view->plan = $plan; $this->view->actions = $this->loadModel('action')->getList('productplan', $planID); $this->view->users = $this->loadModel('user')->getPairs('noletter'); - $this->view->plans = $this->productplan->getPairs($plan->product, $plan->branch); + $this->view->plans = $this->productplan->getPairs($plan->product, $plan->branch, '', true); $this->view->modules = $this->loadModel('tree')->getOptionMenu($plan->product); $this->view->type = $type; $this->view->orderBy = $orderBy; diff --git a/module/project/control.php b/module/project/control.php index 5c80678579..82695213fa 100644 --- a/module/project/control.php +++ b/module/project/control.php @@ -1220,8 +1220,9 @@ class project extends control $queryID = ($type == 'bysearch') ? (int)$param : 0; $actionURL = $this->createLink('project', 'build', "projectID=$projectID&type=bysearch&queryID=myQueryID"); - $devel = $project->model == 'waterfall' ? true : false; - $executions = $this->loadModel('execution')->getByProject($projectID, 'all', '', true, $devel); + $allExecutions = $this->loadModel('execution')->getByProject($projectID, 'all', '', true); + $devel = $project->model == 'waterfall' ? true : false; + $executions = $this->loadModel('execution')->getByProject($projectID, 'all', '', true, $devel); $this->config->build->search['fields']['execution'] = $this->project->lang->executionCommon; $this->config->build->search['params']['execution'] = array('operator' => '=', 'control' => 'select', 'values' => array('' => '') + $executions); @@ -1278,6 +1279,7 @@ class project extends control $this->view->projectID = $projectID; $this->view->project = $project; $this->view->products = $products; + $this->view->allExecutions = $allExecutions; $this->view->executions = $executions; $this->view->type = $type; diff --git a/module/project/js/build.js b/module/project/js/build.js index e8a9ea9c64..86397cec51 100644 --- a/module/project/js/build.js +++ b/module/project/js/build.js @@ -4,7 +4,10 @@ $(function() { if(executions.length == 0) { - alert(createExecution); + var message = noDevStage; + if(allExecutions.length == 0) message = createExecution; + alert(message); + var link = createLink('execution', 'create', 'projectID=' + projectID); window.parent.$.apps.open(link, 'execution'); diff --git a/module/project/lang/de.php b/module/project/lang/de.php index 0297e0c2a6..deab788c45 100644 --- a/module/project/lang/de.php +++ b/module/project/lang/de.php @@ -195,6 +195,7 @@ $lang->project->createExecution = "There is no {$lang->executionCommon} u $lang->project->unlinkExecutionMember = "The user participated in %s executions such as %s%s. Do you want to remove the user from those executions as well? (The data related to this user will not be deleted.)"; $lang->project->unlinkExecutionMembers = "The team members you are removing are also in the execution team of this project. Do you want to remove them from the execution team too?"; $lang->project->productTip = 'After clicking New Product, the project will not be linked to the selected product.'; +$lang->project->noDevStage = 'There is no R&D stage under this project, or you do not have access permissions. The creation of builds is not supported at the moment.'; $lang->project->tenThousand = ''; $lang->project->hundredMillion = 'Hundred Million'; diff --git a/module/project/lang/en.php b/module/project/lang/en.php index 87a656b975..6330f8cc9a 100644 --- a/module/project/lang/en.php +++ b/module/project/lang/en.php @@ -195,6 +195,7 @@ $lang->project->createExecution = "There is no {$lang->executionCommon} u $lang->project->unlinkExecutionMember = "The user participated in %s executions such as %s%s. Do you want to remove the user from those executions as well? (The data related to this user will not be deleted.)"; $lang->project->unlinkExecutionMembers = "The team members you are removing are also in the execution team of this project. Do you want to remove them from the execution team too?"; $lang->project->productTip = 'After clicking New Product, the project will not be linked to the selected product.'; +$lang->project->noDevStage = 'There is no R&D stage under this project, or you do not have access permissions. The creation of builds is not supported at the moment.'; $lang->project->tenThousand = 'Ten Thousand'; $lang->project->hundredMillion = 'Hundred Million'; diff --git a/module/project/lang/fr.php b/module/project/lang/fr.php index b08f7cae8c..1be54e768a 100644 --- a/module/project/lang/fr.php +++ b/module/project/lang/fr.php @@ -195,6 +195,7 @@ $lang->project->createExecution = "There is no {$lang->executionCommon} u $lang->project->unlinkExecutionMember = "The user participated in %s executions such as %s%s. Do you want to remove the user from those executions as well? (The data related to this user will not be deleted.)"; $lang->project->unlinkExecutionMembers = "The team members you are removing are also in the execution team of this project. Do you want to remove them from the execution team too?"; $lang->project->productTip = 'After clicking New Product, the project will not be linked to the selected product.'; +$lang->project->noDevStage = "Il n'y a pas de phase R&D dans ce projet, ou vous n'avez pas la permission d'accès. La version ne peut pas être créée pour le moment."; $lang->project->tenThousand = ''; $lang->project->hundredMillion = 'Hundred Million'; diff --git a/module/project/lang/vi.php b/module/project/lang/vi.php index 9258dbb808..6b22c04e56 100644 --- a/module/project/lang/vi.php +++ b/module/project/lang/vi.php @@ -117,6 +117,7 @@ $lang->project->linkedProjectsTip = 'Linked projects are as follows'; $lang->project->multiLinkedProductsTip = 'The following products linked to this project are also linked to other projects, please unlink before proceeding.'; $lang->project->linkStoryByPlanTips = "This action will associate all {$lang->SRCommon} under the selected plan to this project"; $lang->project->createExecution = "There is no {$lang->executionCommon} under this project, please create {$lang->executionCommon} first"; +$lang->project->noDevStage = 'There is no R&D stage under this project, or you do not have access permissions. The creation of builds is not supported at the moment.'; $lang->project->tenThousand = ''; diff --git a/module/project/lang/zh-cn.php b/module/project/lang/zh-cn.php index eacc6c49c0..2a4bc0aeb5 100644 --- a/module/project/lang/zh-cn.php +++ b/module/project/lang/zh-cn.php @@ -195,6 +195,7 @@ $lang->project->createExecution = "该项目下没有{$lang->executionCom $lang->project->unlinkExecutionMember = "该用户参与了%s%s%s个{$lang->execution->common},是否同时将其移除?(该用户所产生的数据不会受影响。)"; $lang->project->unlinkExecutionMembers = "移除的团队成员还参与了项目下的执行,是否同步从执行团队中移除?"; $lang->project->productTip = '点击新建产品后,项目将不会关联已选中的产品。'; +$lang->project->noDevStage = '该项目下没有研发类型的阶段,或者您没有权限访问,暂时不支持创建版本。'; $lang->project->tenThousand = '万'; $lang->project->hundredMillion = '亿'; diff --git a/module/project/lang/zh-tw.php b/module/project/lang/zh-tw.php index da49a6d435..a99512886a 100644 --- a/module/project/lang/zh-tw.php +++ b/module/project/lang/zh-tw.php @@ -179,6 +179,7 @@ $lang->project->linkStoryByPlanTips = "此操作會將所選計划下面的{$ $lang->project->createExecution = "該項目下沒有{$lang->executionCommon},請先創建{$lang->executionCommon}"; $lang->project->unlinkExecutionMember = "該用戶參與了%s%s%s個{$lang->execution->common},是否同時將其移除?(該用戶所產生的數據不會受影響。)"; $lang->project->unlinkExecutionMembers = "移除的團隊成員還參與了項目下的執行,是否同步從執行團隊中移除?"; +$lang->project->noDevStage = '該項目下沒有研發類型的階段,或者您沒有權限訪問,暫時不支持創建版本。'; $lang->project->tenThousand = '萬'; diff --git a/module/project/model.php b/module/project/model.php index 88f4eee237..8b3068a3d2 100644 --- a/module/project/model.php +++ b/module/project/model.php @@ -2610,6 +2610,9 @@ class projectModel extends model if(isset($project->model) and $project->model == 'waterfall') { global $lang; + $lang->project->createExecution = str_replace($this->lang->executionCommon, $lang->project->stage, $lang->project->createExecution); + $lang->project->lastIteration = str_replace($this->lang->executionCommon, $lang->project->stage, $lang->project->lastIteration); + $this->loadModel('execution'); $lang->executionCommon = $lang->project->stage; diff --git a/module/project/view/build.html.php b/module/project/view/build.html.php index 69dcb7be6e..fd803187a7 100644 --- a/module/project/view/build.html.php +++ b/module/project/view/build.html.php @@ -11,8 +11,10 @@ */ ?> + +project->noDevStage)?> project->createExecution)?> build->confirmDelete)?>