diff --git a/module/bug/control.php b/module/bug/control.php index 9d14a7a01c..5b8fa4fcf7 100755 --- a/module/bug/control.php +++ b/module/bug/control.php @@ -2259,6 +2259,13 @@ class bug extends control $bug->steps = str_replace(' ', ' ', $bug->steps); } + $bug->openedDate = !helper::isZeroDate($bug->openedDate) ? $bug->openedDate : ''; + $bug->assignedDate = !helper::isZeroDate($bug->assignedDate) ? $bug->assignedDate : ''; + $bug->resolvedDate = !helper::isZeroDate($bug->resolvedDate) ? $bug->resolvedDate : ''; + $bug->closedDate = !helper::isZeroDate($bug->closedDate) ? $bug->closedDate : ''; + $bug->lastEditedDate = !helper::isZeroDate($bug->lastEditedDate) ? $bug->lastEditedDate : ''; + $bug->deadline = !helper::isZeroDate($bug->deadline) ? $bug->deadline : ''; + /* fill some field with useful value. */ $bug->product = !isset($products[$bug->product]) ? '' : $products[$bug->product] . "(#$bug->product)"; $bug->project = !isset($projects[$bug->project]) ? '' : $projects[$bug->project] . "(#$bug->project)"; diff --git a/module/kanban/model.php b/module/kanban/model.php index 6d7d1b2b8c..9ee506694f 100644 --- a/module/kanban/model.php +++ b/module/kanban/model.php @@ -1479,6 +1479,19 @@ class kanbanModel extends model if($browseType == 'bug') $cardList = $this->loadModel('bug')->getExecutionBugs($executionID); if($browseType == 'task') $cardList = $this->loadModel('execution')->getKanbanTasks($executionID, "id"); + if($browseType == 'task' and $groupBy == 'assignedTo') + { + foreach($cardList as $id => $task) + { + if($task->mode == 'multi') + { + $task->team = $this->dao->select('t1.account,t2.realname')->from(TABLE_TEAM)->alias('t1') + ->leftJoin(TABLE_USER)->alias('t2')->on('t1.account = t2.account') + ->where('t1.root')->eq($id)->andWhere('t1.type')->eq('task')->orderBy('t1.order')->fetchPairs('account'); + } + } + } + /* Get objects cards menus. */ if($browseType == 'story') $storyCardMenu = $this->getKanbanCardMenu($executionID, $cardList, 'story'); if($browseType == 'bug') $bugCardMenu = $this->getKanbanCardMenu($executionID, $cardList, 'bug'); @@ -1564,7 +1577,12 @@ class kanbanModel extends model $cardData = array(); if(in_array($groupBy, array('module', 'story', 'pri', 'severity')) and (int)$object->$groupBy !== $laneID) continue; - if(in_array($groupBy, array('assignedTo', 'type', 'category', 'source')) and $object->$groupBy !== $laneID) continue; + if(in_array($groupBy, array('type', 'category', 'source')) and $object->$groupBy !== $laneID) continue; + if($groupBy == 'assignedTo') + { + if(empty($object->team) and $object->$groupBy !== $laneID) continue; + if(!empty($object->team) and !in_array($laneID, array_keys($object->team), true)) continue; + } $cardData['id'] = $object->id; $cardData['order'] = $cardOrder; @@ -1625,6 +1643,14 @@ class kanbanModel extends model foreach($cardList as $item) { if(!isset($groupByList[$item->$groupBy])) $groupByList[$item->$groupBy] = $item->$groupBy; + + if($groupBy == 'assignedTo' and !empty($item->team)) + { + foreach($item->team as $account => $name) + { + if(!isset($groupByList[$account])) $groupByList[$account] = $account; + } + } } if(in_array($groupBy, array('module', 'story', 'assignedTo'))) diff --git a/module/search/view/buildform.html.php b/module/search/view/buildform.html.php index 9a1ecc4516..482db3d259 100644 --- a/module/search/view/buildform.html.php +++ b/module/search/view/buildform.html.php @@ -284,8 +284,11 @@ function executeQuery(queryID) $(function() { - if(!canSaveQuery) $('.btn-save-form').attr('disabled', 'disabled'); - + if(!canSaveQuery) + { + $('.btn-save-form').attr('disabled', 'disabled'); + $('.btn-save-form').css('pointer-events', 'none'); + } var $searchForm = $('#'); $searchForm.find('select.chosen').chosen().on('chosen:showing_dropdown', function() { diff --git a/module/task/control.php b/module/task/control.php index 225a1bbf1f..e46a6399c5 100755 --- a/module/task/control.php +++ b/module/task/control.php @@ -44,7 +44,8 @@ class task extends control $extra = str_replace(array(',', ' '), array('&', ''), $extra); parse_str($extra, $output); - $executions = $this->execution->getPairs(0, 'all', 'noclosed'); + $execution = $this->execution->getById($executionID); + $executions = $this->execution->getPairs(0, 'all', !common::canModify('execution', $execution) ? 'noclosed' : ''); $executionID = $this->execution->saveState($executionID, $executions); $this->execution->setMenu($executionID); @@ -92,7 +93,6 @@ class task extends control $task->assignedTo = array($bug->assignedTo); } - $execution = $this->execution->getById($executionID); $taskLink = $this->createLink('execution', 'browse', "executionID=$executionID&tab=task"); $this->loadModel('kanban'); @@ -283,7 +283,7 @@ class task extends control $this->view->position = $position; $this->view->gobackLink = (isset($output['from']) and $output['from'] == 'global') ? $this->createLink('execution', 'task', "executionID=$executionID") : ''; $this->view->execution = $execution; - $this->view->executions = $this->config->systemMode == 'classic' ? $executions : $this->execution->getByProject($projectID, 'undone', 0, true); + $this->view->executions = $this->config->systemMode == 'classic' ? $executions : $this->execution->getByProject($projectID, !common::canModify('execution', $execution) ? 'noclosed' : 'all', 0, true); $this->view->task = $task; $this->view->users = $users; $this->view->storyID = $storyID; diff --git a/module/task/js/batchcreate.js b/module/task/js/batchcreate.js index b98330264c..cccca95207 100755 --- a/module/task/js/batchcreate.js +++ b/module/task/js/batchcreate.js @@ -136,12 +136,14 @@ function setPreview(num) storyLink = storyLink + concat + 'onlybody=yes'; } $('#preview' + num).removeAttr('disabled'); + $('#preview' + num).modalTrigger({type:'iframe'}); $('#preview' + num).attr('href', storyLink); } else { storyLink = '#'; $('#preview' + num).attr('disabled', true); + $('#preview' + num).css('pointer-events', 'none'); $('#preview' + num).attr('href', storyLink); } } diff --git a/module/testcase/control.php b/module/testcase/control.php index 70d766f8b5..fda3c10423 100644 --- a/module/testcase/control.php +++ b/module/testcase/control.php @@ -1582,6 +1582,10 @@ class testcase extends control $case->real = ''; $result = isset($results[$case->id]) ? $results[$case->id] : array(); + $case->openedDate = !helper::isZeroDate($case->openedDate) ? $case->openedDate : ''; + $case->lastEditedDate = !helper::isZeroDate($case->lastEditedDate) ? $case->lastEditedDate : ''; + $case->lastRunDate = !helper::isZeroDate($case->lastRunDate) ? $case->lastRunDate : ''; + $case->real = ''; if(!empty($result) and !isset($relatedSteps[$case->id])) {