diff --git a/module/doc/model.php b/module/doc/model.php index 3efa6e55f6..bfd4127b49 100644 --- a/module/doc/model.php +++ b/module/doc/model.php @@ -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'); diff --git a/module/execution/model.php b/module/execution/model.php index 6d42ab9a32..d9d9c22da3 100644 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -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() diff --git a/module/kanban/control.php b/module/kanban/control.php index 8b3797a3c9..923e54d155 100644 --- a/module/kanban/control.php +++ b/module/kanban/control.php @@ -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) diff --git a/module/product/model.php b/module/product/model.php index 410e59c268..771ea5148e 100644 --- a/module/product/model.php +++ b/module/product/model.php @@ -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; diff --git a/module/productplan/model.php b/module/productplan/model.php index 596c73f0cd..3a4202134b 100644 --- a/module/productplan/model.php +++ b/module/productplan/model.php @@ -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'); diff --git a/module/program/model.php b/module/program/model.php index 02b3f2e1be..70faddc9c5 100644 --- a/module/program/model.php +++ b/module/program/model.php @@ -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. */ diff --git a/module/projectstory/model.php b/module/projectstory/model.php index 2ea88a04a0..834b23e358 100644 --- a/module/projectstory/model.php +++ b/module/projectstory/model.php @@ -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'); diff --git a/module/report/model.php b/module/report/model.php index 588c72979d..256dc816fa 100644 --- a/module/report/model.php +++ b/module/report/model.php @@ -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() diff --git a/module/story/model.php b/module/story/model.php index 52c3b7c4e9..9472c2c020 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -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'); diff --git a/module/upgrade/model.php b/module/upgrade/model.php index a1ccf11096..bc351933a6 100644 --- a/module/upgrade/model.php +++ b/module/upgrade/model.php @@ -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) { diff --git a/module/user/model.php b/module/user/model.php index d45f9b21bc..fc407db983 100644 --- a/module/user/model.php +++ b/module/user/model.php @@ -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)