This commit is contained in:
tanghucheng
2023-08-16 14:41:10 +08:00
parent 4eaf64cad1
commit b657dc9fa5
2 changed files with 4 additions and 3 deletions
+2 -1
View File
@@ -1327,6 +1327,7 @@ class productModel extends model
*/
public function getProjectListByProduct($productID, $browseType = 'all', $branch = 0, $involved = 0, $orderBy = 'order_desc', $pager = null)
{
$branch = $branch ? $branch : 0;
$projectList = $this->dao->select('DISTINCT t2.*')->from(TABLE_PROJECTPRODUCT)->alias('t1')
->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.project = t2.id')
->leftJoin(TABLE_TEAM)->alias('t3')->on('t2.id=t3.root')
@@ -1347,7 +1348,7 @@ class productModel extends model
->orWhere("CONCAT(',', t2.whitelist, ',')")->like("%,{$this->app->user->account},%")
->markRight(1)
->fi()
->beginIF(!empty($branch) and $branch !== 'all')->andWhere('t1.branch')->in($branch)->fi()
->beginIF($branch !== 'all')->andWhere('t1.branch')->in($branch)->fi()
->andWhere('t2.deleted')->eq('0')
->orderBy($orderBy)
->page($pager, 't2.id')
+2 -2
View File
@@ -452,7 +452,7 @@ class story extends control
$this->view->customFields = $customFields;
$this->view->showFields = $this->config->story->custom->createFields;
$requirementStatus = strpos($product->vision, 'or') !== false ? 'launched' : 'changing,active,reviewing';
$requirementStatus = strpos($product->vision, 'or') !== false ? 'launched' : 'active';
$this->view->URS = $storyType == 'story' ? $this->story->getProductStoryPairs($productID, $branch, $moduleIdList, $requirementStatus, 'id_desc', 0, '', 'requirement') : '';
$this->view->title = $product->name . $this->lang->colon . $this->lang->story->create;
@@ -3113,7 +3113,7 @@ class story extends control
*/
public function ajaxGetProductUserStories($productID, $branchID = 0, $requirementList = 0)
{
$URS = $this->story->getProductStoryPairs($productID, $branchID, 0, 'changing,active,reviewing', 'id_desc', 0, '', 'requirement');
$URS = $this->story->getProductStoryPairs($productID, $branchID, 0, 'active', 'id_desc', 0, '', 'requirement');
return print(html::select('URS[]', $URS, $requirementList, "class='form-control chosen' multiple"));
}