diff --git a/config/filter.php b/config/filter.php index 89ee1296f0..c700ab2094 100755 --- a/config/filter.php +++ b/config/filter.php @@ -172,6 +172,7 @@ $filter->tree->browse = new stdclass(); $filter->productplan->browse = new stdclass(); $filter->kanban->space = new stdclass(); $filter->execution->kanban = new stdclass(); +$filter->execution->all = new stdclass(); $filter->index->index->get['open'] = 'reg::base64'; @@ -300,14 +301,15 @@ $filter->productplan->browse->cookie['viewType'] = 'code'; $filter->task->create->cookie['lastTaskModule'] = 'int'; $filter->task->export->cookie['checkedItem'] = 'reg::checked'; -$filter->execution->default->cookie['kanbanview'] = 'code'; -$filter->execution->story->cookie['storyPreExecutionID'] = 'int'; -$filter->execution->story->cookie['storyModuleParam'] = 'int'; -$filter->execution->story->cookie['storyProductParam'] = 'int'; -$filter->execution->story->cookie['storyBranchParam'] = 'int'; -$filter->execution->story->cookie['executionStoryOrder'] = 'code'; -$filter->execution->export->cookie['checkedItem'] = 'reg::checked'; -$filter->execution->kanban->cookie['taskToOpen'] = 'int'; +$filter->execution->default->cookie['kanbanview'] = 'code'; +$filter->execution->story->cookie['storyPreExecutionID'] = 'int'; +$filter->execution->story->cookie['storyModuleParam'] = 'int'; +$filter->execution->story->cookie['storyProductParam'] = 'int'; +$filter->execution->story->cookie['storyBranchParam'] = 'int'; +$filter->execution->story->cookie['executionStoryOrder'] = 'code'; +$filter->execution->export->cookie['checkedItem'] = 'reg::checked'; +$filter->execution->kanban->cookie['taskToOpen'] = 'int'; +$filter->execution->all->cookie['showExecutionBatchEdit'] = 'int'; $filter->testcase->browse->cookie['caseModule'] = 'int'; $filter->testcase->browse->cookie['caseSuite'] = 'int'; diff --git a/framework/base/router.class.php b/framework/base/router.class.php index 9db231e3f4..84df7b4d85 100644 --- a/framework/base/router.class.php +++ b/framework/base/router.class.php @@ -1004,6 +1004,7 @@ class baseRouter array($ztSessionHandler, "destroy"), array($ztSessionHandler, "gc") ); + register_shutdown_function('session_write_close'); } } @@ -3167,7 +3168,6 @@ class ztSessionHandler { $this->tagID = $tagID; ini_set('session.save_handler', 'files'); - register_shutdown_function('session_write_close'); } /** diff --git a/module/execution/config.php b/module/execution/config.php index e3faacb40e..82dda40697 100644 --- a/module/execution/config.php +++ b/module/execution/config.php @@ -8,7 +8,7 @@ $config->execution->ownerFields = array('PO', 'PM', 'QD', 'RD'); $config->execution->defaultBurnPeriod = 30; $config->execution->list = new stdclass(); -$config->execution->list->exportFields = 'id,name,projectName,code,PM,begin,end,status,totalEstimate,totalConsumed,totalLeft,progress'; +$config->execution->list->exportFields = 'id,name,projectName,PM,begin,end,status,totalEstimate,totalConsumed,totalLeft,progress'; $config->execution->modelList['scrum'] = 'sprint'; $config->execution->modelList['waterfall'] = 'stage'; @@ -135,6 +135,7 @@ $config->execution->all->search['fields']['realEnd'] = $lang->execution-> $config->execution->all->search['fields']['closedBy'] = $lang->execution->closedBy; $config->execution->all->search['fields']['lastEditedDate'] = $lang->execution->lastEditedDate; $config->execution->all->search['fields']['closedDate'] = $lang->execution->closedDate; +$config->execution->all->search['fields']['teamCount'] = $lang->execution->teamCount; $config->execution->all->search['params']['name'] = array('operator' => 'include', 'control' => 'input', 'values' => ''); $config->execution->all->search['params']['id'] = array('operator' => '=', 'control' => 'input', 'values' => ''); @@ -150,6 +151,7 @@ $config->execution->all->search['params']['realEnd'] = array('operator' = $config->execution->all->search['params']['closedBy'] = array('operator' => '=', 'control' => 'select', 'values' => 'users'); $config->execution->all->search['params']['lastEditedDate'] = array('operator' => '=', 'control' => 'input', 'values' => '', 'class' => 'date'); $config->execution->all->search['params']['closedDate'] = array('operator' => '=', 'control' => 'input', 'values' => '', 'class' => 'date'); +$config->execution->all->search['params']['teamCount'] = array('operator' => '=', 'control' => 'input', 'values' => ''); $config->printKanban = new stdClass(); $config->printKanban->col['story'] = 1; @@ -173,11 +175,7 @@ $config->execution->gantt->linkType['end']['end'] = 2; $config->execution->gantt->linkType['begin']['end'] = 3; $config->execution->datatable = new stdclass(); -if((!isset($config->setCode) or $config->setCode == 1) and $config->systemMode == 'new') -{ - $config->execution->datatable->defaultField = array('id', 'name', 'code', 'project', 'PM', 'status', 'progress', 'begin', 'end', 'estimate', 'consumed', 'left', 'burn'); -} -elseif($config->systemMode == 'new') +if($config->systemMode == 'new') { $config->execution->datatable->defaultField = array('id', 'name', 'project', 'PM', 'status', 'progress', 'begin', 'end', 'estimate', 'consumed', 'left', 'burn'); } @@ -208,7 +206,7 @@ if($config->systemMode == 'new') { $config->execution->datatable->fieldList['project']['title'] = 'project'; $config->execution->datatable->fieldList['project']['fixed'] = 'no'; - $config->execution->datatable->fieldList['project']['width'] = '100'; + $config->execution->datatable->fieldList['project']['width'] = '128'; $config->execution->datatable->fieldList['project']['required'] = 'no'; } @@ -255,6 +253,12 @@ $config->execution->datatable->fieldList['realEnd']['width'] = '90'; $config->execution->datatable->fieldList['realEnd']['required'] = 'no'; $config->execution->datatable->fieldList['realEnd']['sort'] = 'no'; +$config->execution->datatable->fieldList['teamCount']['title'] = 'teamCount'; +$config->execution->datatable->fieldList['teamCount']['fixed'] = 'no'; +$config->execution->datatable->fieldList['teamCount']['width'] = '80'; +$config->execution->datatable->fieldList['teamCount']['required'] = 'no'; +$config->execution->datatable->fieldList['teamCount']['sort'] = 'no'; + $config->execution->datatable->fieldList['estimate']['title'] = 'estimate'; $config->execution->datatable->fieldList['estimate']['fixed'] = 'no'; $config->execution->datatable->fieldList['estimate']['width'] = '70'; diff --git a/module/execution/control.php b/module/execution/control.php index efc0e4a767..5d92d3ed7e 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -3760,6 +3760,7 @@ class execution extends control $this->view->from = $from; $this->view->param = $param; $this->view->isStage = (isset($project->model) and $project->model == 'waterfall') ? true : false; + $this->view->showBatchEdit = $this->cookie->showExecutionBatchEdit; $this->display(); } diff --git a/module/execution/css/all.css b/module/execution/css/all.css index 1e883297a6..1c672bb874 100644 --- a/module/execution/css/all.css +++ b/module/execution/css/all.css @@ -27,7 +27,7 @@ td.flex span.project-type-label {min-width: 40px;} .c-name > a, .table-children .text-left > a {padding-left: 5px;} .has-child > span {margin-right: 5px;} .c-name > .text-ellipsis {text-overflow: clip;} -.c-code, .c-project {overflow: hidden; white-space: nowrap;} +.c-code, .c-project {overflow: hidden; white-space: nowrap; padding: 0 8px;} th.c-status, .c-begin, .c-end, .c-realBegan, .c-realEnd {text-align: center;} .c-project{text-overflow: unset !important;} diff --git a/module/execution/css/manageproducts.css b/module/execution/css/manageproducts.css index f7304b36c3..3be7a6cec0 100644 --- a/module/execution/css/manageproducts.css +++ b/module/execution/css/manageproducts.css @@ -4,6 +4,6 @@ #productsBox .product.checked:hover {background: #E5FFE6; border: 1px solid #229F24;} #productsBox .product .checkbox-primary {padding: 9px; cursor: pointer;} #productsBox .product.has-branch {padding-right: 40%;} -#productsBox .product.has-branch > .chosen-container {position: absolute; width: 40% !important; right: 3px; top: 3px;} -#productsBox .product.has-branch > .chosen-container > .chosen-single {background: rgba(0,0,0,.05);} -#productsBox .product.has-branch > .chosen-container > .chosen-single:hover {background: #fff;} +#productsBox .product.has-branch > .picker {position: absolute; width: 40% !important; right: 3px; top: 3px; background-color: unset;} +#productsBox .product.has-branch > .picker > .picker-selections {background: rgba(0,0,0,.05);} +#productsBox .product.has-branch > .picker > .picker-selections:hover {background: #fff;} diff --git a/module/execution/js/all.js b/module/execution/js/all.js index 7d52829c0b..3f7384f54a 100644 --- a/module/execution/js/all.js +++ b/module/execution/js/all.js @@ -1,5 +1,17 @@ $(function() { + $("#" + status + "Tab").addClass('btn-active-text'); + $(document).on('click', '.plan-toggle', function(e) + { + var id = $(this).data('id'); + var $toggle = $(this); + var isCollapsed = $toggle.toggleClass('collapsed').hasClass('collapsed'); + $toggle.closest('#executionsForm').find('tr.parent-' + id).toggle(!isCollapsed); + + e.stopPropagation(); + e.preventDefault(); + }); + $('#executionTableList').on('sort.sortable', function(e, data) { var list = ''; @@ -60,6 +72,7 @@ $(function() } }); + /* Update table summary text. */ $('#executionsForm').table( { statisticCreator: function(table) @@ -67,21 +80,67 @@ $(function() var $table = table.getTable(); var $checkedRows = $table.find(table.isDataTable ? '.datatable-row-left.checked' : 'tbody>tr.checked'); var $originTable = table.isDataTable ? table.$.find('.datatable-origin') : null; - var $rows = $table.find(table.isDataTable ? '.datatable-rows .datatable-row-left' : 'tbody>tr'); + var checkedTotal = $checkedRows.length; + var $rows = checkedTotal ? $checkedRows : $table.find(table.isDataTable ? '.datatable-rows .datatable-row-left' : 'tbody>tr'); - var taskIdList = []; + var checkedWait = 0; + var checkedDoing = 0; + var executionIDList = []; $rows.each(function() { var $row = $(this); if($originTable) $row = $originTable.find('tbody>tr[data-id="' + $row.data('id') + '"]'); + var data = $row.data(); - taskIdList.push(data.id); + executionIDList.push(data.id); + + if(data.status === 'wait') checkedWait++; + if(data.status === 'doing') checkedDoing++; }); + + if(status != 'all') return (checkedTotal ? checkedExecutions : executionSummary).replace('%s', $rows.length); + return (checkedTotal ? checkedSummary : pageSummary).replace('%total%', $rows.length).replace('%wait%', checkedWait).replace('%doing%', checkedDoing); } }) + + $('input[name^="showEdit"]').click(function() + { + $.cookie('showExecutionBatchEdit', $(this).is(':checked') ? 1 : 0, {expires: config.cookieLife, path: config.webRoot}); + setCheckbox(); + }); + setCheckbox(); + + $('#executionTableList tr').on('click', function(e) + { + if($.cookie('showExecutionBatchEdit') != 1) e.stopPropagation(); + }); }); +/** + * Location to product list. + * + * @param int productID + * @param int projectID + * @param string status + * @access public + * @return void + */ function byProduct(productID, projectID, status) { location.href = createLink('project', 'all', "status=" + status + "&project=" + projectID + "&orderBy=" + orderBy + '&productID=' + productID); } + +/** + * Set batch edit checkbox. + * + * @access public + * @return void + */ +function setCheckbox() +{ + $('#executionsForm .checkbox-primary').hide(); + $('.check-all, .sortable tr').removeClass('checked'); + $(":checkbox[name^='executionIDList']").prop('checked', false); + $('#executionsForm').removeClass('has-row-checked'); + if($.cookie('showExecutionBatchEdit') == 1) $('#executionsForm .checkbox-primary').show(); +} diff --git a/module/execution/lang/de.php b/module/execution/lang/de.php index 9c88536042..12ce2c0a86 100644 --- a/module/execution/lang/de.php +++ b/module/execution/lang/de.php @@ -54,6 +54,7 @@ $lang->execution->end = 'Ende'; $lang->execution->dateRange = 'Dauer'; $lang->execution->realBeganAB = 'Actual Begin'; $lang->execution->realEndAB = 'Actual End'; +$lang->execution->teamCount = 'Anzahl der Personen'; $lang->execution->realBegan = 'Tatsächlicher Start'; $lang->execution->realEnd = 'Tatsächliches Ende'; $lang->execution->to = 'An'; @@ -341,6 +342,9 @@ $lang->execution->stats = '%s Verfügbar, execution->taskSummary = "Aufgaben auf dieser Seite: %s Total, %s Wartend, %s In Arbeit;     Stunden : %s geplant., %s genutzt, %s Rest."; $lang->execution->pageSummary = "Aufgaben auf dieser Seite: %total%, %wait% Wartend, %doing% In Arbeit; Stunden: %estimate% geplant, %consumed% genutzt, %left% Rest."; $lang->execution->checkedSummary = " %total% Geprüft, %wait% Wartend, %doing% In Arbeit; Stunden: %estimate% geplant, %consumed% genutzt, %left% Rest."; +$lang->execution->executionSummary = "Total executions: %s."; +$lang->execution->pageExecSummary = "Total executions: %total%. Waiting: %wait%. Doing: %doing%."; +$lang->execution->checkedExecSummary = "Selected: %total%. Waiting: %wait%. Doing: %doing%."; $lang->execution->memberHoursAB = "%s hat %s Stunden"; $lang->execution->memberHours = '
%s Arbeitsstunden
%s
'; $lang->execution->countSummary = '
Aufgaben
%s
In Arbeit
%s
Wait
%s
'; @@ -415,7 +419,7 @@ $lang->execution->storyDragError = "The {$lang->SRCommon} is not ac $lang->execution->countTip = ' (%s member)'; $lang->execution->pleaseInput = "Enter"; $lang->execution->week = 'week'; -$lang->execution->checkedExecutions = 'Seleted %s items'; +$lang->execution->checkedExecutions = 'Seleted %s executions.'; /* Statistics. */ $lang->execution->charts = new stdclass(); diff --git a/module/execution/lang/en.php b/module/execution/lang/en.php index e5cfcf3eeb..9f155eb2aa 100644 --- a/module/execution/lang/en.php +++ b/module/execution/lang/en.php @@ -54,6 +54,7 @@ $lang->execution->end = 'Planned End'; $lang->execution->dateRange = 'Plan Duration'; $lang->execution->realBeganAB = 'Actual Begin'; $lang->execution->realEndAB = 'Actual End'; +$lang->execution->teamCount = 'number of people'; $lang->execution->realBegan = 'Actual Begin'; $lang->execution->realEnd = 'Actual End'; $lang->execution->to = 'To'; @@ -341,6 +342,9 @@ $lang->execution->stats = 'Available: %s(h). Est $lang->execution->taskSummary = "Total tasks on this page:%s. Waiting: %s. Doing: %s.     Estimates: %s(h). Cost: %s(h). Left: %s(h)."; $lang->execution->pageSummary = "Total tasks: %total%. Waiting: %wait%. Doing: %doing%. Estimates: %estimate%(h). Cost: %consumed%(h). Left: %left%(h)."; $lang->execution->checkedSummary = "Selected: %total%. Waiting: %wait%. Doing: %doing%. Estimates: %estimate%(h). Cost: %consumed%(h). Left: %left%(h)."; +$lang->execution->executionSummary = "Total executions: %s."; +$lang->execution->pageExecSummary = "Total executions: %total%. Waiting: %wait%. Doing: %doing%."; +$lang->execution->checkedExecSummary = "Selected: %total%. Waiting: %wait%. Doing: %doing%."; $lang->execution->memberHoursAB = "%s has %s hours."; $lang->execution->memberHours = '
%s Available Hours
%s
'; $lang->execution->countSummary = '
Tasks
%s
Doing
%s
Waiting
%s
'; @@ -415,7 +419,7 @@ $lang->execution->storyDragError = "The {$lang->SRCommon} is not ac $lang->execution->countTip = ' (%s member)'; $lang->execution->pleaseInput = "Enter"; $lang->execution->week = 'week'; -$lang->execution->checkedExecutions = 'Seleted %s items'; +$lang->execution->checkedExecutions = 'Seleted %s executions.'; /* Statistics. */ $lang->execution->charts = new stdclass(); diff --git a/module/execution/lang/fr.php b/module/execution/lang/fr.php index 6764593377..6c3bcc38e3 100644 --- a/module/execution/lang/fr.php +++ b/module/execution/lang/fr.php @@ -54,6 +54,7 @@ $lang->execution->end = 'Fin'; $lang->execution->dateRange = 'Durée'; $lang->execution->realBeganAB = 'Actual Begin'; $lang->execution->realEndAB = 'Actual End'; +$lang->execution->teamCount = 'nombre de personnes'; $lang->execution->realBegan = 'Début effectif'; $lang->execution->realEnd = 'Clôture effective'; $lang->execution->to = 'à'; @@ -341,6 +342,9 @@ $lang->execution->stats = 'Disponible: %s(h). Es $lang->execution->taskSummary = "Total des tâches de cette page :%s. A Faire: %s. En cours: %s.     Estimé: %s(h). Coût: %s(h). Reste: %s(h)."; $lang->execution->pageSummary = "Total des tâches de cette page: %total%. A Faire: %wait%. En cours: %doing%.     Estimé: %estimate%(h). Coût: %consumed%(h). Reste: %left%(h)."; $lang->execution->checkedSummary = "Sélectionné: %total%. A Faire: %wait%. En cours: %doing%.     Estimé: %estimate%(h). Coût: %consumed%(h). Reste: %left%(h)."; +$lang->execution->executionSummary = "Total executions: %s."; +$lang->execution->pageExecSummary = "Total executions: %total%. Waiting: %wait%. Doing: %doing%."; +$lang->execution->checkedExecSummary = "Selected: %total%. Waiting: %wait%. Doing: %doing%."; $lang->execution->memberHoursAB = "%s a %s heures."; $lang->execution->memberHours = '
%s Heures Disponibles
%s
'; $lang->execution->countSummary = '
Tâches
%s
En Cours
%s
A Faire
%s
'; @@ -415,7 +419,7 @@ $lang->execution->storyDragError = "The {$lang->SRCommon} is not ac $lang->execution->countTip = ' (%s member)'; $lang->execution->pleaseInput = "Enter"; $lang->execution->week = 'week'; -$lang->execution->checkedExecutions = "Pour s électionner l'élément%s"; +$lang->execution->checkedExecutions = "Pour s électionner l'élément%s."; /* Statistics. */ $lang->execution->charts = new stdclass(); diff --git a/module/execution/lang/vi.php b/module/execution/lang/vi.php index 5031004d73..e13b1a4eca 100644 --- a/module/execution/lang/vi.php +++ b/module/execution/lang/vi.php @@ -54,6 +54,7 @@ $lang->execution->RD = 'Quản lý phát hành'; $lang->execution->release = 'Phát hành'; $lang->execution->acl = 'Quyền truy cập'; $lang->execution->teamname = 'Tên đội nhóm'; +$lang->execution->teamCount = 'số người'; $lang->execution->order = "Đánh giá {$lang->executionCommon}"; $lang->execution->orderAB = "Đánh giá"; $lang->execution->products = "Liên kết {$lang->productCommon}"; diff --git a/module/execution/lang/zh-cn.php b/module/execution/lang/zh-cn.php index 5d3bd56de2..e2b6c7b3c3 100644 --- a/module/execution/lang/zh-cn.php +++ b/module/execution/lang/zh-cn.php @@ -54,6 +54,7 @@ $lang->execution->end = '计划完成'; $lang->execution->dateRange = '计划起止日期'; $lang->execution->realBeganAB = '实际开始'; $lang->execution->realEndAB = '实际完成'; +$lang->execution->teamCount = '人数'; $lang->execution->realBegan = '实际开始日期'; $lang->execution->realEnd = '实际完成日期'; $lang->execution->to = '至'; @@ -341,6 +342,9 @@ $lang->execution->stats = '可用工时 %s 工 $lang->execution->taskSummary = "本页共 %s 个任务,未开始 %s,进行中 %s,总预计 %s 工时,已消耗 %s 工时,剩余 %s 工时。"; $lang->execution->pageSummary = "本页共 %total% 个任务,未开始 %wait%,进行中 %doing%,总预计 %estimate% 工时,已消耗 %consumed% 工时,剩余 %left% 工时。"; $lang->execution->checkedSummary = "选中 %total% 个任务,未开始 %wait%,进行中 %doing%,总预计 %estimate% 工时,已消耗 %consumed% 工时,剩余 %left% 工时。"; +$lang->execution->executionSummary = "本页共 %s 个{$lang->executionCommon}。"; +$lang->execution->pageExecSummary = "本页共 %total% 个{$lang->executionCommon},未开始 %wait%,进行中 %doing%。"; +$lang->execution->checkedExecSummary = "选中 %total% 个{$lang->executionCommon},未开始 %wait%,进行中 %doing%。"; $lang->execution->memberHoursAB = "
%s有 %s 工时
"; $lang->execution->memberHours = '
%s可用工时
%s
'; $lang->execution->countSummary = '
总任务
%s
进行中
%s
未开始
%s
'; @@ -415,7 +419,7 @@ $lang->execution->storyDragError = "该{$lang->SRCommon}不是激 $lang->execution->countTip = '(%s人)'; $lang->execution->pleaseInput = "请输入"; $lang->execution->week = '周'; -$lang->execution->checkedExecutions = '已选择%s项'; +$lang->execution->checkedExecutions = "共选中%s个{$lang->execution->common}。"; /* 统计。*/ $lang->execution->charts = new stdclass(); diff --git a/module/execution/lang/zh-tw.php b/module/execution/lang/zh-tw.php index 1c06be7dd3..2eb28b233b 100644 --- a/module/execution/lang/zh-tw.php +++ b/module/execution/lang/zh-tw.php @@ -54,6 +54,7 @@ $lang->execution->execPM = "{$lang->execution->common}負責人"; $lang->execution->QD = '測試負責人'; $lang->execution->RD = '發佈負責人'; $lang->execution->release = '發佈'; +$lang->execution->teamCount = '人數'; $lang->execution->acl = '訪問控制'; $lang->execution->teamname = '團隊名稱'; $lang->execution->updateOrder = '排序'; diff --git a/module/execution/model.php b/module/execution/model.php index 1137d00672..6e98e56468 100644 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -1531,6 +1531,15 @@ class executionModel extends model $hours = $this->loadModel('project')->computerProgress($executions); $burns = $this->getBurnData($executions); + /* Get the number of execution teams. */ + $teams = $this->dao->select('t1.root,count(t1.id) as teams')->from(TABLE_TEAM)->alias('t1') + ->leftJoin(TABLE_USER)->alias('t2')->on('t1.account=t2.account') + ->where('t1.root')->in(array_keys($executions)) + ->andWhere('t1.type')->ne('project') + ->andWhere('t2.deleted')->eq(0) + ->groupBy('t1.root') + ->fetchAll('root'); + if($withTasks) $executionTasks = $this->getTaskGroupByExecution(array_keys($executions)); /* Process executions. */ @@ -1557,6 +1566,7 @@ class executionModel extends model /* Process the hours. */ $execution->hours = isset($hours[$execution->id]) ? $hours[$execution->id] : (object)$emptyHour; + $execution->teamCount = isset($teams[$execution->id]) ? $teams[$execution->id]->teams : 0; if(isset($executionTasks) and isset($executionTasks[$execution->id])) { @@ -4582,12 +4592,12 @@ class executionModel extends model if(!$isChild) { $trClass = 'is-top-level table-nest-child-hide'; - $trAttrs = "data-id='$execution->id' data-order='$execution->order' data-nested='true'"; + $trAttrs = "data-id='$execution->id' data-order='$execution->order' data-nested='true' data-status={$execution->status}"; } else { $trClass = 'table-nest-hide'; - $trAttrs = "data-id={$execution->id} data-parent={$execution->parent}"; + $trAttrs = "data-id={$execution->id} data-parent={$execution->parent} data-status={$execution->status}"; $trAttrs .= " data-nest-parent='$execution->parent' data-order='$execution->order' data-nest-path=',$execution->parent,$execution->id,'"; } @@ -4841,6 +4851,12 @@ class executionModel extends model if(!empty($execution->children)) $class .= ' has-child'; } + if($id == 'teamCount') + { + $title = " title='{$execution->teamCount}'"; + $class .= ' text-right'; + } + if($id == 'project') $title = " title='{$execution->projectName}'"; if($id == 'code') $title = " title='{$execution->code}'"; @@ -4909,6 +4925,9 @@ class executionModel extends model case 'begin': echo helper::isZeroDate($execution->begin) ? '' : $execution->begin; break; + case 'teamCount': + echo $execution->teamCount; + break; case 'end': echo helper::isZeroDate($execution->end) ? '' : $execution->end; break; diff --git a/module/execution/view/all.html.php b/module/execution/view/all.html.php index 715cf14aae..b072f3a78e 100644 --- a/module/execution/view/all.html.php +++ b/module/execution/view/all.html.php @@ -19,14 +19,19 @@ $useDatatable = (isset($config->datatable->$datatableId->mode) and $config->data +execution->checkedExecSummary);?> +execution->pageExecSummary);?> +execution->executionSummary);?> +execution->checkedExecutions);?> execution->treeLevel['all']); js::set('foldAll', $lang->execution->treeLevel['root']); js::set('isCNLang', !$this->loadModel('common')->checkNotCN()) ?> + - + @@ -64,7 +64,7 @@ ";?> - + @@ -88,7 +88,7 @@ ";?> - + diff --git a/module/execution/view/task.html.php b/module/execution/view/task.html.php index 6b722f4ed8..8920e3aeee 100644 --- a/module/execution/view/task.html.php +++ b/module/execution/view/task.html.php @@ -403,7 +403,7 @@ body {margin-bottom: 25px;} diff --git a/module/release/control.php b/module/release/control.php index 4bc2e24adf..703873896b 100644 --- a/module/release/control.php +++ b/module/release/control.php @@ -245,6 +245,14 @@ class release extends control $this->view->storyPager = $storyPager; $this->view->bugPager = $bugPager; $this->view->leftBugPager = $leftBugPager; + + if($this->app->getViewType() == 'json') + { + unset($this->view->storyPager); + unset($this->view->bugPager); + unset($this->view->leftBugPager); + } + $this->display(); } diff --git a/module/story/js/edit.js b/module/story/js/edit.js index 7e1c65d088..d81afca352 100644 --- a/module/story/js/edit.js +++ b/module/story/js/edit.js @@ -80,10 +80,13 @@ $(function() modalTrigger.show(); }); - $('#duplicateStory').picker( + if($('#duplicateStory').length > 0) { - disableEmptySearch : true, - dropWidth : 'auto', - maxAutoDropWidth : document.body.scrollWidth + document.getElementById('duplicateStory').offsetWidth - document.getElementById('duplicateStoryBox').getBoundingClientRect().right - }); + $('#duplicateStory').picker( + { + disableEmptySearch : true, + dropWidth : 'auto', + maxAutoDropWidth : document.body.scrollWidth + document.getElementById('duplicateStory').offsetWidth - document.getElementById('duplicateStoryBox').getBoundingClientRect().right + }); + } }) diff --git a/module/testsuite/control.php b/module/testsuite/control.php index 91739e1c81..f1db7cad12 100644 --- a/module/testsuite/control.php +++ b/module/testsuite/control.php @@ -323,7 +323,7 @@ class testsuite extends control /* Build the search form. */ $this->loadModel('testcase'); - $this->config->testcase->search['params']['module']['values'] = $this->loadModel('tree')->getOptionMenu($productID, $viewType = 'case'); + $this->config->testcase->search['params']['module']['values'] = $this->loadModel('tree')->getOptionMenu($productID, $viewType = 'case', 0, 'all'); $this->config->testcase->search['module'] = 'testsuite'; $this->config->testcase->search['actionURL'] = inlink('linkCase', "suiteID=$suiteID¶m=myQueryID"); unset($this->config->testcase->search['fields']['product']); diff --git a/module/user/js/batchcreate.js b/module/user/js/batchcreate.js index baad36b81d..600d327709 100644 --- a/module/user/js/batchcreate.js +++ b/module/user/js/batchcreate.js @@ -131,21 +131,18 @@ function initGroup(data) }) } -$(document).on('change', "select[id^='visions']", function() +/** + * Get group data by selected vision. + * + * @param int $i + * @access public + * @return html + */ +function getGroupSelect(i) { - var i = parseInt($(this).attr('id').replace(/[^0-9]/ig, '')); + if(i < 1) return ''; var visions = $('select[id="visions' + i + '"]').val(); - var groups = $('#group' + i).val(); - if($.inArray('ditto', groups) >= 0) groups = ''; - - $.post(createLink('user', 'ajaxGetGroup', "visions=" + visions + '&i=' + i + '&selected=' + groups), function(data) - { - $('#group' + i).replaceWith(data); - $('#group' + i + '_chosen').remove(); - $('#group' + i).chosen(); - }) - visions = visions ? visions.join() : ''; switch(visions) { @@ -158,14 +155,25 @@ $(document).on('change', "select[id^='visions']", function() case 'rnd,lite': var data = allGroupSelect; break; + case 'ditto': + var data = getGroupSelect(i - 1); + break; default: var data = emptyGroupSelect; break; } - for(n = i + 1; n <= batchCreateCount; n++) + + return data; +} + +$(document).on('change', "select[id^='visions']", function() +{ + var i = parseInt($(this).attr('id').replace(/[^0-9]/ig, '')); + var data = getGroupSelect(i); + + for(n = i; n <= batchCreateCount; n++) { - if(n == i) continue; - if($.inArray('ditto', $('select[id="visions' + n + '"]').val()) < 0) break; + if(n != i && $.inArray('ditto', $('select[id="visions' + n + '"]').val()) < 0) break; ((function(n) {