* Working with Kanban Data.
This commit is contained in:
@@ -11,6 +11,7 @@ $config->execution->list->exportFields = 'id,name,projectName,code,PM,end,status
|
||||
|
||||
$config->execution->modelList['scrum'] = 'sprint';
|
||||
$config->execution->modelList['waterfall'] = 'stage';
|
||||
$config->execution->modelList['kanban'] = 'kanban';
|
||||
|
||||
global $lang, $app;
|
||||
$app->loadLang('task');
|
||||
|
||||
@@ -1967,13 +1967,12 @@ class execution extends control
|
||||
*/
|
||||
public function kanban($executionID, $browseType = 'all', $orderBy = 'id_asc', $groupBy = 'all')
|
||||
{
|
||||
unset($this->lang->execution->menu);
|
||||
|
||||
$users = $this->loadModel('user')->getPairs('noletter|nodeleted');
|
||||
$this->lang->execution->menu = new stdclass();
|
||||
$execution = $this->commonAction($executionID);
|
||||
$kanbanData = $this->loadModel('kanban')->getRDKanban($executionID, $browseType, $orderBy, $groupBy);
|
||||
$execution = $this->execution->getById($executionID);
|
||||
|
||||
$userList = array();
|
||||
$users = $this->loadModel('user')->getPairs('noletter|nodeleted');
|
||||
$avatarPairs = $this->dao->select('account, avatar')->from(TABLE_USER)->where('deleted')->eq(0)->fetchPairs();
|
||||
foreach($avatarPairs as $account => $avatar)
|
||||
{
|
||||
@@ -2945,7 +2944,7 @@ class execution extends control
|
||||
$projects = $this->loadModel('program')->getProjectList(0, 'all', 0, 'order_asc', null, 0, 0, true);
|
||||
$executionGroups = $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()
|
||||
->beginIF($this->config->systemMode == 'new')->andWhere('project')->in(array_keys($projects))->fi()
|
||||
->orderBy('id_desc')
|
||||
|
||||
@@ -65,7 +65,7 @@ class executionModel extends model
|
||||
{
|
||||
if(!$this->app->user->admin and strpos(",{$this->app->user->view->sprints},", ",$executionID,") === false and !defined('TUTORIAL') and $executionID != 0) die(js::error($this->lang->execution->accessDenied) . js::locate('back'));
|
||||
|
||||
$executions = $this->loadModel('execution')->getPairs(0, 'all', 'nocode');
|
||||
$executions = $this->getPairs(0, 'all', 'nocode');
|
||||
if(!$executionID and $this->session->execution) $executionID = $this->session->execution;
|
||||
if(!$executionID or !in_array($executionID, array_keys($executions))) $executionID = key($executions);
|
||||
$this->session->set('execution', $executionID);
|
||||
@@ -1054,7 +1054,7 @@ class executionModel extends model
|
||||
/* Order by status's content whether or not done */
|
||||
$executions = $this->dao->select('*, IF(INSTR("done,closed", status) < 2, 0, 1) AS isDone, INSTR("doing,wait,suspended,closed", status) AS sortStatus')->from(TABLE_EXECUTION)
|
||||
->where('deleted')->eq(0)
|
||||
->beginIF($type == 'all')->andWhere('type')->in('stage,sprint')->fi()
|
||||
->beginIF($type == 'all')->andWhere('type')->in('stage,sprint,kanban')->fi()
|
||||
->beginIF($projectID and $this->config->systemMode == 'new')->andWhere('project')->eq($projectID)->fi()
|
||||
->beginIF($type != 'all' and $this->config->systemMode == 'new')->andWhere('type')->eq($type)->fi()
|
||||
->beginIF(strpos($mode, 'withdelete') === false)->andWhere('deleted')->eq(0)->fi()
|
||||
@@ -1319,7 +1319,7 @@ class executionModel extends model
|
||||
$module = 'execution';
|
||||
$method = 'task';
|
||||
}
|
||||
if($module == 'testcase' and ($method == 'view' || $method == 'edit' || $method == 'batchedit'))
|
||||
if($module == 'testcase' and ($method == 'view' or $method == 'edit' or $method == 'batchedit'))
|
||||
{
|
||||
$module = 'execution';
|
||||
$method = 'testcase';
|
||||
@@ -1329,7 +1329,7 @@ class executionModel extends model
|
||||
$module = 'execution';
|
||||
$method = 'testtask';
|
||||
}
|
||||
if($module == 'build' and ($method == 'edit' || $method= 'view'))
|
||||
if($module == 'build' and ($method == 'edit' or $method == 'view'))
|
||||
{
|
||||
$module = 'execution';
|
||||
$method = 'build';
|
||||
|
||||
@@ -75,6 +75,11 @@ foreach($executions as $projectID => $projectExecutions)
|
||||
$selected = $execution->id == $executionID ? 'selected' : '';
|
||||
if($execution->status != 'done' and $execution->status != 'closed' and ($execution->PM == $this->app->user->account or isset($execution->teams[$this->app->user->account])))
|
||||
{
|
||||
$kanbanLink = "/execution-kanban-%s.html";
|
||||
$taskLink = "/execution-task-%s.html";
|
||||
if($execution->type != 'kanban' and $link == $kanbanLink) $link = $taskLink;
|
||||
if($execution->type == 'kanban' and $link != $kanbanLink) $link = $kanbanLink;
|
||||
|
||||
$myExecutionsHtml .= '<li>' . html::a(sprintf($link, $execution->id), $execution->name, '', "class='$selected executionName' title='{$execution->name}' data-key='" . zget($executionsPinYin, $execution->name, '') . "' data-app='{$this->app->tab}'") . '</li>';
|
||||
|
||||
if($selected == 'selected') $tabActive = 'myExecution';
|
||||
|
||||
@@ -1836,7 +1836,7 @@ class projectModel extends model
|
||||
|
||||
$executions = $this->dao->select('t1.*,t2.name projectName, t2.model as projectModel')->from(TABLE_EXECUTION)->alias('t1')
|
||||
->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.project = t2.id')
|
||||
->where('t1.type')->in('sprint,stage')
|
||||
->where('t1.type')->in('sprint,stage,kanban')
|
||||
->beginIF($projectID != 0)->andWhere('t1.project')->eq($projectID)->fi()
|
||||
->beginIF(!empty($myExecutionIDList))->andWhere('t1.id')->in(array_keys($myExecutionIDList))->fi()
|
||||
->beginIF($status == 'undone')->andWhere('t1.status')->notIN('done,closed')->fi()
|
||||
|
||||
Reference in New Issue
Block a user