* Fix the bug of feedback tree browse drop menu.

This commit is contained in:
xieqiyu
2024-03-27 11:06:47 +08:00
committed by liyang
parent 03170f01ee
commit 7e0fc9fe9d
2 changed files with 5 additions and 2 deletions
+4 -2
View File
@@ -156,12 +156,14 @@ class dropmenu extends wg
}
if($tab == 'caselib') $objectID = data('libID');
if($tab == 'feedback') $objectID = data('productID');
if(empty($url) && empty($data)) $url = createLink($tab, 'ajaxGetDropMenu', "objectID=$objectID&module=$module&method=$method&extra=$extra");
if(empty($text) && !empty($tab) && !empty($objectID))
{
$object = $app->control->loadModel($tab)->getByID((int)$objectID);
$text = $object ? $object->name : '';
$loadModel = $tab == 'feedback' ? 'product' : $tab;
$object = $app->control->loadModel($loadModel)->getByID((int)$objectID);
$text = $object ? $object->name : '';
if($tab == 'execution' && !$object->hasProduct)
{
$project = $app->control->loadModel('project')->getByID((int)$object->project);
+1
View File
@@ -72,6 +72,7 @@ class tree extends control
{
$syncConfig = json_decode($this->config->global->syncProduct, true);
$this->view->syncConfig = isset($syncConfig[$viewType]) ? $syncConfig[$viewType] : array();
$this->view->productID = $rootID;
}
/* 获取产品的分支。 Get branches of product. */