* Modify stories that testcase can link at page first load.

This commit is contained in:
songchenxuan
2023-05-24 13:23:05 +08:00
parent abd24e169b
commit 3404fc5f60
+4 -4
View File
@@ -598,7 +598,8 @@ class testcase extends control
$modules = $this->tree->getAllChildID($modules);
}
$stories = $this->story->getProductStoryPairs($productID, $branch, $modules, 'active', 'id_desc', 50, 'full', 'story', false);
$storyStatus = $this->story->getStatusList('noclosed');
$stories = $this->story->getProductStoryPairs($productID, $branch, $modules, $storyStatus, 'id_desc', 0, 'full', 'story', false);
if($this->app->tab != 'qa' and $this->app->tab != 'product')
{
$projectID = $this->app->tab == 'project' ? $this->session->project : $this->session->execution;
@@ -607,7 +608,6 @@ class testcase extends control
/* Logic of task 44139. */
if(!in_array($this->app->tab, array('execution', 'project')) and empty($stories))
{
$storyStatus = $this->story->getStatusList('noclosed');
$stories = $this->story->getProductStoryPairs($productID, $branch, 0, $storyStatus, 'id_desc', 0, 'full', 'story', 1);
}
@@ -1060,18 +1060,18 @@ class testcase extends control
$moduleIdList = $case->module;
if($case->module) $moduleIdList = $this->tree->getAllChildID($case->module);
$storyStatus = $this->story->getStatusList('noclosed');
if($this->app->tab == 'execution')
{
$stories = $this->story->getExecutionStoryPairs($case->execution, $productID, $case->branch, $moduleIdList);
}
else
{
$stories = $this->story->getProductStoryPairs($productID, $case->branch, $moduleIdList, 'all','id_desc', 0, 'full', 'story', false);
$stories = $this->story->getProductStoryPairs($productID, $case->branch, $moduleIdList, $storyStatus,'id_desc', 0, 'full', 'story', false);
}
/* Logic of task 44139. */
if(!in_array($this->app->tab, array('execution', 'project')) and empty($stories))
{
$storyStatus = $this->story->getStatusList('noclosed');
$stories = $this->story->getProductStoryPairs($case->product, $case->branch, 0, $storyStatus, 'id_desc', 0, 'full', 'story', 1);
}