Merge branch 'sprint/182_liumengyi_47340' into 'kanban'
* Finish task #47340.When adding kanban execution, create region, group, lanes and columns. See merge request easycorp/zentaopms!1344
This commit is contained in:
@@ -13,3 +13,5 @@ CREATE TABLE `zt_kanbancardgroup` (
|
||||
ALTER TABLE `zt_kanban` ADD `displayCards` smallint(6) NOT NULL AFTER `order`;
|
||||
ALTER TABLE `zt_kanbancard` DROP COLUMN `lane`;
|
||||
ALTER TABLE `zt_kanbancard` DROP COLUMN `column`;
|
||||
|
||||
UPDATE `zt_grouppriv` SET `method` = 'taskKanban' WHERE `module` = 'execution' AND `method` = 'kanban';
|
||||
|
||||
@@ -301,7 +301,7 @@ if($config->systemMode == 'new') $lang->execution->homeMenu->executionkanban = a
|
||||
|
||||
$lang->execution->menu = new stdclass();
|
||||
$lang->execution->menu->task = array('link' => "{$lang->task->common}|execution|task|executionID=%s", 'subModule' => 'task,tree', 'alias' => 'importtask,importbug');
|
||||
$lang->execution->menu->kanban = array('link' => "$lang->executionKanban|execution|kanban|executionID=%s");
|
||||
$lang->execution->menu->kanban = array('link' => "$lang->executionKanban|execution|taskkanban|executionID=%s");
|
||||
$lang->execution->menu->burn = array('link' => "$lang->burn|execution|burn|executionID=%s");
|
||||
$lang->execution->menu->view = array('link' => "$lang->view|execution|grouptask|executionID=%s", 'alias' => 'grouptask,tree,taskeffort,gantt,calendar,relation,maintainrelation');
|
||||
$lang->execution->menu->story = array('link' => "$lang->SRCommon|execution|story|executionID=%s", 'subModule' => 'story', 'alias' => 'batchcreate,linkstory,storykanban');
|
||||
|
||||
@@ -1392,6 +1392,15 @@ class execution extends control
|
||||
}
|
||||
}
|
||||
|
||||
if(!empty($projectID) and $project->model == 'kanban')
|
||||
{
|
||||
$execution = $this->execution->getById($executionID);
|
||||
$this->loadModel('kanban')->createRDKanban($execution);
|
||||
|
||||
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
|
||||
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => inlink('kanban', "executionID=$executionID")));
|
||||
}
|
||||
|
||||
if(!empty($planID))
|
||||
{
|
||||
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => inlink('create', "projectID=$projectID&executionID=$executionID©ExecutionID=&planID=$planID&confirm=no")));
|
||||
@@ -1950,6 +1959,21 @@ class execution extends control
|
||||
/**
|
||||
* Kanban.
|
||||
*
|
||||
* @param int $executionID
|
||||
* @param string $browseType
|
||||
* @param string $orderBy
|
||||
* @param string $group
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function kanban($executionID, $browseType = 'all', $orderBy = 'id_asc', $group = 'all')
|
||||
{
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* Task kanban.
|
||||
*
|
||||
* @param int $executionID
|
||||
* @param string $browseType story|bug|task|all
|
||||
* @param string $orderBy
|
||||
@@ -1957,7 +1981,7 @@ class execution extends control
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function kanban($executionID, $browseType = '', $orderBy = 'order_asc', $groupBy = '')
|
||||
public function taskKanban($executionID, $browseType = '', $orderBy = 'order_asc', $groupBy = '')
|
||||
{
|
||||
if(empty($browseType)) $browseType = $this->session->kanbanType ? $this->session->kanbanType : 'all';
|
||||
if(empty($groupBy) and $browseType != 'all') $groupBy = $this->session->{'kanbanGroupBy' . $browseType} ? $this->session->{'kanbanGroupBy' . $browseType} : 'default';
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
#main {padding-bottom: 10px;}
|
||||
#main > .container {max-width: 1960px!important; padding: 0 10px}
|
||||
|
||||
.kanban + .kanban {margin-top: 15px}
|
||||
.kanban-card > .title {display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis}
|
||||
.kanban-card > .infos {position: relative; margin-top: 5px}
|
||||
.kanban-card > .infos > .info + .info {margin-left: 8px}
|
||||
.kanban-card > .infos > .info-id,
|
||||
.kanban-card > .infos > .info-deadline,
|
||||
.kanban-card > .infos > .info-estimate {font-size: 12px; position: relative; top: 2px}
|
||||
.kanban-card > .infos > .label-pri {min-width: 16px; line-height: 14px; height: 16px; padding: 0}
|
||||
.kanban-card > .infos > .label-severity {transform: scale(.75)}
|
||||
.kanban-card > .infos > .avatar {position: absolute; right: 0; top: 0}
|
||||
.kanban-card > .actions {position: absolute; top: 4px; right: 4px; opacity: 0;}
|
||||
.kanban-card:hover > .actions {opacity: 1;}
|
||||
.kanban-card > .actions > a {display: block; float: left; width: 20px; height: 20px; line-height: 20px; text-align: center; border-radius: 4px; opacity: .7;}
|
||||
.kanban-card > .actions > a:hover {background-color: rgba(0,0,0,.075); opacity: 1;}
|
||||
|
||||
.kanban-header-col > .actions {padding-top: 22px}
|
||||
.kanban-header-parent-col .kanban-header-col > .actions {padding-top: 6px; padding-right: 2px;}
|
||||
.kanban-header-col > .actions > a {display: block; float: left; width: 20px; height: 20px; line-height: 20px; text-align: center; border-radius: 4px; opacity: .7;}
|
||||
.kanban-header-col > .actions > a:hover {background-color: rgba(0,0,0,.075); opacity: 1;}
|
||||
|
||||
.kanban-lane-name > .actions {position: absolute; top: 0; left: 0; right: 0; opacity: 0;}
|
||||
.kanban-lane-name:hover > .actions {opacity: 1;}
|
||||
.kanban-lane-name > .actions > a {display: block; width: 20px; height: 20px; line-height: 20px; text-align: center; opacity: .7; color: #fff;}
|
||||
.kanban-lane-name > .actions > a:hover {background-color: rgba(0,0,0,.2); opacity: 1;}
|
||||
|
||||
.kanban-affixed .kanban-header-col > .title > .text,
|
||||
.kanban-affixed .kanban-header-col > .title > .count {color: #fff!important;}
|
||||
|
||||
#kanbanContainer {margin: 0;}
|
||||
#kanbanContainer > .panel-body {overflow: auto;}
|
||||
#kanbans .kanban {min-height: initial;}
|
||||
#kanbans .kanban-lane {min-height: 150px; margin-top: 2px;}
|
||||
#kanbans .kanban-affixed > .kanban-header {top: 100px;}
|
||||
#kanbans .kanban-card[data-scale-size="4"] {padding: 8px;}
|
||||
#kanbans .kanban-card[data-scale-size="3"] {padding: 3px 4px;}
|
||||
#kanbans .kanban-card[data-scale-size="3"] > .title {white-space: normal; max-height: 100%;}
|
||||
#kanbans .kanban-card[data-scale-size="2"] {padding: 3px 4px; overflow: hidden;}
|
||||
#kanbans .kanban-card[data-scale-size="2"] > .title {display: inline; line-height: 18px; white-space: normal; max-height: 100%; word-break: break-all;}
|
||||
#kanbans .kanban-card[data-scale-size="2"] > .infos {display: inline-block; height: 18px; vertical-align: top; margin: 0;}
|
||||
#kanbans .kanban-card[data-scale-size="2"] > .infos > .info-pri {transform: scale(.8); vertical-align: top;}
|
||||
#kanbans .kanban-card[data-scale-size="2"] > .infos > .avatar {display: inline-block; transform: scale(.8); position: relative; top: -2px; vertical-align: top; margin-right: -1px;}
|
||||
|
||||
#kanbanScaleControl {width: 100px;}
|
||||
#kanbanScaleControl .input-group-addon {background: #fff; padding: 5px;}
|
||||
#kanbanScaleControl > .input-group-btn:first-child > .btn {border-radius: 16px 0 0 16px; border-right-color: transparent;}
|
||||
#kanbanScaleControl > .input-group-btn:last-child > .btn {border-radius: 0 16px 16px 0; border-left-color: transparent;}
|
||||
#kanbanScaleControl > .input-group-btn > .btn:hover {border-color: #b8bfce;}
|
||||
|
||||
#type_chosen .icon-kanban {padding-right: 10px; font-size: 15px;}
|
||||
|
||||
.dropdown-menu a {text-align: left;}
|
||||
.scrollbar-hover {max-height: 2000px; overflow: scroll !important;}
|
||||
.c-type {width: 150px !important; overflow: unset;}
|
||||
.c-group {width: 190px !important; overflow: unset;}
|
||||
.c-type {margin-left: 0px !important;}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -247,6 +247,8 @@ $lang->execution->iteration = 'Iterations';
|
||||
$lang->execution->iterationInfo = '%s Iterations';
|
||||
$lang->execution->viewAll = 'View All';
|
||||
$lang->execution->testreport = 'Test Report';
|
||||
$lang->execution->taskKanban = 'Task Kanban';
|
||||
$lang->execution->RDKanban = 'Research & Development Kanban';
|
||||
|
||||
/* Group browsing. */
|
||||
$lang->execution->allTasks = 'All';
|
||||
|
||||
@@ -247,6 +247,8 @@ $lang->execution->iteration = '版本迭代';
|
||||
$lang->execution->iterationInfo = '迭代%s次';
|
||||
$lang->execution->viewAll = '查看所有';
|
||||
$lang->execution->testreport = '测试报告';
|
||||
$lang->execution->taskKanban = '任务看板';
|
||||
$lang->execution->RDKanban = '研发看板';
|
||||
|
||||
/* 分组浏览。*/
|
||||
$lang->execution->allTasks = '所有';
|
||||
|
||||
@@ -381,7 +381,7 @@ class executionModel extends model
|
||||
$creatorExists = false;
|
||||
$teamMembers = array();
|
||||
|
||||
$this->loadModel('kanban')->createExecutionLane($executionID);
|
||||
if(isset($project) and $project->model != 'kanban') $this->loadModel('kanban')->createExecutionLane($executionID);
|
||||
|
||||
/* Save order. */
|
||||
$this->dao->update(TABLE_EXECUTION)->set('`order`')->eq($executionID * 5)->where('id')->eq($executionID)->exec();
|
||||
|
||||
@@ -122,7 +122,8 @@
|
||||
<span class='project-type-label label label-outline <?php echo $execution->type == 'sprint' ? 'label-info' : 'label-warning';?>'><?php echo $lang->execution->typeList[$execution->type]?></span>
|
||||
<?php endif;?>
|
||||
<?php
|
||||
echo !empty($execution->children) ? $execution->name : html::a($this->createLink('execution', 'task', 'execution=' . $execution->id), $execution->name, '', "class='text-ellipsis'");
|
||||
$executionLink = $execution->projectModel == 'kanban' ? html::a($this->createLink('execution', 'kanban', 'executionID=' . $execution->id), $execution->name, '', "class='text-ellipsis'") : html::a($this->createLink('execution', 'task', 'execution=' . $execution->id), $execution->name, '', "class='text-ellipsis'");
|
||||
echo !empty($execution->children) ? $execution->name : $executionLink;
|
||||
if(isset($execution->delay)) echo "<span class='label label-danger label-badge'>{$lang->execution->delayed}</span> ";
|
||||
?>
|
||||
<?php if(!empty($execution->children)):?>
|
||||
|
||||
@@ -0,0 +1,175 @@
|
||||
<?php
|
||||
/**
|
||||
* The kanban view file of execution module of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2012 青岛易软天创网络科技有限公司 (QingDao Nature Easy Soft Network Technology Co,LTD www.cnezsoft.com)
|
||||
* @author Wang Yidong, Zhu Jinyong
|
||||
* @package execution
|
||||
* @version $Id: kanban.html.php $
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php include '../../common/view/kanban.html.php';?>
|
||||
<div id='mainMenu' class='clearfix'>
|
||||
<div class='btn-toolbar pull-left'>
|
||||
<div class="input-control space c-type">
|
||||
<?php echo html::select('type', $lang->kanban->type, $browseType, 'class="form-control chosen" data-max_drop_width="215"');?>
|
||||
</div>
|
||||
<?php if($browseType != 'all'):?>
|
||||
<div class="input-control space c-group">
|
||||
<?php echo html::select('group', $lang->kanban->group->$browseType, $groupBy, 'class="form-control chosen" data-max_drop_width="215"');?>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
<div class='input-group pull-left not-fix-input-group' id='kanbanScaleControl'>
|
||||
<span class='input-group-btn'>
|
||||
<button class='btn btn-icon' type='button' data-type='-'><i class='icon icon-minuse-solid-circle text-muted'></i></button>
|
||||
</span>
|
||||
<span class='input-group-addon'>
|
||||
<span id='kanbanScaleSize'>1</span><?php echo $lang->execution->kanbanCardsUnit; ?>
|
||||
</span>
|
||||
<span class='input-group-btn'>
|
||||
<button class='btn btn-icon' type='button' data-type='+'><i class='icon icon-plus-solid-circle text-muted'></i></button>
|
||||
</span>
|
||||
</div>
|
||||
<div class='btn-toolbar pull-right'>
|
||||
<?php
|
||||
$link = $this->createLink('task', 'export', "execution=$executionID&orderBy=$orderBy&type=kanban");
|
||||
if(common::hasPriv('task', 'export')) echo html::a($link, "<i class='icon-export muted'></i> " . $lang->export, '', "class='btn btn-link iframe export' data-width='700'");
|
||||
?>
|
||||
<?php if($canBeChanged):?>
|
||||
<div class='btn-group' style="margin-right: 0">
|
||||
<button type='button' class='btn btn-link dropdown-toggle' data-toggle='dropdown' id='importAction'>
|
||||
<i class='icon-import muted'></i> <?php echo $lang->import ?>
|
||||
<span class='caret'></span>
|
||||
</button>
|
||||
<ul class='dropdown-menu' id='importActionMenu'>
|
||||
<?php
|
||||
$misc = common::hasPriv('execution', 'importTask') ? '' : "class=disabled";
|
||||
$link = common::hasPriv('execution', 'importTask') ? $this->createLink('execution', 'importTask', "execution=$execution->id") : '#';
|
||||
echo "<li $misc>" . html::a($link, $lang->execution->importTask, '', $misc) . "</li>";
|
||||
|
||||
$misc = common::hasPriv('execution', 'importBug') ? '' : "class=disabled";
|
||||
$link = common::hasPriv('execution', 'importBug') ? $this->createLink('execution', 'importBug', "execution=$execution->id") : '#';
|
||||
echo "<li $misc>" . html::a($link, $lang->execution->importBug, '', $misc) . "</li>";
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
echo "<div class='btn-group menu-actions'>";
|
||||
echo html::a('javascript:;', "<i class='icon icon-ellipsis-v'></i>", '', "data-toggle='dropdown' class='btn btn-link'");
|
||||
echo "<ul class='dropdown-menu pull-right'>";
|
||||
if(common::hasPriv('execution', 'printKanban')) echo '<li>' .html::a($this->createLink('execution', 'printKanban', "executionID=$executionID"), "<i class='icon-printer muted'></i> " . $lang->execution->printKanban, '', "class='iframe btn btn-link' id='printKanban' title='{$lang->execution->printKanban}' data-width='500'") . '</li>';
|
||||
echo '<li>' .html::a('javascript:fullScreen()', "<i class='icon-fullscreen muted'></i> " . $lang->execution->fullScreen, '', "class='btn btn-link' title='{$lang->execution->fullScreen}' data-width='500'") . '</li>';
|
||||
echo '</ul></div>';
|
||||
?>
|
||||
<?php
|
||||
$checkObject = new stdclass();
|
||||
$checkObject->execution = $executionID;
|
||||
$canCreateTask = common::hasPriv('task', 'create', $checkObject);
|
||||
$canBatchCreateTask = common::hasPriv('task', 'batchCreate', $checkObject);
|
||||
$canCreateBug = common::hasPriv('bug', 'create');
|
||||
$canBatchCreateBug = common::hasPriv('bug', 'batchCreate');
|
||||
$canCreateStory = ($productID and common::hasPriv('story', 'create'));
|
||||
$canBatchCreateStory = ($productID and common::hasPriv('story', 'batchCreate'));
|
||||
$canLinkStory = ($productID and common::hasPriv('execution', 'linkStory'));
|
||||
$canLinkStoryByPlane = ($productID and common::hasPriv('execution', 'importplanstories'));
|
||||
$hasStoryButton = ($canCreateStory or $canBatchCreateStory or $canLinkStory or $canLinkStoryByPlane);
|
||||
$hasTaskButton = ($canCreateTask or $canBatchCreateTask);
|
||||
$hasBugButton = ($canCreateBug or $canBatchCreateBug);
|
||||
?>
|
||||
<?php if($canCreateTask or $canBatchCreateTask or $canCreateBug or $canBatchCreateBug or $canCreateStory or $canBatchCreateStory or $canLinkStory or $canLinkStoryByPlane):?>
|
||||
<div class='dropdown' id='createDropdown'>
|
||||
<button class='btn btn-primary' type='button' data-toggle='dropdown'><i class='icon icon-plus'></i> <?php echo $this->lang->create;?> <span class='caret'></span></button>
|
||||
<ul class='dropdown-menu pull-right'>
|
||||
<?php if($canCreateStory) echo '<li>' . html::a(helper::createLink('story', 'create', "productID=$productID&branch=0&moduleID=0&story=0&execution=$execution->id", '', true), $lang->execution->createStory, '', "class='iframe'") . '</li>';?>
|
||||
<?php if($canBatchCreateStory) echo '<li>' . html::a(helper::createLink('story', 'batchCreate', "productID=$productID&branch=0&moduleID=0&story=0&execution=$execution->id", '', true), $lang->execution->batchCreateStroy, '', "class='iframe' data-width='90%'") . '</li>';?>
|
||||
<?php if($canLinkStory) echo '<li>' . html::a(helper::createLink('execution', 'linkStory', "execution=$execution->id", '', true), $lang->execution->linkStory, '', "class='iframe' data-width='90%'") . '</li>';?>
|
||||
<?php if($canLinkStoryByPlane) echo '<li>' . html::a('#linkStoryByPlan', $lang->execution->linkStoryByPlan, '', 'data-toggle="modal"') . '</li>';?>
|
||||
<?php if($hasStoryButton and $hasBugButton) echo '<li class="divider"></li>';?>
|
||||
<?php if($canCreateBug) echo '<li>' . html::a(helper::createLink('bug', 'create', "productID=$productID&branch=0&extra=executionID=$execution->id", '', true), $lang->bug->create, '', "class='iframe'") . '</li>';?>
|
||||
<?php if($canBatchCreateBug) echo '<li>' . html::a(helper::createLink('bug', 'batchCreate', "productID=$productID&branch=0&executionID=$execution->id", '', true), $lang->bug->batchCreate, '', "class='iframe'") . '</li>';?>
|
||||
<?php if(($hasStoryButton or $hasBugButton) and $hasTaskButton) echo '<li class="divider"></li>';?>
|
||||
<?php if($canCreateTask) echo '<li>' . html::a(helper::createLink('task', 'create', "execution=$execution->id", '', true), $lang->task->create, '', "class='iframe'") . '</li>';?>
|
||||
<?php if($canBatchCreateTask) echo '<li>' . html::a(helper::createLink('task', 'batchCreate', "execution=$execution->id", '', true), $lang->execution->batchCreateTask, '', "class='iframe'") . '</li>';?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<?php else:?>
|
||||
<?php $canCreateTask = $canBatchCreateTask = $canCreateBug = $canBatchCreateBug = $canCreateStory = $canBatchCreateStory = $canLinkStory = $canLinkStoryByPlane = false;?>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class='panel' id='kanbanContainer'>
|
||||
<div class='panel-body'>
|
||||
<div id='kanbans'></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal fade" id="linkStoryByPlan">
|
||||
<div class="modal-dialog mw-500px">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true"><i class="icon icon-close"></i></button>
|
||||
<h4 class="modal-title"><?php echo $lang->execution->linkStoryByPlan;?></h4><?php echo '(' . $lang->execution->linkStoryByPlanTips . ')';?>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class='input-group'>
|
||||
<?php echo html::select('plan', $allPlans, '', "class='form-control chosen' id='plan'");?>
|
||||
<span class='input-group-btn'><?php echo html::commonButton($lang->execution->linkStory, "id='toStoryButton'", 'btn btn-primary');?></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php js::set('executionID', $executionID);?>
|
||||
<?php js::set('productID', $productID);?>
|
||||
<?php js::set('kanbanGroup', $kanbanGroup);?>
|
||||
<?php js::set('kanbanList', array_keys($kanbanGroup));?>
|
||||
<?php js::set('browseType', $browseType);?>
|
||||
<?php js::set('groupBy', $groupBy);?>
|
||||
<?php
|
||||
js::set('priv',
|
||||
array(
|
||||
'canEditName' => common::hasPriv('kanban', 'setColumn'),
|
||||
'canSetWIP' => common::hasPriv('kanban', 'setWIP'),
|
||||
'canSetLane' => common::hasPriv('kanban', 'setLane'),
|
||||
'canMoveLane' => common::hasPriv('kanban', 'laneMove'),
|
||||
'canSortCards' => common::hasPriv('kanban', 'cardsSort'),
|
||||
'canCreateTask' => $canCreateTask,
|
||||
'canBatchCreateTask' => $canBatchCreateTask,
|
||||
'canCreateBug' => $canCreateBug,
|
||||
'canBatchCreateBug' => $canBatchCreateBug,
|
||||
'canCreateStory' => $canCreateStory,
|
||||
'canBatchCreateStory' => $canBatchCreateStory,
|
||||
'canLinkStory' => $canLinkStory,
|
||||
'canLinkStoryByPlane' => $canLinkStoryByPlane,
|
||||
'canAssignTask' => common::hasPriv('task', 'assignto'),
|
||||
'canAssignStory' => common::hasPriv('story', 'assignto'),
|
||||
'canFinishTask' => common::hasPriv('task', 'finish'),
|
||||
'canPauseTask' => common::hasPriv('task', 'pause'),
|
||||
'canCancelTask' => common::hasPriv('task', 'cancel'),
|
||||
'canCloseTask' => common::hasPriv('task', 'close'),
|
||||
'canActivateTask' => common::hasPriv('task', 'activate'),
|
||||
'canStartTask' => common::hasPriv('task', 'start'),
|
||||
'canAssignBug' => common::hasPriv('bug', 'assignto'),
|
||||
'canConfirmBug' => common::hasPriv('bug', 'confirmBug'),
|
||||
'canActivateBug' => common::hasPriv('bug', 'activate')
|
||||
)
|
||||
);
|
||||
?>
|
||||
<?php js::set('executionLang', $lang->execution);?>
|
||||
<?php js::set('storyLang', $lang->story);?>
|
||||
<?php js::set('taskLang', $lang->task);?>
|
||||
<?php js::set('bugLang', $lang->bug);?>
|
||||
<?php js::set('editName', $lang->execution->editName);?>
|
||||
<?php js::set('setWIP', $lang->execution->setWIP);?>
|
||||
<?php js::set('sortColumn', $lang->execution->sortColumn);?>
|
||||
<?php js::set('kanbanLang', $lang->kanban);?>
|
||||
<?php js::set('deadlineLang', $lang->task->deadlineAB);?>
|
||||
<?php js::set('noAssigned', $lang->task->noAssigned);?>
|
||||
<?php js::set('userList', $userList);?>
|
||||
<?php js::set('entertime', time());?>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
@@ -759,7 +759,7 @@ $lang->resource->execution->linkStory = 'linkStory';
|
||||
$lang->resource->execution->unlinkStory = 'unlinkStory';
|
||||
$lang->resource->execution->batchUnlinkStory = 'batchUnlinkStory';
|
||||
$lang->resource->execution->updateOrder = 'updateOrder';
|
||||
$lang->resource->execution->kanban = 'kanban';
|
||||
$lang->resource->execution->taskKanban = 'taskKanban';
|
||||
$lang->resource->execution->printKanban = 'printKanbanAction';
|
||||
$lang->resource->execution->tree = 'treeAction';
|
||||
$lang->resource->execution->treeTask = 'treeOnlyTask';
|
||||
@@ -775,6 +775,7 @@ $lang->resource->execution->addWhitelist = 'addWhitelist';
|
||||
$lang->resource->execution->unbindWhitelist = 'unbindWhitelist';
|
||||
$lang->resource->execution->storyEstimate = 'storyEstimate';
|
||||
$lang->resource->execution->executionkanban = 'kanbanAction';
|
||||
$lang->resource->execution->kanban = 'RDKanban';
|
||||
//if($config->systemMode == 'classic') $lang->resource->project->list = 'list';
|
||||
|
||||
//$lang->execution->methodOrder[0] = 'index';
|
||||
@@ -816,7 +817,7 @@ $lang->execution->methodOrder[170] = 'linkStory';
|
||||
$lang->execution->methodOrder[175] = 'unlinkStory';
|
||||
$lang->execution->methodOrder[180] = 'batchUnlinkStory';
|
||||
$lang->execution->methodOrder[185] = 'updateOrder';
|
||||
$lang->execution->methodOrder[190] = 'kanban';
|
||||
$lang->execution->methodOrder[190] = 'taskKanban';
|
||||
$lang->execution->methodOrder[195] = 'printKanban';
|
||||
$lang->execution->methodOrder[200] = 'kanbanHideCols';
|
||||
$lang->execution->methodOrder[205] = 'kanbanColsColor';
|
||||
@@ -832,6 +833,7 @@ $lang->execution->methodOrder[250] = 'addWhitelist';
|
||||
$lang->execution->methodOrder[255] = 'unbindWhitelist';
|
||||
$lang->execution->methodOrder[260] = 'storyEstimate';
|
||||
$lang->execution->methodOrder[265] = 'executionkanban';
|
||||
$lang->execution->methodOrder[270] = 'kanban';
|
||||
|
||||
/* Task. */
|
||||
$lang->resource->task = new stdclass();
|
||||
|
||||
@@ -1503,6 +1503,124 @@ class kanbanModel extends model
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a default RD kanban.
|
||||
*
|
||||
* @param object $execution
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function createRDKanban($execution)
|
||||
{
|
||||
$regionID = $this->createRDRegion($execution);
|
||||
if(dao::isError()) return false;
|
||||
|
||||
$groupID = $this->createGroup($execution->id, $regionID);
|
||||
if(dao::isError()) return false;
|
||||
|
||||
$this->createRDLane($execution->id, $regionID);
|
||||
if(dao::isError()) return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a default RD region.
|
||||
*
|
||||
* @param object $execution
|
||||
*
|
||||
* @access public
|
||||
* @return int|bool
|
||||
*/
|
||||
public function createRDRegion($execution)
|
||||
{
|
||||
$region = new stdclass();
|
||||
$region->name = $this->lang->kanbanregion->default;
|
||||
$region->kanban = $execution->id;
|
||||
$region->createdBy = $this->app->user->account;
|
||||
$region->createdDate = helper::today();
|
||||
$region->order = 1;
|
||||
|
||||
$this->dao->insert(TABLE_KANBANREGION)->data($region)
|
||||
->check('name', 'unique', "kanban={$execution->id} AND deleted='0'")
|
||||
->autoCheck()
|
||||
->exec();
|
||||
|
||||
if(dao::isError()) return false;
|
||||
return $this->dao->lastInsertId();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create default RD lanes.
|
||||
*
|
||||
* @param int $executionID
|
||||
* @param int $regionID
|
||||
*
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
public function createRDLane($executionID, $regionID)
|
||||
{
|
||||
$laneIndex = 0;
|
||||
foreach($this->lang->kanban->laneTypeList as $type => $name)
|
||||
{
|
||||
$groupID = $this->createGroup($executionID, $regionID);
|
||||
if(dao::isError()) return false;
|
||||
|
||||
$lane = new stdclass();
|
||||
$lane->execution = $executionID;
|
||||
$lane->type = $type;
|
||||
$lane->region = $regionID;
|
||||
$lane->group = $groupID;
|
||||
$lane->name = $name;
|
||||
$lane->color = $this->config->kanban->laneColorList[$laneIndex];
|
||||
$lane->order = ++ $laneIndex * 5;
|
||||
|
||||
$this->dao->insert(TABLE_KANBANLANE)->data($lane)->autoCheck()->exec();
|
||||
if(dao::isError()) return false;
|
||||
|
||||
$this->createRDColumn($regionID, $groupID, $this->dao->lastInsertId(), $type);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create default RD columns.
|
||||
*
|
||||
* @param int $regionID
|
||||
* @param int $groupID
|
||||
* @param int $laneID
|
||||
* @param string $laneType
|
||||
*
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
public function createRDColumn($regionID, $groupID, $laneID, $laneType)
|
||||
{
|
||||
$devColumnID = $testColumnID = $resolvingColumnID = 0;
|
||||
if($laneType == 'story') $columnList = $this->lang->kanban->storyColumn;
|
||||
if($laneType == 'bug') $columnList = $this->lang->kanban->bugColumn;
|
||||
if($laneType == 'task') $columnList = $this->lang->kanban->taskColumn;
|
||||
|
||||
foreach($columnList as $type => $name)
|
||||
{
|
||||
$data = new stdClass();
|
||||
$data->lane = $laneID;
|
||||
$data->name = $name;
|
||||
$data->color = '#333';
|
||||
$data->type = $type;
|
||||
|
||||
if(strpos(',developing,developed,', $type) !== false) $data->parent = $devColumnID;
|
||||
if(strpos(',testing,tested,', $type) !== false) $data->parent = $testColumnID;
|
||||
if(strpos(',fixing,fixed,', $type) !== false) $data->parent = $resolvingColumnID;
|
||||
if(strpos(',develop,test,resolving,', $type) !== false) $data->parent = -1;
|
||||
|
||||
$this->dao->insert(TABLE_KANBANCOLUMN)->data($data)->exec();
|
||||
if(dao::isError()) return false;
|
||||
|
||||
if($type == 'develop') $devColumnID = $this->dao->lastInsertId();
|
||||
if($type == 'test') $testColumnID = $this->dao->lastInsertId();
|
||||
if($type == 'resolving') $resolvingColumnID = $this->dao->lastInsertId();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Update a region.
|
||||
*
|
||||
|
||||
@@ -1834,7 +1834,7 @@ class projectModel extends model
|
||||
->fetchPairs();
|
||||
}
|
||||
|
||||
$executions = $this->dao->select('t1.*,t2.name projectName')->from(TABLE_EXECUTION)->alias('t1')
|
||||
$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')
|
||||
->beginIF($projectID != 0)->andWhere('t1.project')->eq($projectID)->fi()
|
||||
@@ -1849,7 +1849,7 @@ class projectModel extends model
|
||||
}
|
||||
else
|
||||
{
|
||||
$executions = $this->dao->select('t2.*,t3.name projectName')->from(TABLE_PROJECTPRODUCT)->alias('t1')
|
||||
$executions = $this->dao->select('t2.*,t3.name projectName, t3.model as projectModel')->from(TABLE_PROJECTPRODUCT)->alias('t1')
|
||||
->leftJoin(TABLE_EXECUTION)->alias('t2')->on('t1.project=t2.id')
|
||||
->leftJoin(TABLE_PROJECT)->alias('t3')->on('t2.project=t3.id')
|
||||
->where('t1.product')->eq($productID)
|
||||
|
||||
Reference in New Issue
Block a user