* Fix bug of link story.

This commit is contained in:
xieqiyu
2022-08-23 15:23:17 +08:00
parent bd510fe0d4
commit 1590364db3
2 changed files with 9 additions and 10 deletions
+9 -8
View File
@@ -3056,6 +3056,15 @@ class storyModel extends model
if(empty($normalProducts) and empty($branchProducts)) $storyQuery .= '1 = 1';
$storyQuery .= ') ';
if($this->app->moduleName == 'release' or $this->app->moduleName == 'build')
{
$storyQuery .= " AND `status` NOT IN ('draft')"; // Fix bug #990.
}
else
{
$storyQuery .= " AND `status` NOT IN ('draft', 'closed')";
}
if($this->app->rawModule == 'build' and $this->app->rawMethod == 'linkstory') $storyQuery .= " AND `parent` != '-1'";
}
elseif(strpos($storyQuery, $allBranch) !== false)
@@ -3068,14 +3077,6 @@ class storyModel extends model
}
$storyQuery = preg_replace("/`plan` +LIKE +'%([0-9]+)%'/i", "CONCAT(',', `plan`, ',') LIKE '%,$1,%'", $storyQuery);
if($this->app->moduleName == 'release' or $this->app->moduleName == 'build')
{
$storyQuery .= " AND `status` NOT IN ('draft', 'reviewing')"; // Fix bug #990.
}
else
{
$storyQuery .= " AND `status` NOT IN ('draft', 'reviewing', 'closed')";
}
return $this->getBySQL($queryProductID, $storyQuery, $orderBy, $pager, $type);
}
-2
View File
@@ -280,7 +280,6 @@
<?php $this->printExtendFields($story, 'div', 'position=right');?>
<?php if($story->status == 'closed'):?>
<div class='detail'>
<div class='detail-title'><?php echo $lang->story->legendMisc;?></div>
<table class='table table-form'>
@@ -318,7 +317,6 @@
</tr>
</table>
</div>
<?php endif;?>
</div>
</div>
</div>