Merge branch 'sgm_kanban' into 'kanban'

* Add kanban type in query.

See merge request easycorp/zentaopms!1421
This commit is contained in:
王怡栋
2022-01-17 00:44:13 +00:00
11 changed files with 13 additions and 13 deletions
+1 -1
View File
@@ -1377,7 +1377,7 @@ class docModel extends model
$executions = $this->dao->select('*')->from(TABLE_EXECUTION)
->where('deleted')->eq(0)
->andWhere('type')->in('sprint,stage')
->andWhere('type')->in('sprint,stage,kanban')
->beginIF(!$this->app->user->admin)->andWhere('id')->in($this->app->user->view->sprints)->fi()
->orderBy('order_asc')
->fetchAll('id');
+1 -1
View File
@@ -1200,7 +1200,7 @@ class executionModel extends model
public function getIdList($projectID, $status = 'all')
{
return $this->dao->select('id')->from(TABLE_EXECUTION)
->where('type')->in('sprint,stage')
->where('type')->in('sprint,stage,kanban')
->andWhere('deleted')->eq('0')
->beginIF($projectID)->andWhere('project')->eq($projectID)->fi()
->beginIF($status == 'undone')->andWhere('status')->notIN('done,closed')->fi()
+1 -1
View File
@@ -1041,7 +1041,7 @@ class kanban extends control
* @access public
* @return void
*/
public function ajaxMoveCard($cardID = 0, $fromColID = 0, $toColID = 0, $fromLaneID = 0, $toLaneID = 0, $executionID = 0, $browseType = 'all', $groupBy = '', $regionID = 0, $orderBy)
public function ajaxMoveCard($cardID = 0, $fromColID = 0, $toColID = 0, $fromLaneID = 0, $toLaneID = 0, $executionID = 0, $browseType = 'all', $groupBy = '', $regionID = 0, $orderBy = '')
{
$fromCell = $this->dao->select('id, cards')->from(TABLE_KANBANCELL)
->where('kanban')->eq($executionID)
+1 -1
View File
@@ -1465,7 +1465,7 @@ class productModel extends model
->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.project = t2.id')
->where('t2.deleted')->eq(0)
->andWhere('t1.product')->eq($productID)
->andWhere('t2.type')->in('sprint,stage')
->andWhere('t2.type')->in('sprint,stage,kanban')
->fetch();
$product->stories = $stories;
+1 -1
View File
@@ -99,7 +99,7 @@ class productplanModel extends model
->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.project=t2.id')
->where('t1.product')->eq($product)
->andWhere('t1.plan')->in(array_keys($plans))
->andWhere('t2.type')->in('sprint,stage')
->andWhere('t2.type')->in('sprint,stage,kanban')
->fetchPairs('plan', 'project');
$storyCountInTable = $this->dao->select('plan,count(story) as count')->from(TABLE_PLANSTORY)->where('plan')->in($planIdList)->groupBy('plan')->fetchPairs('plan', 'count');
+2 -2
View File
@@ -205,7 +205,7 @@ class programModel extends model
/* Get doing executions. */
$doingExecutions = $this->dao->select('id, project, name, end')->from(TABLE_EXECUTION)
->where('type')->in('sprint,stage')
->where('type')->in('sprint,stage,kanban')
->andWhere('status')->eq('doing')
->andWhere('deleted')->eq(0)
->beginIF(!$this->app->user->admin)->andWhere('id')->in($this->app->user->view->sprints)->fi()
@@ -1254,7 +1254,7 @@ class programModel extends model
$executions = $this->dao->select('id')->from(TABLE_EXECUTION)
->where('deleted')->eq(0)
->andWhere('project')->in($projectKeys)
->andWhere('type')->in('sprint,stage')
->andWhere('type')->in('sprint,stage,kanban')
->fetchAll('id');
/* Get all tasks and compute totalEstimate, totalConsumed, totalLeft, progress according to them. */
+1 -1
View File
@@ -49,7 +49,7 @@ class projectstoryModel extends model
->leftJoin(TABLE_STORY)->alias('t2')->on('t1.story=t2.id')
->leftJoin(TABLE_EXECUTION)->alias('t3')->on('t1.project=t3.id')
->where('t1.story')->in($storyIdList)
->andWhere('t3.type')->in('sprint,stage')
->andWhere('t3.type')->in('sprint,stage,kanban')
->andWhere('t3.project')->eq($projectID)
->andWhere('t3.deleted')->eq(0)
->fetchAll('id');
+1 -1
View File
@@ -1060,7 +1060,7 @@ class reportModel extends model
{
$projectStatus = $this->dao->select('t1.id,t1.status')->from(TABLE_PROJECT)->alias('t1')
->leftJoin(TABLE_TEAM)->alias('t2')->on("t1.id=t2.root")
->where('t1.type')->in($this->config->systemMode == 'classic' ? 'sprint,stage' : 'project')
->where('t1.type')->in($this->config->systemMode == 'classic' ? 'sprint,stage,kanban' : 'project')
->beginIF($this->config->systemMode == 'classic')->andWhere('t2.type')->eq('execution')->fi()
->beginIF($this->config->systemMode == 'new')->andWhere('t2.type')->eq('project')->fi()
->beginIF(!empty($accounts))->andWhere('t2.account')->in($accounts)->fi()
+1 -1
View File
@@ -44,7 +44,7 @@ class storyModel extends model
$story->executions = $this->dao->select('t1.project, t2.name, t2.status')->from(TABLE_PROJECTSTORY)->alias('t1')
->leftJoin(TABLE_EXECUTION)->alias('t2')->on('t1.project = t2.id')
->where('t1.story')->eq($storyID)
->andWhere('t2.type')->in('sprint,stage')
->andWhere('t2.type')->in('sprint,stage,kanban')
->orderBy('t1.`order` DESC')
->fetchAll('project');
$story->tasks = $this->dao->select('id, name, assignedTo, execution, status, consumed, `left`,type')->from(TABLE_TASK)->where('story')->eq($storyID)->andWhere('deleted')->eq(0)->orderBy('id DESC')->fetchGroup('execution');
+2 -2
View File
@@ -4285,7 +4285,7 @@ class upgradeModel extends model
}
}
$executionPairs = $this->dao->select('id')->from(TABLE_PROJECT)->where('id')->in($projectIdList)->andWhere('type')->in('sprint,stage')->fetchAll('id', 'id');
$executionPairs = $this->dao->select('id')->from(TABLE_PROJECT)->where('id')->in($projectIdList)->andWhere('type')->in('sprint,stage,kanban')->fetchAll('id', 'id');
foreach($userViews as $account => $userView)
{
$projects = zget($accountProjects, $account, array());
@@ -4856,7 +4856,7 @@ class upgradeModel extends model
$this->personnel->updateWhitelist($whitelist, 'product', $product->id, 'whitelist', 'upgrade', 'increase');
}
$customSprints = $this->dao->select('*')->from(TABLE_PROJECT)->where('whitelist')->ne('')->andWhere('type')->in('sprint,stage')->fetchAll('id');
$customSprints = $this->dao->select('*')->from(TABLE_PROJECT)->where('whitelist')->ne('')->andWhere('type')->in('sprint,stage,kanban')->fetchAll('id');
$whitelistACL = $this->dao->select('account')->from(TABLE_ACL)->where('objectID')->in(array_keys($customSprints))->andWhere('objectType')->eq('sprint')->andWhere('type')->eq('whitelist')->fetchPairs('account');
foreach($customSprints as $sprint)
{
+1 -1
View File
@@ -1092,7 +1092,7 @@ class userModel extends model
*/
public function getObjects($account, $type = 'execution', $status = 'all', $orderBy = 'id_desc', $pager = null)
{
$objectType = $type == 'execution' ? 'sprint,stage' : $type;
$objectType = $type == 'execution' ? 'sprint,stage,kanban' : $type;
$myObjectsList = $this->dao->select('t1.*,t2.*')->from(TABLE_TEAM)->alias('t1')
->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.root = t2.id')
->where('t1.type')->eq($type)