diff --git a/module/datatable/control.php b/module/datatable/control.php index 1cda94ad01..71852e8913 100644 --- a/module/datatable/control.php +++ b/module/datatable/control.php @@ -130,6 +130,8 @@ class datatable extends control } if($extra == 'unsetStory' and isset($cols['story'])) unset($cols['story']); + if($moduleName == 'product' and $method == 'browse' and $extra != 'requirement') unset($cols['roadmap']); + $this->view->cols = $cols; $this->view->setting = $setting; $this->view->extra = $extra; diff --git a/module/product/config.php b/module/product/config.php index 017697e35a..41a7a09cf0 100644 --- a/module/product/config.php +++ b/module/product/config.php @@ -29,7 +29,7 @@ $config->product->search['fields']['pri'] = $lang->story->pri; $config->product->search['fields']['product'] = $lang->story->product; $config->product->search['fields']['branch'] = ''; $config->product->search['fields']['module'] = $lang->story->module; -$config->product->search['fields']['roadmap'] = ''; +$config->product->search['fields']['roadmap'] = $lang->story->roadmap; $config->product->search['fields']['plan'] = $lang->story->plan; $config->product->search['fields']['estimate'] = $lang->story->estimate; diff --git a/module/product/control.php b/module/product/control.php index 5118cbebdb..9534317d6d 100755 --- a/module/product/control.php +++ b/module/product/control.php @@ -333,6 +333,8 @@ class product extends control unset($this->config->product->search['fields']['stage']); } + if($storyType == 'story') unset($this->config->product->search['fields']['roadmap']); + $project = $this->loadModel('project')->getByID($projectID); if(isset($project->hasProduct) && empty($project->hasProduct)) { diff --git a/module/product/model.php b/module/product/model.php index 3a7c5a9e9b..eead5c69b2 100755 --- a/module/product/model.php +++ b/module/product/model.php @@ -1193,6 +1193,8 @@ class productModel extends model $this->config->product->search['params']['stage']['values'] = array('' => '') + $this->lang->story->stageList; + if($this->config->edition == 'ipd') $this->config->product->search['params']['roadmap']['values'] = $this->loadModel('roadmap')->getPairs(); + /* Get modules. */ $this->loadModel('tree'); if($this->app->tab == 'project') diff --git a/module/story/config.php b/module/story/config.php index 5a757cc5a3..30b8943cdc 100644 --- a/module/story/config.php +++ b/module/story/config.php @@ -56,7 +56,7 @@ $config->story->excludeCheckFileds = ',uploadImage,category,reviewer,reviewDitto global $lang, $app; $config->story->datatable = new stdclass(); -$config->story->datatable->defaultField = array('id', 'title', 'pri', 'plan', 'status', 'estimate', 'reviewedBy', 'stage', 'assignedTo', 'openedBy', 'openedDate', 'actions'); +$config->story->datatable->defaultField = array('id', 'title', 'pri', 'plan', 'roadmap', 'status', 'estimate', 'reviewedBy', 'stage', 'assignedTo', 'openedBy', 'openedDate', 'actions'); $config->story->datatable->fieldList['id']['title'] = 'idAB'; $config->story->datatable->fieldList['id']['fixed'] = 'left'; @@ -102,6 +102,13 @@ $config->story->datatable->fieldList['plan']['required'] = 'no'; $config->story->datatable->fieldList['plan']['control'] = 'select'; $config->story->datatable->fieldList['plan']['dataSource'] = array('module' => 'productplan', 'method' => 'getPairs', 'params' => '$productID'); +$config->story->datatable->fieldList['roadmap']['title'] = 'roadmap'; +$config->story->datatable->fieldList['roadmap']['fixed'] = 'no'; +$config->story->datatable->fieldList['roadmap']['required'] = 'no'; +$config->story->datatable->fieldList['roadmap']['type'] = 'html'; +$config->story->datatable->fieldList['roadmap']['display'] = 'yes'; +$config->story->datatable->fieldList['roadmap']['sortType'] = true; + $config->story->datatable->fieldList['status']['title'] = 'statusAB'; $config->story->datatable->fieldList['status']['fixed'] = 'no'; $config->story->datatable->fieldList['status']['width'] = '70'; diff --git a/module/story/model.php b/module/story/model.php index e5e1a78e03..f7c9dfdab0 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -6791,6 +6791,7 @@ class storyModel extends model foreach($setting as $key => $set) { if($storyType == 'requirement' and in_array($set->id, array('plan', 'stage', 'taskCount', 'bugCount', 'caseCount'))) $set->show = false; + if($storyType == 'story' and in_array($set->id, array('roadmap'))) $set->show = false; if($viewType == 'xhtml' and !in_array($set->id, array('title', 'id', 'pri', 'status'))) $set->show = false; if(empty($set->show)) continue; @@ -6857,6 +6858,7 @@ class storyModel extends model $canView = common::hasPriv($storyType, 'view', null, "storyType=$storyType"); $tab = $this->app->tab; $rows = array(); + $roadmaps = $this->config->edition == 'ipd' ? $this->loadModel('roadmap')->getPairs() : array(); if($this->config->edition != 'open') { @@ -6904,6 +6906,7 @@ class storyModel extends model if($col->name == 'bugCount') $data->bugCount = $storyBugs[$story->id] > 0 ? html::a(helper::createLink('story', 'bugs', "storyID=$story->id"), $storyBugs[$story->id], '', 'class="iframe" data-toggle="modal"') : '0'; if($col->name == 'caseCount') $data->caseCount = $storyCases[$story->id] > 0 ? html::a(helper::createLink('story', 'cases', "storyID=$story->id"), $storyCases[$story->id], '', 'class="iframe" data-toggle="modal"') : '0'; if($col->name == 'estimate') $data->estimate = (float)$story->estimate . $this->config->hourUnit; + if($col->name == 'roadmap') $data->roadmap = "" . zget($roadmaps, $story->roadmap, '') . ''; if($col->name == 'reviewedBy') { $reviewers = array_unique(array_filter(explode(',', $story->reviewedBy)));