diff --git a/module/project/config.php b/module/project/config.php index d3149df35e..4b93022ec3 100644 --- a/module/project/config.php +++ b/module/project/config.php @@ -141,9 +141,11 @@ if(isset($config->setCode) and $config->setCode == 0) unset($config->project->da $config->project->checkList = new stdclass(); $config->project->checkList->scrum = array('bug', 'execution', 'build', 'doc', 'release', 'testtask', 'case'); $config->project->checkList->waterfall = array('execution', 'design', 'doc', 'bug', 'case', 'build', 'release', 'testtask'); +$config->project->checkList->kanban = array('execution', 'build'); $config->project->maxCheckList = new stdclass(); $config->project->maxCheckList->scrum = array('bug', 'execution', 'build', 'doc', 'release', 'testtask', 'case', 'issue', 'risk', 'meeting'); $config->project->maxCheckList->waterfall = array('execution', 'design', 'doc', 'bug', 'case', 'build', 'release', 'testtask', 'review', 'build', 'researchplan', 'issue', 'risk', 'opportunity', 'auditplan', 'gapanalysis', 'meeting'); +$config->project->maxCheckList->kanban = array('execution', 'build'); $config->project->search['module'] = 'project'; $config->project->search['fields']['name'] = $lang->project->name; diff --git a/module/project/control.php b/module/project/control.php index f88b9241c5..63a0f80bd4 100755 --- a/module/project/control.php +++ b/module/project/control.php @@ -762,7 +762,7 @@ class project extends control } } - if($project->model != 'kanban') $canChangeModel = $this->project->checkCanChangeModel($projectID, $project->model); + $canChangeModel = $this->project->checkCanChangeModel($projectID, $project->model); $this->view->title = $this->lang->project->edit; $this->view->position[] = $this->lang->project->edit; diff --git a/module/project/model.php b/module/project/model.php index 46d27fcb6d..186d169ffe 100644 --- a/module/project/model.php +++ b/module/project/model.php @@ -2946,7 +2946,21 @@ class projectModel extends model $type = ''; $table = constant('TABLE_'. strtoupper($module)); - if($module == 'execution') $type = $model == 'scrum' ? 'sprint' : 'stage'; + if($module == 'execution') + { + switch($model) + { + case 'scrum': + $type = 'sprint'; + break; + case 'waterfall': + $type = 'stage'; + break; + case 'kanban': + $type = 'kanban'; + break; + } + } $object = $this->getDataByProject($table, $projectID, $type); if(!empty($object)) return false; diff --git a/module/project/view/edit.html.php b/module/project/view/edit.html.php index 32d0f8f238..c0cb8c9a18 100755 --- a/module/project/view/edit.html.php +++ b/module/project/view/edit.html.php @@ -47,7 +47,7 @@
- model != 'kanban'):?> + model != 'kanban' or $disableModel == ''):?> @@ -157,7 +157,7 @@
type != 'normal' and isset($branchGroups[$product->id]);?>
'> - product->common;?> + product->common;?> id, "class='form-control chosen' onchange='loadBranches(this)' data-last='" . $product->id . "' data-type='" . $product->type . "'");?>
@@ -230,7 +230,7 @@
project->model;?> project->modelList, $model, "class='form-control chosen' required $disableModel");?>
model == 'kanban') echo html::hidden('model', $project->model); + if($disableModel == 'disabled') echo html::hidden('model', $project->model); echo html::submitButton(); if(!isonlybody()) echo html::backButton(); ?>