Merge branch 'master' into sprint/biz17

This commit is contained in:
liugang
2022-11-21 13:08:59 +08:00
621 changed files with 18018 additions and 6726 deletions
+43 -18
View File
@@ -466,7 +466,7 @@ class treeModel extends model
{
$this->buildTree($treeMenu, $module, $type, $userFunc, $extra, $branch);
}
elseif(isset($executionModules[$module->id]))
elseif(isset($executionModules[$module->id]) || !empty($product->shadow))
{
$this->buildTree($treeMenu, $module, $type, $userFunc, $extra, $branch);
}
@@ -852,7 +852,7 @@ class treeModel extends model
{
$extra['productID'] = $id;
$projectProductLink = helper::createLink('projectstory', 'story', "projectID=$rootID&productID=$id&branch=all");
$executionProductLink = helper::createLink('execution', 'story', "executionID=$rootID&ordery=&status=byProduct&praram=$id");
$executionProductLink = helper::createLink('execution', 'story', "executionID=$rootID&storyType=story&orderBy=&type=byProduct&praram=$id");
$link = $this->app->rawModule == 'projectstory' ? $projectProductLink : $executionProductLink;
if($productNum > 1) $menu .= "<li>" . html::a($link, $product, '_self', "id='product$id' title=$product");
@@ -1083,16 +1083,44 @@ class treeModel extends model
{
$productID = zget($extra, 'productID', 0);
$projectID = $extra['projectID'];
return html::a(helper::createLink('projectstory', 'story', "projectID=$projectID&productID=$productID&branch=&browseType=byModule&param={$module->id}"), $module->name, '_self', "id='module{$module->id}' title='{$module->name}'");
return html::a(helper::createLink('projectstory', 'story', "projectID=$projectID&productID=$productID&branch=&browseType=byModule&param={$module->id}&storyType=story"), $module->name, '_self', "id='module{$module->id}' title='{$module->name}'");
}
elseif(isset($extra['executionID']) and !empty($extra['executionID']))
{
$executionID = $extra['executionID'];
return html::a(helper::createLink('execution', 'story', "executionID=$executionID&orderBy=order_desc&type=byModule&param={$module->id}"), $module->name, '_self', "id='module{$module->id}' title='{$module->name}'");
return html::a(helper::createLink('execution', 'story', "executionID=$executionID&storyType=story&orderBy=order_desc&type=byModule&param={$module->id}"), $module->name, '_self', "id='module{$module->id}' title='{$module->name}'");
}
else
{
return html::a(helper::createLink('product', 'browse', "root={$module->root}&branch={$extra['branchID']}&type=byModule&param={$module->id}"), $module->name, '_self', "id='module{$module->id}' title='{$module->name}'");
return html::a(helper::createLink('product', 'browse', "root={$module->root}&branch={$extra['branchID']}&type=byModule&param={$module->id}&storyType=story"), $module->name, '_self', "id='module{$module->id}' title='{$module->name}'");
}
}
/**
* Create link of requirement for waterfall.
*
* @param string $type
* @param object $module
* @param array $extra
* @access public
* @return string
*/
public function createRequirementLink($type, $module, $extra = array())
{
if(isset($extra['projectID']) and !empty($extra['projectID']))
{
$productID = zget($extra, 'productID', 0);
$projectID = $extra['projectID'];
return html::a(helper::createLink('projectstory', 'story', "projectID=$projectID&productID=$productID&branch=&browseType=byModule&param={$module->id}&storyType=requirement"), $module->name, '_self', "id='module{$module->id}' title='{$module->name}'");
}
elseif(isset($extra['executionID']) and !empty($extra['executionID']))
{
$executionID = $extra['executionID'];
return html::a(helper::createLink('execution', 'story', "executionID=$executionID&storyType=requirement&orderBy=order_desc&type=byModule&param={$module->id}"), $module->name, '_self', "id='module{$module->id}' title='{$module->name}'");
}
else
{
return html::a(helper::createLink('product', 'browse', "root={$module->root}&branch={$extra['branchID']}&type=byModule&param={$module->id}&storyType=requirement"), $module->name, '_self', "id='module{$module->id}' title='{$module->name}'");
}
}
@@ -1143,19 +1171,6 @@ class treeModel extends model
return html::a(helper::createLink('projectstory', 'story', "projectID={$extra['executionID']}&productID=$productID&branch=&browseType=byModule&param={$module->id}"), $module->name, '_self', "id='module{$module->id}' title='{$module->name}'");
}
/**
* Create link of requirement for waterfall.
*
* @param string $type
* @param object $module
* @access public
* @return string
*/
public function createRequirementLink($type, $module)
{
return html::a(helper::createLink($this->app->rawModule, $this->app->rawMethod, "root={$module->root}&branch=&type=byModule&param={$module->id}&storyType=requirement"), $module->name, '_self', "id='module{$module->id}' title='{$module->name}'");
}
/**
* Create link of a doc.
*
@@ -1976,6 +1991,8 @@ class treeModel extends model
$this->dao->update(TABLE_TASK)->set('module')->eq($module->parent)->where('module')->in($childs)->exec();
$this->dao->update(TABLE_BUG)->set('module')->eq($module->parent)->where('module')->in($childs)->exec();
$this->dao->update(TABLE_CASE)->set('module')->eq($module->parent)->where('module')->in($childs)->exec();
$this->dao->update(TABLE_FEEDBACK)->set('module')->eq($module->parent)->where('module')->in($childs)->exec();
$this->dao->update(TABLE_TICKET)->set('module')->eq($module->parent)->where('module')->in($childs)->exec();
$cookieName = 'storyModule';
break;
case 'chart':
@@ -1987,6 +2004,14 @@ class treeModel extends model
case 'dataview':
$this->dao->update(TABLE_DATAVIEW)->set('`group`')->eq($module->parent)->where('`group`')->in($childs)->exec();
break;
case 'feedback':
$this->dao->update(TABLE_FEEDBACK)->set('module')->eq($module->parent)->where('module')->in($childs)->exec();
$cookieName = 'feedbackModule';
break;
case 'ticket':
$this->dao->update(TABLE_TICKET)->set('module')->eq($module->parent)->where('module')->in($childs)->exec();
$cookieName = 'ticketModule';
break;
}
if(strpos($this->session->{$module->type . 'List'}, 'param=' . $moduleID)) $this->session->set($module->type . 'List', str_replace('param=' . $moduleID, 'param=0', $this->session->{$module->type . 'List'}));
if($cookieName) setcookie($cookieName, 0, time() - 3600, $this->config->webRoot, '', $this->config->cookieSecure, false);