* Merge: Finish task #113420.

This commit is contained in:
hufangzhou
2024-03-18 13:17:31 +08:00
parent 93ea6df3ce
commit 2c85628991
11 changed files with 24 additions and 2 deletions
+2
View File
@@ -188,6 +188,8 @@ class datatable extends control
if($extra == 'unsetStory' && isset($cols['story'])) unset($cols['story']);
if($this->config->edition != 'ipd' || ($this->config->edition == 'ipd' && $module == 'product' && $method == 'browse' && $extra != 'requirement')) unset($cols['roadmap']);
$this->view->module = $module;
$this->view->method = $method;
$this->view->cols = $cols;
+1
View File
@@ -8,6 +8,7 @@ $config->product->search['fields']['keywords'] = $lang->story->keywords;
$config->product->search['fields']['status'] = $lang->story->status;
$config->product->search['fields']['pri'] = $lang->story->pri;
$config->product->search['fields']['module'] = $lang->story->module;
$config->product->search['fields']['roadmap'] = $lang->story->roadmap;
$config->product->search['fields']['stage'] = $lang->story->stage;
$config->product->search['fields']['product'] = $lang->story->product;
+2
View File
@@ -734,6 +734,8 @@ class productModel extends model
unset($searchConfig['params']['plan']);
unset($searchConfig['fields']['stage']);
unset($searchConfig['params']['stage']);
if($this->config->edition == 'ipd') $searchConfig['params']['roadmap']['values'] = $this->loadModel('roadmap')->getPairs($productID);
}
else
{
+2 -1
View File
@@ -183,13 +183,14 @@ if($app->rawModule == 'projectstory') $config->story->dtable->fieldList['title']
$setting = $this->loadModel('datatable')->getSetting('product', 'browse', false, $storyType);
if($storyType == 'requirement') unset($setting['plan'], $setting['stage'], $setting['taskCount'], $setting['bugCount'], $setting['caseCount']);
if($storyType == 'story' || ($config->edition != 'ipd' && $storyType == 'requirement')) unset($setting['roadmap']);
$cols = array_values($setting);
/* DataTable data. */
$this->loadModel('story');
$data = array();
$options = array('storyTasks' => $storyTasks, 'storyBugs' => $storyBugs, 'storyCases' => $storyCases, 'modules' => $modules, 'plans' => (isset($plans) ? $plans : array()), 'users' => $users, 'execution' => $project);
$options = array('storyTasks' => $storyTasks, 'storyBugs' => $storyBugs, 'storyCases' => $storyCases, 'modules' => $modules, 'plans' => (isset($plans) ? $plans : array()), 'users' => $users, 'execution' => $project, 'roadmaps' => $roadmaps);
foreach($stories as $story)
{
$story->rawModule = $story->module;
+3
View File
@@ -1177,6 +1177,8 @@ class productZen extends product
{
if($isProjectStory && !$productID && !empty($this->products)) $productID = (int)key($this->products); // If toggle a project by the #swapper component on the story page of the projectstory module, the $productID may be empty. Make sure it has value.
if($this->config->edition != 'ipd' || ($this->config->edition == 'ipd' && $storyType == 'story')) unset($this->config->product->search['fields']['roadmap']);
if(isset($project->hasProduct) && empty($project->hasProduct))
{
/* The none-product project don't need display the product in the search form. */
@@ -1442,6 +1444,7 @@ class productZen extends product
$this->view->storyTasks = $this->loadModel('task')->getStoryTaskCounts($storyIdList);
$this->view->storyBugs = $this->loadModel('bug')->getStoryBugCounts($storyIdList);
$this->view->storyCases = $this->loadModel('testcase')->getStoryCaseCounts($storyIdList);
$this->view->roadmaps = ($this->config->edition == 'ipd' && $storyType == 'requirement') ? $this->loadModel('roadmap')->getPairs($product->id) : array();
$this->display();
}
+9 -1
View File
@@ -2,7 +2,7 @@
global $lang, $app;
$config->story->dtable = new stdclass();
$config->story->dtable->defaultField = array('id', 'title', 'pri', 'plan', 'status', 'openedBy', 'estimate', 'reviewedBy', 'stage', 'assignedTo', 'taskCount', 'actions');
$config->story->dtable->defaultField = array('id', 'title', 'pri', 'plan', 'roadmap', 'status', 'openedBy', 'estimate', 'reviewedBy', 'stage', 'assignedTo', 'taskCount', 'actions');
$config->story->dtable->fieldList['id']['name'] = 'id';
$config->story->dtable->fieldList['id']['title'] = $lang->idAB;
@@ -61,6 +61,14 @@ $config->story->dtable->fieldList['plan']['show'] = true;
$config->story->dtable->fieldList['plan']['group'] = 4;
$config->story->dtable->fieldList['plan']['dataSource'] = array('module' => 'productplan', 'method' => 'getPairs', 'params' => '$productID');
$config->story->dtable->fieldList['roadmap']['name'] = 'roadmap';
$config->story->dtable->fieldList['roadmap']['title'] = $lang->story->roadmap;
$config->story->dtable->fieldList['roadmap']['fixed'] = 'left';
$config->story->dtable->fieldList['roadmap']['required'] = false;
$config->story->dtable->fieldList['roadmap']['type'] = 'html';
$config->story->dtable->fieldList['roadmap']['show'] = true;
$config->story->dtable->fieldList['roadmap']['sortType'] = true;
$config->story->dtable->fieldList['category']['name'] = 'category';
$config->story->dtable->fieldList['category']['title'] = $lang->story->category;
$config->story->dtable->fieldList['category']['sortType'] = true;
+1
View File
@@ -120,6 +120,7 @@ $lang->story->project = $lang->projectCommon;
$lang->story->branch = "Branch/Platform";
$lang->story->module = 'Module';
$lang->story->moduleAB = 'Module';
$lang->story->roadmap = 'Roadmap';
$lang->story->source = 'Von';
$lang->story->sourceNote = 'Hinweis';
$lang->story->fromBug = 'Von Bug';
+1
View File
@@ -120,6 +120,7 @@ $lang->story->project = $lang->projectCommon;
$lang->story->branch = "Branch/Platform";
$lang->story->module = 'Module';
$lang->story->moduleAB = 'Module';
$lang->story->roadmap = 'Roadmap';
$lang->story->source = 'From';
$lang->story->sourceNote = 'Note';
$lang->story->fromBug = 'From Bug';
+1
View File
@@ -120,6 +120,7 @@ $lang->story->project = $lang->projectCommon;
$lang->story->branch = "Branche/Plateforme";
$lang->story->module = 'Module';
$lang->story->moduleAB = 'Module';
$lang->story->roadmap = 'Roadmap';
$lang->story->source = 'De';
$lang->story->sourceNote = 'Note';
$lang->story->fromBug = 'Depuis Bug';
+1
View File
@@ -120,6 +120,7 @@ $lang->story->project = "所属{$lang->projectCommon}";
$lang->story->branch = "平台/分支";
$lang->story->module = '所属模块';
$lang->story->moduleAB = '模块';
$lang->story->roadmap = '所属路标';
$lang->story->source = "来源";
$lang->story->sourceNote = '来源备注';
$lang->story->fromBug = '来源Bug';
+1
View File
@@ -4411,6 +4411,7 @@ class storyModel extends model
$story->module = zget(zget($options, 'modules', array()), $story->module, '');
$story->branch = zget(zget($options, 'branches', array()), $story->branch, '');
$story->plan = isset($story->planTitle) ? $story->planTitle : zget(zget($options, 'plans', array()), $story->plan, '');
$story->roadmap = zget(zget($options, 'roadmaps', array()), $story->roadmap, 0);
$story->source = zget($this->lang->story->sourceList, $story->source, '');
$story->category = zget($this->lang->story->categoryList, $story->category);