Merge branch 'sprint/235_liumengyi_66938' into 'sprint/235'
* Finish task #66938, fix bug #25942. See merge request easycorp/zentaopms!5174
This commit is contained in:
@@ -1409,18 +1409,22 @@ class programModel extends model
|
||||
}
|
||||
|
||||
/* Get the number of project teams. */
|
||||
$teams = $this->dao->select('root,count(*) as teams')->from(TABLE_TEAM)
|
||||
->where('root')->in($projectKeys)
|
||||
->andWhere('type')->eq('project')
|
||||
->groupBy('root')
|
||||
$teams = $this->dao->select('t1.root,count(t1.id) as teams')->from(TABLE_TEAM)->alias('t1')
|
||||
->leftJoin(TABLE_USER)->alias('t2')->on('t1.account=t2.account')
|
||||
->where('t1.root')->in($projectKeys)
|
||||
->andWhere('t1.type')->eq('project')
|
||||
->andWhere('t2.deleted')->eq(0)
|
||||
->groupBy('t1.root')
|
||||
->fetchAll('root');
|
||||
|
||||
/* Get the members of project teams. */
|
||||
if($this->cookie->projectType and $this->cookie->projectType == 'bycard')
|
||||
{
|
||||
$teamMembers = $this->dao->select('root,account')->from(TABLE_TEAM)
|
||||
->where('root')->in($projectKeys)
|
||||
->andWhere('type')->eq('project')
|
||||
$teamMembers = $this->dao->select('t1.root,t1.account')->from(TABLE_TEAM)->alias('t1')
|
||||
->leftJoin(TABLE_USER)->alias('t2')->on('t1.account=t2.account')
|
||||
->where('t1.root')->in($projectKeys)
|
||||
->andWhere('t1.type')->eq('project')
|
||||
->andWhere('t2.deleted')->eq(0)
|
||||
->fetchGroup('root', 'account');
|
||||
}
|
||||
|
||||
|
||||
@@ -219,9 +219,11 @@ class projectModel extends model
|
||||
if(empty($projects)) return array();
|
||||
|
||||
$projectIdList = array_keys($projects);
|
||||
$teams = $this->dao->select('root, count(*) as count')->from(TABLE_TEAM)
|
||||
->where('root')->in($projectIdList)
|
||||
->groupBy('root')
|
||||
$teams = $this->dao->select('t1.root, count(t1.id) as count')->from(TABLE_TEAM)->alias('t1')
|
||||
->leftJoin(TABLE_USER)->alias('t2')->on('t1.account=t2.account')
|
||||
->where('t1.root')->in($projectIdList)
|
||||
->andWhere('t2.deleted')->eq(0)
|
||||
->groupBy('t1.root')
|
||||
->fetchAll('root');
|
||||
|
||||
$condition = $this->config->systemMode == 'classic' ? 't2.id as project' : 't2.parent as project';
|
||||
@@ -298,9 +300,11 @@ class projectModel extends model
|
||||
if(empty($projects)) return array();
|
||||
$projectIdList = array_keys($projects);
|
||||
|
||||
$teams = $this->dao->select('root, count(*) as teams')->from(TABLE_TEAM)
|
||||
->where('root')->in($projectIdList)
|
||||
->andWhere('type')->eq('project')
|
||||
$teams = $this->dao->select('t1.root, count(t1.id) as teams')->from(TABLE_TEAM)->alias('t1')
|
||||
->leftJoin(TABLE_USER)->alias('t2')->on('t1.account=t2.account')
|
||||
->where('t1.root')->in($projectIdList)
|
||||
->andWhere('t1.type')->eq('project')
|
||||
->andWhere('t2.deleted')->eq(0)
|
||||
->groupBy('root')->fetchPairs();
|
||||
|
||||
$hours = $this->dao->select('t2.parent as project, ROUND(SUM(t1.consumed), 1) AS consumed, ROUND(SUM(t1.estimate), 1) AS estimate')->from(TABLE_TASK)->alias('t1')
|
||||
|
||||
@@ -1718,6 +1718,8 @@ class story extends control
|
||||
$storyIdList = $this->post->storyIdList;
|
||||
$storyIdList = array_unique($storyIdList);
|
||||
|
||||
$this->story->replaceURLang($storyType);
|
||||
|
||||
/* Get edited stories. */
|
||||
$stories = $this->story->getByList($storyIdList);
|
||||
$productStoryList = array();
|
||||
|
||||
Reference in New Issue
Block a user