Merge branch 'master' into 'sprint/master_zhouxudong_56362'
# Conflicts: # module/kanban/model.php
This commit is contained in:
@@ -51,6 +51,7 @@ $config->execution->search['fields']['desc'] = $lang->task->desc;
|
||||
$config->execution->search['fields']['assignedTo'] = $lang->task->assignedTo;
|
||||
$config->execution->search['fields']['pri'] = $lang->task->pri;
|
||||
|
||||
if($app->tab == 'my') $config->execution->search['fields']['project'] = $lang->task->project;
|
||||
$config->execution->search['fields']['execution'] = $lang->task->execution;
|
||||
$config->execution->search['fields']['module'] = $lang->task->module;
|
||||
$config->execution->search['fields']['estimate'] = $lang->task->estimate;
|
||||
@@ -86,6 +87,7 @@ $config->execution->search['params']['desc'] = array('operator' => 'in
|
||||
$config->execution->search['params']['assignedTo'] = array('operator' => '=', 'control' => 'select', 'values' => 'users');
|
||||
$config->execution->search['params']['pri'] = array('operator' => '=', 'control' => 'select', 'values' => $lang->task->priList);
|
||||
|
||||
if($app->tab == 'my') $config->execution->search['params']['project'] = array('operator' => '=', 'control' => 'select', 'values' => '');
|
||||
$config->execution->search['params']['execution'] = array('operator' => '=', 'control' => 'select', 'values' => '');
|
||||
$config->execution->search['params']['module'] = array('operator' => 'belong', 'control' => 'select', 'values' => '');
|
||||
$config->execution->search['params']['estimate'] = array('operator' => '=', 'control' => 'input', 'values' => '');
|
||||
|
||||
@@ -115,6 +115,7 @@ class execution extends control
|
||||
$this->loadModel('datatable');
|
||||
$this->loadModel('setting');
|
||||
$this->loadModel('product');
|
||||
$this->loadModel('user');
|
||||
|
||||
if(common::hasPriv('execution', 'create')) $this->lang->TRActions = html::a($this->createLink('execution', 'create'), "<i class='icon icon-sm icon-plus'></i> " . $this->lang->execution->create, '', "class='btn btn-primary'");
|
||||
|
||||
@@ -211,6 +212,7 @@ class execution extends control
|
||||
/* team member pairs. */
|
||||
$memberPairs = array();
|
||||
foreach($this->view->teamMembers as $key => $member) $memberPairs[$key] = $member->realname;
|
||||
$memberPairs = $this->user->processAccountSort($memberPairs);
|
||||
|
||||
$showAllModule = isset($this->config->execution->task->allModule) ? $this->config->execution->task->allModule : '';
|
||||
$extra = (isset($this->config->execution->task->allModule) && $this->config->execution->task->allModule == 1) ? 'allModule' : '';
|
||||
@@ -227,7 +229,7 @@ class execution extends control
|
||||
$this->view->orderBy = $orderBy;
|
||||
$this->view->browseType = $browseType;
|
||||
$this->view->status = $status;
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter|all');
|
||||
$this->view->users = $this->user->getPairs('noletter|all');
|
||||
$this->view->param = $param;
|
||||
$this->view->executionID = $executionID;
|
||||
$this->view->execution = $execution;
|
||||
@@ -918,6 +920,7 @@ class execution extends control
|
||||
{
|
||||
$memberPairs[$key] = $member->realname;
|
||||
}
|
||||
$memberPairs = $this->user->processAccountSort($memberPairs);
|
||||
|
||||
/* Build the search form. */
|
||||
$actionURL = $this->createLink('execution', 'bug', "executionID=$executionID&productID=$productID&orderBy=$orderBy&build=$build&type=bysearch&queryID=myQueryID");
|
||||
@@ -1496,7 +1499,7 @@ class execution extends control
|
||||
$this->view->name = $name;
|
||||
$this->view->code = $code;
|
||||
$this->view->team = $team;
|
||||
$this->view->teams = array(0 => '', $projectID => (isset($project->name) ? $project->name : '')) + $this->execution->getCanCopyObjects((int)$projectID);
|
||||
$this->view->teams = array(0 => '') + $this->execution->getCanCopyObjects((int)$projectID);
|
||||
$this->view->allProjects = array(0 => '') + $this->project->getPairsByModel('all', 0, 'noclosed');
|
||||
$this->view->executionID = $executionID;
|
||||
$this->view->productID = $productID;
|
||||
@@ -2730,7 +2733,7 @@ class execution extends control
|
||||
|
||||
$currentMembers = $this->execution->getTeamMembers($executionID);
|
||||
$members2Import = $this->execution->getMembers2Import($team2Import, array_keys($currentMembers));
|
||||
$teams2Import = $this->loadModel('personnel')->getCopiedObjects($executionID, 'sprint');
|
||||
$teams2Import = $this->loadModel('personnel')->getCopiedObjects($executionID, 'sprint', true);
|
||||
$teams2Import = array('' => '') + $teams2Import;
|
||||
|
||||
/* Append users for get users. */
|
||||
|
||||
@@ -720,6 +720,17 @@ function renderCount($count, count, column)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Alert to link product.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function tips()
|
||||
{
|
||||
bootbox.alert(needLinkProducts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Render header of a column.
|
||||
*/
|
||||
@@ -754,10 +765,11 @@ function renderHeaderCol($column, column, $header, kanbanData)
|
||||
var printMoreBtn = (columnPrivs.includes('setColumn') || columnPrivs.includes('setWIP'));
|
||||
|
||||
/* Render more menu. */
|
||||
if(((column.type == 'backlog' && hasStoryButton) || (column.type == 'wait' && hasTaskButton) || (column.type == 'unconfirmed' && hasBugButton)) && $actions.children('.text-primary').length == 0)
|
||||
if(column.type == 'backlog' || column.type == 'wait' || column.type == 'unconfirmed' && $actions.children('.text-primary').length == 0)
|
||||
{
|
||||
var tips = productID ? '' : 'onclick="tips()"';
|
||||
$actions.append([
|
||||
'<a data-contextmenu="columnCreate" data-type="' + column.type + '" data-kanban="' + kanban.id + '" data-parent="' + (column.parentType || '') + '" class="text-primary">',
|
||||
'<a data-contextmenu="columnCreate" data-type="' + column.type + '" data-kanban="' + kanban.id + '" data-parent="' + (column.parentType || '') + '" class="text-primary"' + ((column.type !== 'wait') ? tips : '') + '>',
|
||||
'<i class="icon icon-expand-alt"></i>',
|
||||
'</a>'
|
||||
].join(''));
|
||||
@@ -820,14 +832,16 @@ function updateRegion(regionID, regionData = [])
|
||||
if(!regionData) regionData = regions[regionID];
|
||||
|
||||
var data = groupBy == 'default' ? regionData.groups : regionData;
|
||||
if(data == null)
|
||||
if(data == null || data.length == 0)
|
||||
{
|
||||
$("div[data-id^=" + regionID + "].region").hide();
|
||||
if(groupBy == 'default') $("div[data-id^=" + regionID + "].region").hide();
|
||||
if(groupBy != 'default') $("div[data-id^=" + regionID + "].kanban").hide();
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$("div[data-id^=" + regionID + "].region").show();
|
||||
if(groupBy == 'default') $("div[data-id^=" + regionID + "].region").show();
|
||||
if(groupBy != 'default') $("div[data-id^=" + regionID + "].kanban").show();
|
||||
}
|
||||
$region.empty();
|
||||
$region.data('zui.kanban').render(data);
|
||||
|
||||
@@ -325,6 +325,17 @@ function renderColumnCount($count, count, col)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Alert to link product.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function tips()
|
||||
{
|
||||
bootbox.alert(needLinkProducts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Render header column
|
||||
* @param {JQuery} $col Header column element
|
||||
@@ -343,10 +354,11 @@ function renderHeaderCol($col, col, $header, kanban)
|
||||
if(priv.canCreateTask || priv.canBatchCreateTask) printTaskButton = true;
|
||||
if(priv.canCreateBug || priv.canBatchCreateBug) printBugButton = true;
|
||||
|
||||
if((col.type === 'backlog' && printStoryButton) || (col.type === 'wait' && printTaskButton) || (col.type == 'unconfirmed' && printBugButton))
|
||||
if(col.type === 'backlog' || col.type === 'wait' || col.type == 'unconfirmed')
|
||||
{
|
||||
var tips = productID ? '' : 'onclick="tips()"';
|
||||
$actions.append([
|
||||
'<a data-contextmenu="columnCreate" data-type="' + col.type + '" data-kanban="' + kanban.id + '" data-parent="' + (col.parentType || '') + '" class="text-primary">',
|
||||
'<a data-contextmenu="columnCreate" data-type="' + col.type + '" data-kanban="' + kanban.id + '" data-parent="' + (col.parentType || '') + '" class="text-primary"' + ((col.laneType !== 'task') ? tips : '') + '>',
|
||||
'<i class="icon icon-expand-alt"></i>',
|
||||
'</a>'
|
||||
].join(''));
|
||||
|
||||
@@ -271,6 +271,7 @@ $lang->execution->treeOnlyStory = 'Show Story Only';
|
||||
$lang->execution->storyKanban = 'Story Kanban';
|
||||
$lang->execution->storySort = 'Rank Story';
|
||||
$lang->execution->importPlanStory = $lang->executionCommon . ' is created!\nDo you want to import stories that have been linked to the plan?';
|
||||
$lang->execution->needLinkProducts = 'The execution has not been linked with any product, and the related functions cannot be used. Please link the product first and try again.';
|
||||
$lang->execution->iteration = 'Iterations';
|
||||
$lang->execution->iterationInfo = '%s Iterations';
|
||||
$lang->execution->viewAll = 'View All';
|
||||
@@ -396,6 +397,7 @@ $lang->execution->projectNotEmpty = 'Project cannot be empty.';
|
||||
$lang->execution->confirmStoryToTask = $lang->SRCommon . '%s are converted to tasks in the current. Do you want to convert them anyways?';
|
||||
$lang->execution->ge = "『%s』should be >= actual begin『%s』.";
|
||||
$lang->execution->storyDragError = "The {$lang->SRCommon} is still a draft or has been changed, please drag it after the review";
|
||||
$lang->execution->countTip = ' (%s member)';
|
||||
$lang->execution->pleaseInput = "Enter";
|
||||
|
||||
/* Statistics. */
|
||||
|
||||
@@ -51,7 +51,7 @@ $lang->execution->canceledBy = '由谁取消';
|
||||
$lang->execution->canceledDate = '取消日期';
|
||||
$lang->execution->begin = '计划开始';
|
||||
$lang->execution->end = '计划完成';
|
||||
$lang->execution->dateRange = '起始日期';
|
||||
$lang->execution->dateRange = '计划起止日期';
|
||||
$lang->execution->realBeganAB = '实际开始';
|
||||
$lang->execution->realEndAB = '实际完成';
|
||||
$lang->execution->realBegan = '实际开始日期';
|
||||
@@ -271,6 +271,7 @@ $lang->execution->treeOnlyStory = "树状图只看{$lang->SRCommon}";
|
||||
$lang->execution->storyKanban = "{$lang->SRCommon}看板";
|
||||
$lang->execution->storySort = "{$lang->SRCommon}排序";
|
||||
$lang->execution->importPlanStory = '创建' . $lang->executionCommon . '成功!\n是否导入计划关联的相关' . $lang->SRCommon . '?';
|
||||
$lang->execution->needLinkProducts = '该执行还未关联任何产品,相关功能无法使用,请先关联产品后再试。';
|
||||
$lang->execution->iteration = '版本迭代';
|
||||
$lang->execution->iterationInfo = '迭代%s次';
|
||||
$lang->execution->viewAll = '查看所有';
|
||||
@@ -396,6 +397,7 @@ $lang->execution->projectNotEmpty = '所属项目不能为空。';
|
||||
$lang->execution->confirmStoryToTask = '%s' . $lang->SRCommon . '已经在当前' . $lang->execution->common . '中转了任务,请确认是否重复转任务。';
|
||||
$lang->execution->ge = "『%s』应当不小于实际开始时间『%s』。";
|
||||
$lang->execution->storyDragError = "该{$lang->SRCommon}还是草稿或已变更状态,请评审通过后再拖动";
|
||||
$lang->execution->countTip = '(%s人)';
|
||||
$lang->execution->pleaseInput = "请输入";
|
||||
|
||||
/* 统计。*/
|
||||
|
||||
@@ -2753,14 +2753,31 @@ class executionModel extends model
|
||||
|
||||
$objectPairs = $this->dao->select('id,name')->from(TABLE_PROJECT)
|
||||
->where('deleted')->eq(0)
|
||||
->andWhere('project', true)->eq($projectID)
|
||||
->andWhere('type')->ne('project')
|
||||
->andWhere('(project')->eq($projectID)
|
||||
->orWhere('id')->eq($projectID)
|
||||
->markRight(1)
|
||||
->orWhere('id')->eq($projectID)
|
||||
->orderBy('type_asc,openedDate_desc')
|
||||
->limit('9')
|
||||
->fetchPairs();
|
||||
|
||||
$countPairs = $this->dao->select('root, COUNT(*) as count')->from(TABLE_TEAM)
|
||||
->where('( type')->eq('project')
|
||||
->andWhere('root')->eq($projectID)
|
||||
->markRight(1)
|
||||
->orWhere('( type')->eq('execution')
|
||||
->andWhere('root')->in(array_keys($objectPairs))
|
||||
->markRight(1)
|
||||
->groupBy('root')
|
||||
->fetchPairs('root');
|
||||
|
||||
foreach($objectPairs as $objectID => $objectName)
|
||||
{
|
||||
$memberCount = zget($countPairs, $objectID, 0);
|
||||
$countTip = $memberCount > 1 ? str_replace('member', 'members', $this->lang->execution->countTip) : $this->lang->execution->countTip;
|
||||
$objectPairs[$objectID] = $objectName . sprintf($countTip, $memberCount);
|
||||
}
|
||||
|
||||
return $objectPairs;
|
||||
}
|
||||
|
||||
|
||||
@@ -53,6 +53,7 @@ js::set('vision', $this->config->vision);
|
||||
js::set('productCount', count($productNames));
|
||||
js::set('executionID', $execution->id);
|
||||
js::set('reviewStoryParis', $reviewStoryParis);
|
||||
js::set('needLinkProducts', $lang->execution->needLinkProducts);
|
||||
js::set('rdSearchValue', '');
|
||||
|
||||
$canSortRegion = commonModel::hasPriv('kanban', 'sortRegion') && count($regions) > 1;
|
||||
@@ -111,9 +112,6 @@ js::set('priv',
|
||||
'canUnlinkStory' => common::hasPriv('execution', 'unlinkStory'),
|
||||
)
|
||||
);
|
||||
js::set('hasStoryButton', $hasStoryButton);
|
||||
js::set('hasBugButton', $hasBugButton);
|
||||
js::set('hasTaskButton', $hasTaskButton);
|
||||
?>
|
||||
<div id='mainMenu' class='clearfix'>
|
||||
<div class='btn-toolbar pull-left'>
|
||||
|
||||
@@ -214,4 +214,5 @@ js::set('priv',
|
||||
<?php js::set('fluidBoard', $execution->fluidBoard);?>
|
||||
<?php js::set('displayCards', $execution->displayCards);?>
|
||||
<?php js::set('reviewStoryParis', $reviewStoryParis);?>
|
||||
<?php js::set('needLinkProducts', $lang->execution->needLinkProducts);?>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
Reference in New Issue
Block a user