This commit is contained in:
liumengyi
2023-02-10 16:35:45 +08:00
parent d71abe0f43
commit 5850589edc
2 changed files with 8 additions and 6 deletions
+1 -1
View File
@@ -1216,7 +1216,7 @@ class kanban extends control
$this->view->products = $productPairs;
$this->view->selectedProductID = $selectedProductID;
$this->view->lanePairs = $this->kanban->getLanePairsByGroup($groupID);
$this->view->plans2Imported = $this->productplan->getList($selectedProductID, 0, 'all', $pager, 'begin_desc', 'skipparent');
$this->view->plans2Imported = $this->productplan->getList($selectedProductID, 0, 'all', $pager, 'begin_desc', 'skipparent|noproduct');
$this->view->pager = $pager;
$this->view->kanbanID = $kanbanID;
$this->view->regionID = $regionID;
+7 -5
View File
@@ -115,8 +115,9 @@ class productplanModel extends model
$productplanQuery = $this->session->productplanQuery;
$date = date('Y-m-d');
$plans = $this->dao->select('*')->from(TABLE_PRODUCTPLAN)->where('product')->eq($product)
->andWhere('deleted')->eq(0)
$plans = $this->dao->select('*')->from(TABLE_PRODUCTPLAN)
->where('deleted')->eq(0)
->beginIF(strpos($param, 'noproduct') === false or !empty($product))->andWhere('product')->eq($product)->fi()
->beginIF(!empty($branch) and $branch != 'all')->andWhere('branch')->eq($branch)->fi()
->beginIF(strpos(',all,undone,bySearch,review,', ",$browseType,") === false)->andWhere('status')->eq($browseType)->fi()
->beginIF($browseType == 'undone')->andWhere('status')->in('wait,doing')->fi()
@@ -137,7 +138,8 @@ class productplanModel extends model
{
$planProjects[$planID] = $this->dao->select('t1.project,t2.name')->from(TABLE_PROJECTPRODUCT)->alias('t1')
->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.project=t2.id')
->where('t1.product')->eq($product)
->where('1=1')
->beginIF(strpos($param, 'noproduct') === false or !empty($product))->andWhere('product')->eq($product)->fi()
->andWhere('t2.deleted')->eq(0)
->andWhere('t1.plan')->like(",$planID,")
->andWhere('t2.type')->in('sprint,stage,kanban')
@@ -147,7 +149,7 @@ class productplanModel extends model
$storyCountInTable = $this->dao->select('plan,count(story) as count')->from(TABLE_PLANSTORY)->where('plan')->in($planIdList)->groupBy('plan')->fetchPairs('plan', 'count');
$product = $this->loadModel('product')->getById($product);
if($product->type == 'normal')
if(!empty($product) and $product->type == 'normal')
{
$storyGroups = $this->dao->select('id,plan,estimate')->from(TABLE_STORY)
->where("plan")->in($planIdList)
@@ -159,7 +161,7 @@ class productplanModel extends model
$parentStories = $parentBugs = $parentHour = array();
foreach($plans as $plan)
{
if($product->type == 'normal')
if(!empty($product) and $product->type == 'normal')
{
$stories = zget($storyGroups, $plan->id, array());
$storyPairs = array();