* Fix bug #42306, show branch field only if the execution is releated to a branch product.

This commit is contained in:
liumengyi
2024-02-22 16:31:43 +08:00
parent 5929235178
commit 57f85e570f
+8
View File
@@ -1801,6 +1801,14 @@ class story extends control
if($project->model != 'scrum') $filterFields[] = ', plan,';
$this->config->story->exportFields = str_replace($filterFields, ',', $this->config->story->exportFields);
}
$products = $this->loadModel('product')->getProducts($executionID);
$hasBranch = false;
foreach($products as $product)
{
if($product->type != 'normal') $hasBranch = true;
}
if(!$hasBranch) $this->config->story->exportFields = str_replace(', branch', '', $this->config->story->exportFields);
$this->view->fileName = $fileName;
$this->view->allExportFields = $this->config->story->exportFields;