Merge branch 'master' into 'fixbug'
# Conflicts: # module/setting/model.php
This commit is contained in:
@@ -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)";
|
||||
|
||||
+27
-1
@@ -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')))
|
||||
|
||||
@@ -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 = $('#<?php echo $formId;?>');
|
||||
$searchForm.find('select.chosen').chosen().on('chosen:showing_dropdown', function()
|
||||
{
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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]))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user