* Finish task #113420.
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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))
|
||||
{
|
||||
|
||||
@@ -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')
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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 = "<span title='" . zget($roadmaps, $story->roadmap, '') . "'>" . zget($roadmaps, $story->roadmap, '') . '</span>';
|
||||
if($col->name == 'reviewedBy')
|
||||
{
|
||||
$reviewers = array_unique(array_filter(explode(',', $story->reviewedBy)));
|
||||
|
||||
Reference in New Issue
Block a user