diff --git a/module/story/model.php b/module/story/model.php index 815bd46bae..f877f00b02 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -1310,6 +1310,7 @@ class storyModel extends model * Get stories list of a product. * * @param int $productID + * @param int $branch * @param array|string $moduleIdList * @param string $status * @param string $orderBy @@ -2271,8 +2272,10 @@ class storyModel extends model /** * Merge plan title. * - * @param int|array $productID - * @param array $stories + * @param int|array $productID + * @param array $stories + * @param int $branch + * * @access public * @return array */ @@ -2289,10 +2292,7 @@ class storyModel extends model ->where('product')->in($productID) ->andWhere('deleted')->eq(0) ->fetchPairs('id', 'title'); - $stages = $this->dao->select('*')->from(TABLE_STORYSTAGE)->where('branch')->in($branch)->fetchGroup('story', 'branch'); - $branch = trim(str_replace(',0,', '', ",$branch,"), ','); - $branch = empty($branch) ? 0 : $branch; foreach($stories as $story) { $story->planTitle = ''; diff --git a/module/task/model.php b/module/task/model.php index beff8bd80f..f0450108ab 100644 --- a/module/task/model.php +++ b/module/task/model.php @@ -1239,7 +1239,7 @@ class taskModel extends model ->page($pager) ->fetchAll('id'); - $this->loadModel('common')->saveQueryCondition($this->dao->get(), 'task', ($productID or $type == 'needconfirm' or $type == 'myinvolved') ? false : true); + $this->loadModel('common')->saveQueryCondition($this->dao->get(), 'task', ($productID or in_array($type, array('assignedtome', 'myinvolved', 'needconfirm'))) ? false : true); if(empty($tasks)) return array();