Merge branch 'master' of https://gitlab.zcorp.cc/easycorp/zentaopms into sprint/tianshujie_fixbug
This commit is contained in:
@@ -5,3 +5,6 @@ ALTER TABLE `zt_kanbanspace` ADD COLUMN `activatedDate` datetime NOT NULL AFTER
|
||||
|
||||
ALTER TABLE `zt_kanban` ADD COLUMN `activatedBy` char(30) NOT NULL AFTER `closedDate`;
|
||||
ALTER TABLE `zt_kanban` ADD COLUMN `activatedDate` datetime NOT NULL AFTER `activatedBy`;
|
||||
|
||||
ALTER TABLE `zt_task` ADD COLUMN `mode` varchar(10) NOT NULL AFTER `type`;
|
||||
UPDATE `zt_task` SET mode = 'linear' WHERE `id` IN (SELECT root FROM `zt_team` WHERE type = 'task');
|
||||
|
||||
@@ -1464,6 +1464,7 @@ CREATE TABLE IF NOT EXISTS `zt_task` (
|
||||
`fromIssue` mediumint(8) unsigned NOT NULL default '0',
|
||||
`name` varchar(255) NOT NULL,
|
||||
`type` varchar(20) NOT NULL,
|
||||
`mode` varchar(10) NOT NULL,
|
||||
`pri` tinyint(3) unsigned NOT NULL default '0',
|
||||
`estimate` float unsigned NOT NULL,
|
||||
`consumed` float unsigned NOT NULL,
|
||||
|
||||
@@ -340,6 +340,7 @@ $config->bug->datatable->fieldList['actions']['width'] = '150';
|
||||
$config->bug->datatable->fieldList['actions']['required'] = 'yes';
|
||||
|
||||
$config->bug->colorList = new stdclass();
|
||||
$config->bug->colorList->pri[0] = '#c0c0c0';
|
||||
$config->bug->colorList->pri[1] = '#d50000';
|
||||
$config->bug->colorList->pri[2] = '#ff9800';
|
||||
$config->bug->colorList->pri[3] = '#2098ee';
|
||||
|
||||
@@ -66,7 +66,8 @@ class bug extends control
|
||||
}
|
||||
else
|
||||
{
|
||||
$products = $this->product->getPairs('', 0, 'program_asc');
|
||||
$mode = (empty($this->config->CRProduct)) ? 'noclosed' : '';
|
||||
$products = $this->product->getPairs($mode, 0, 'program_asc');
|
||||
}
|
||||
$this->view->products = $this->products = $products;
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ $(function()
|
||||
$('.table-wrapper').each(function()
|
||||
{
|
||||
var $this = $(this);
|
||||
$this.css('max-height', $this.closest('.table').find('.chart-wrapper').outerHeight());
|
||||
$this.css('max-height', $this.closest('.table-row.chart-row').find('.chart-wrapper').outerHeight());
|
||||
});
|
||||
};
|
||||
resizeChartTable();
|
||||
|
||||
@@ -2218,7 +2218,7 @@ class bugModel extends model
|
||||
{
|
||||
$datas = $this->dao->select('severity AS name, COUNT(*) AS value')->from(TABLE_BUG)->where($this->reportCondition())->groupBy('name')->orderBy('value DESC')->fetchAll('name');
|
||||
if(!$datas) return array();
|
||||
foreach($datas as $severity => $data) if(isset($this->lang->bug->severityList[$severity])) $data->name = $this->lang->bug->severityList[$severity];
|
||||
foreach($datas as $severity => $data) if(isset($this->lang->bug->severityList[$severity])) $data->name = $this->lang->bug->report->bugsPerSeverity->graph->xAxisName . ':' . $this->lang->bug->severityList[$severity];
|
||||
return $datas;
|
||||
}
|
||||
|
||||
|
||||
@@ -137,7 +137,12 @@ if($this->app->tab == 'project') js::set('objectID', $bug->project);
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->bug->status;?></th>
|
||||
<td><?php echo zget($lang->bug->statusList, $bug->status);?></td>
|
||||
<td>
|
||||
<?php
|
||||
echo zget($lang->bug->statusList, $bug->status);
|
||||
echo html::hidden('status', $bug->status);
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->bug->confirmed;?></th>
|
||||
|
||||
@@ -36,7 +36,7 @@ $('[name*=unitList]').change(function()
|
||||
|
||||
$('#submit').click(function()
|
||||
{
|
||||
if(module == 'testcase' && field == 'review' && stopSubmit)
|
||||
if(module == 'testcase' && field == 'review' && stopSubmit && oldNeedReview)
|
||||
{
|
||||
var needReview = $('input:radio[name="needReview"]:checked').val();
|
||||
stopSubmit = false;
|
||||
|
||||
@@ -128,6 +128,7 @@ EOT;
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<?php if($module == 'testcase'):?>
|
||||
<?php js::set('oldNeedReview', $needReview);?>
|
||||
<tr <?php if($needReview) echo "class='hidden'"?>>
|
||||
<th><?php echo $lang->custom->forceReview;?></th>
|
||||
<td><?php echo html::select('forceReview[]', $users, $forceReview, "class='form-control chosen' multiple");?></td>
|
||||
|
||||
@@ -220,9 +220,12 @@ class design extends control
|
||||
*/
|
||||
public function view($designID = 0)
|
||||
{
|
||||
$design = $this->design->getByID($designID);
|
||||
$design = $this->design->getByID($designID);
|
||||
$productID = $this->commonAction($design->project, $design->product, $designID);
|
||||
|
||||
$this->session->set('revisionList', $this->app->getURI(true));
|
||||
$this->session->set('storyList', $this->app->getURI(true), 'product');
|
||||
|
||||
$this->view->title = $this->lang->design->common . $this->lang->colon . $this->lang->design->view;
|
||||
$this->view->position[] = $this->lang->design->view;
|
||||
|
||||
|
||||
@@ -249,7 +249,7 @@ class designModel extends model
|
||||
|
||||
$design->commit = '';
|
||||
$relations = $this->loadModel('common')->getRelations('design', $designID, 'commit');
|
||||
foreach($relations as $relation) $design->commit .= html::a(helper::createLink('design', 'revision', "repoID=$relation->BID&projectID={$design->project}"), "#$relation->BID", '', "class=iframe");
|
||||
foreach($relations as $relation) $design->commit .= html::a(helper::createLink('design', 'revision', "repoID=$relation->BID&projectID={$design->project}"), "#$relation->BID");
|
||||
|
||||
return $this->loadModel('file')->replaceImgURL($design, 'desc');
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->design->story;?></th>
|
||||
<td><?php echo $design->story ? html::a($this->createLink('story', 'view', "id=$design->story", '', true), zget($stories, $design->story), '',"class=iframe") : '';?></td>
|
||||
<td><?php echo $design->story ? html::a($this->createLink('story', 'view', "id=$design->story"), zget($stories, $design->story)) : '';?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->design->submission;?></th>
|
||||
|
||||
@@ -5,6 +5,21 @@
|
||||
<?php if($execution->lifetime != 'ops') echo html::a($this->createLink('execution', 'linkstory', "executionID=$executionID"), $lang->execution->linkStory, '', "class='btn' data-app='execution'");?>
|
||||
<?php echo html::a($this->createLink('task', 'create', "execution=$executionID"), $lang->execution->createTask, '', "class='btn' data-app='execution'");?>
|
||||
<?php echo html::a($this->createLink('execution', 'task', "executionID=$executionID"), $lang->execution->goback, '', "class='btn' data-app='execution'");?>
|
||||
<?php echo html::a($this->createLink('project', 'execution', "status=all&projectID=$projectID"), $lang->execution->gobackExecution, '', "class='btn' data-app='project'");?>
|
||||
<?php echo html::a('javascript:void(0)', $lang->execution->gobackExecution, '', "class='btn' onclick='closeTipModal($projectID)' data-app='project'");?>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
/**
|
||||
* Click the return to iteration list button to close tipModal.
|
||||
*
|
||||
* @param int $projectID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function closeTipModal(projectID)
|
||||
{
|
||||
$(".close").trigger("click");
|
||||
var link = createLink('project', 'execution', 'status=all&projectID=' + projectID);
|
||||
$.apps.open(link, 'project');
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -270,7 +270,7 @@ class productModel extends model
|
||||
->orWhere('t1.createdBy')->eq($this->app->user->account)
|
||||
->markRight(1)
|
||||
->fi()
|
||||
->orderBy('t1.order_asc')
|
||||
->orderBy('t1.program_asc,t1.order_asc')
|
||||
->beginIF($limit > 0)->limit($limit)->fi()
|
||||
->fetchAll('id');
|
||||
}
|
||||
|
||||
@@ -7,6 +7,22 @@ $(function()
|
||||
$form.css('min-height', $form.height());
|
||||
})
|
||||
|
||||
$('#repoForm').bind('DOMNodeInserted', function(e)
|
||||
{
|
||||
if($("#clientLabel").length > 0)
|
||||
{
|
||||
if($("#client").val() !== '' && $("#client").val().indexOf(" ") == -1)
|
||||
{
|
||||
$("#clientLabel").css('color', '#0c64eb');
|
||||
$("#client").attr('style', 'border-color: #0c64eb !important;box-shadow: 0 0 6px #0c64eb !important;');
|
||||
}
|
||||
else
|
||||
{
|
||||
$("#client").removeAttr("style");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$('#gitlabHost').change(function()
|
||||
{
|
||||
host = $('#gitlabHost').val();
|
||||
|
||||
@@ -824,7 +824,7 @@ class task extends control
|
||||
$this->loadModel('action');
|
||||
foreach($tasks as $taskID => $task)
|
||||
{
|
||||
if(isset($muletipleTasks[$taskID]) and $task->assignedTo != $this->app->user->account) continue;
|
||||
if(isset($muletipleTasks[$taskID]) and $task->assignedTo != $this->app->user->account and $task->mode == 'linear') continue;
|
||||
if(isset($muletipleTasks[$taskID]) and !isset($muletipleTasks[$taskID][$this->post->assignedTo])) continue;
|
||||
|
||||
$changes = $this->task->assign($taskID);
|
||||
@@ -1207,7 +1207,7 @@ class task extends control
|
||||
}
|
||||
|
||||
$task = $this->view->task;
|
||||
$members = $this->loadModel('user')->getTeamMemberPairs($task->execution, 'execution', 'nodeleted');
|
||||
$members = $task->team ? $this->task->getMemberPairs($task) : $this->loadModel('user')->getTeamMemberPairs($task->execution, 'execution', 'nodeleted');
|
||||
$task->nextBy = $task->openedBy;
|
||||
|
||||
$this->view->users = $members;
|
||||
|
||||
@@ -23,6 +23,7 @@ function loadExecutionMembers(executionID)
|
||||
{
|
||||
$("#multipleBox").removeAttr("checked");
|
||||
$('.team-group').addClass('hidden');
|
||||
$(".modeBox").addClass("hidden");
|
||||
$.get(createLink('execution', 'ajaxGetMembers', 'executionID=' + executionID + '&assignedTo=' + $('#assignedTo').val()), function(data)
|
||||
{
|
||||
$('#assignedTo_chosen').remove();
|
||||
@@ -141,6 +142,7 @@ function setOwners(result)
|
||||
{
|
||||
$("#multipleBox").removeAttr("checked");
|
||||
$('.team-group').addClass('hidden');
|
||||
$('.modeBox').addClass('hidden');
|
||||
$('#assignedTo, #assignedTo_chosen').removeClass('hidden');
|
||||
$('#assignedTo').next('.picker').removeClass('hidden');
|
||||
if(result == 'affair')
|
||||
@@ -150,6 +152,7 @@ function setOwners(result)
|
||||
$('#assignedTo').chosen();
|
||||
$('.affair').hide();
|
||||
$('.team-group').addClass('hidden');
|
||||
$('.modeBox').addClass('hidden');
|
||||
$('#selectAllUser').removeClass('hidden');
|
||||
}
|
||||
else if($('#assignedTo').attr('multiple') == 'multiple')
|
||||
@@ -421,7 +424,7 @@ $(document).ready(function()
|
||||
|
||||
$(window).resize();
|
||||
|
||||
/* show team menu. */
|
||||
/* Show team menu. */
|
||||
$('[name^=multiple]').change(function()
|
||||
{
|
||||
if($(this).prop('checked'))
|
||||
@@ -429,6 +432,7 @@ $(document).ready(function()
|
||||
$('#assignedTo, #assignedTo_chosen').addClass('hidden');
|
||||
$('#assignedTo').next('.picker').addClass('hidden');
|
||||
$('.team-group').removeClass('hidden');
|
||||
$('.modeBox').removeClass('hidden');
|
||||
$('#estimate').attr('readonly', true);
|
||||
}
|
||||
else
|
||||
@@ -436,6 +440,7 @@ $(document).ready(function()
|
||||
$('#assignedTo, #assignedTo_chosen').removeClass('hidden');
|
||||
$('#assignedTo').next('.picker').removeClass('hidden');
|
||||
$('.team-group').addClass('hidden');
|
||||
$('.modeBox').addClass('hidden');
|
||||
$('#estimate').attr('readonly', false);
|
||||
}
|
||||
$('#dataPlanGroup').fixInputGroup();
|
||||
|
||||
+65
-7
@@ -82,17 +82,29 @@ $(document).ready(function()
|
||||
if(checked)
|
||||
{
|
||||
$('#teamTr').removeClass('hidden');
|
||||
$('.modeBox').removeClass('hidden');
|
||||
$('#mode').removeAttr('disabled').trigger('chosen:updated');
|
||||
$('#parent').val('');
|
||||
$('#parent').trigger('chosen:updated');
|
||||
$('#parent').closest('tr').addClass('hidden');
|
||||
$('#estimate').attr('disabled', 'disabled');
|
||||
$('#left').attr('disabled', 'disabled');
|
||||
|
||||
var mode = $('#mode').val();
|
||||
if((mode == 'linear' && currentUser != oldAssignedTo) || !team[currentUser]) $('[name=assignedTo]').attr('disabled', 'disabled').trigger('chosen:updated');
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#teamTr').addClass('hidden');
|
||||
$('.modeBox').addClass('hidden');
|
||||
$('#mode').attr('disabled', 'disabled').trigger('chosen:updated');
|
||||
$('#parent').closest('tr').removeClass('hidden');
|
||||
$('#estimate').removeAttr('disabled');
|
||||
$('#left').removeAttr('disabled');
|
||||
$('[name=assignedTo]').removeAttr('disabled').trigger('chosen:updated');
|
||||
}
|
||||
|
||||
updateAssignedTo();
|
||||
});
|
||||
|
||||
/* Init task team manage dialog */
|
||||
@@ -156,11 +168,11 @@ $('#confirmButton').click(function()
|
||||
if(i <= j) return;
|
||||
if(value == $(this).val()) $(this).closest('tr').addClass('hidden');
|
||||
})
|
||||
})
|
||||
});
|
||||
|
||||
$('select[name^=team]').closest('tr.hidden').remove();
|
||||
|
||||
var memberCount = '';
|
||||
var assignedTo = '';
|
||||
var totalEstimate = 0;
|
||||
var totalConsumed = oldConsumed;
|
||||
var totalLeft = 0;
|
||||
@@ -168,9 +180,6 @@ $('#confirmButton').click(function()
|
||||
{
|
||||
if($(this).find('option:selected').text() == '') return;
|
||||
|
||||
var account = $(this).find('option:selected').val();
|
||||
var realName = $(this).find('option:selected').text();
|
||||
assignedTo += "<option value='" + account + "' title='" + realName + "'>" + realName + "</option>";
|
||||
memberCount++;
|
||||
|
||||
estimate = parseFloat($(this).parents('td').next('td').find('[name^=teamEstimate]').val());
|
||||
@@ -185,8 +194,7 @@ $('#confirmButton').click(function()
|
||||
$('#estimate').val(totalEstimate);
|
||||
$('#consumedSpan').html(totalConsumed);
|
||||
$('#left').val(totalLeft);
|
||||
$('#assignedTo').html(assignedTo);
|
||||
$('#assignedTo').trigger('chosen:updated');
|
||||
updateAssignedTo();
|
||||
|
||||
if(memberCount < 2)
|
||||
{
|
||||
@@ -200,3 +208,53 @@ $('#confirmButton').click(function()
|
||||
}
|
||||
$('.close').click();
|
||||
});
|
||||
|
||||
/**
|
||||
* Update assignedTo.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function updateAssignedTo()
|
||||
{
|
||||
var html = '';
|
||||
var multiple = $('#multiple').prop('checked');
|
||||
var assignedTo = $('#assignedTo').val();
|
||||
if(multiple)
|
||||
{
|
||||
var isTeamMember = false;
|
||||
var mode = $('#mode').val();
|
||||
$('select[name^=team]').each(function()
|
||||
{
|
||||
if($(this).find('option:selected').text() == '') return;
|
||||
if($(this).val() == currentUser) isTeamMember = true;
|
||||
|
||||
var account = $(this).find('option:selected').val();
|
||||
var realName = $(this).find('option:selected').text();
|
||||
var selected = account == assignedTo ? 'selected' : '';
|
||||
|
||||
html += "<option value='" + account + "' title='" + realName + "'" + selected + ">" + realName + "</option>";
|
||||
|
||||
});
|
||||
|
||||
if(mode == 'multi' && isTeamMember)
|
||||
{
|
||||
$('[name=assignedTo]').removeAttr('disabled').trigger('chosen:updated');
|
||||
}
|
||||
else
|
||||
{
|
||||
if(currentUser != oldAssignedTo || !isTeamMember) $('[name=assignedTo]').attr('disabled', 'disabled').trigger('chosen:updated');
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for(key in members)
|
||||
{
|
||||
var selected = key == assignedTo ? 'selected' : '';
|
||||
html += "<option value='" + key + "' title='" + members[key] + "'" + selected + ">" + members[key] + "</option>";
|
||||
}
|
||||
}
|
||||
|
||||
$('#assignedTo').html(html);
|
||||
$('#assignedTo').trigger('chosen:updated');
|
||||
}
|
||||
|
||||
@@ -68,6 +68,7 @@ $lang->task->color = 'Color';
|
||||
$lang->task->name = 'Name';
|
||||
$lang->task->type = 'Typ';
|
||||
$lang->task->typeAB = 'Typ';
|
||||
$lang->task->mode = 'Mode';
|
||||
$lang->task->pri = 'Priorität';
|
||||
$lang->task->mailto = 'Mail an';
|
||||
$lang->task->estimate = 'Geplant(h)';
|
||||
@@ -131,6 +132,7 @@ $lang->task->parentAB = 'Hauptaufgabe';
|
||||
$lang->task->lblPri = 'P';
|
||||
$lang->task->lblHour = '(h)';
|
||||
$lang->task->lblTestStory = 'Story Tested';
|
||||
$lang->task->teamMember = 'Team Member';
|
||||
|
||||
$lang->task->ditto = 'Dito';
|
||||
$lang->task->dittoNotice = "Diese Aufgabe gehört nicht zum %s wie die Vorherige!";
|
||||
@@ -172,6 +174,9 @@ $lang->task->reasonList[''] = '';
|
||||
$lang->task->reasonList['done'] = 'Erledigt';
|
||||
$lang->task->reasonList['cancel'] = 'Abgebrochen';
|
||||
|
||||
$lang->task->modeList['linear'] = 'Serial';
|
||||
$lang->task->modeList['multi'] = 'Parallel';
|
||||
|
||||
$lang->task->afterChoices['continueAdding'] = ' Weitere Aufgaben erfassen';
|
||||
$lang->task->afterChoices['toTaskList'] = 'Zurück zur Aufgabenliste';
|
||||
$lang->task->afterChoices['toStoryList'] = 'Zurück zur Storyliste';
|
||||
|
||||
@@ -72,6 +72,7 @@ $lang->task->color = 'Color';
|
||||
$lang->task->name = 'Name';
|
||||
$lang->task->type = 'Type';
|
||||
$lang->task->typeAB = 'Type';
|
||||
$lang->task->mode = 'Mode';
|
||||
$lang->task->sync2Gitlab = 'Sync to GitLab';
|
||||
$lang->task->pri = 'Priority';
|
||||
$lang->task->mailto = 'Mailto';
|
||||
@@ -149,6 +150,7 @@ $lang->task->parentAB = 'Parent';
|
||||
$lang->task->lblPri = 'P';
|
||||
$lang->task->lblHour = '(h)';
|
||||
$lang->task->lblTestStory = 'Story Tested';
|
||||
$lang->task->teamMember = 'Team Member';
|
||||
|
||||
/* Fields of zt_taskestimate. */
|
||||
$lang->task->task = 'Task';
|
||||
@@ -198,6 +200,9 @@ $lang->task->reasonList[''] = '';
|
||||
$lang->task->reasonList['done'] = 'Done';
|
||||
$lang->task->reasonList['cancel'] = 'Cancelled';
|
||||
|
||||
$lang->task->modeList['linear'] = 'Serial';
|
||||
$lang->task->modeList['multi'] = 'Parallel';
|
||||
|
||||
$lang->task->afterChoices['continueAdding'] = ' Continue Adding Tasks';
|
||||
$lang->task->afterChoices['toTaskList'] = 'Go to Task List';
|
||||
$lang->task->afterChoices['toStoryList'] = 'Go to Story List';
|
||||
|
||||
@@ -68,6 +68,7 @@ $lang->task->color = 'Couleur';
|
||||
$lang->task->name = 'Nom';
|
||||
$lang->task->type = 'Type';
|
||||
$lang->task->typeAB = 'Type';
|
||||
$lang->task->mode = 'Mode';
|
||||
$lang->task->pri = 'Priorité';
|
||||
$lang->task->mailto = 'Mailto';
|
||||
$lang->task->estimate = 'Estimés';
|
||||
@@ -131,6 +132,7 @@ $lang->task->parentAB = 'Parent';
|
||||
$lang->task->lblPri = 'P';
|
||||
$lang->task->lblHour = '(h)';
|
||||
$lang->task->lblTestStory = 'Story Testée';
|
||||
$lang->task->teamMember = 'Team Member';
|
||||
|
||||
$lang->task->ditto = 'Idem';
|
||||
$lang->task->dittoNotice = "Cette Tâche n'est pas associée au %s comme la précédente peut l'être !";
|
||||
@@ -172,6 +174,9 @@ $lang->task->reasonList[''] = '';
|
||||
$lang->task->reasonList['done'] = 'Fait';
|
||||
$lang->task->reasonList['cancel'] = 'Annulé';
|
||||
|
||||
$lang->task->modeList['linear'] = 'Serial';
|
||||
$lang->task->modeList['multi'] = 'Parallel';
|
||||
|
||||
$lang->task->afterChoices['continueAdding'] = ' Continuer Ajouter Tâches';
|
||||
$lang->task->afterChoices['toTaskList'] = 'Aller à la liste des Tâches';
|
||||
$lang->task->afterChoices['toStoryList'] = 'Aller à la liste des Stories';
|
||||
|
||||
@@ -72,6 +72,7 @@ $lang->task->color = '标题颜色';
|
||||
$lang->task->name = '任务名称';
|
||||
$lang->task->type = '任务类型';
|
||||
$lang->task->typeAB = '类型';
|
||||
$lang->task->mode = '任务模式';
|
||||
$lang->task->sync2Gitlab = '同步到GitLab';
|
||||
$lang->task->pri = '优先级';
|
||||
$lang->task->mailto = '抄送给';
|
||||
@@ -149,6 +150,7 @@ $lang->task->parentAB = '父';
|
||||
$lang->task->lblPri = 'P';
|
||||
$lang->task->lblHour = '(h)';
|
||||
$lang->task->lblTestStory = "测试{$lang->SRCommon}";
|
||||
$lang->task->teamMember = '团队成员';
|
||||
|
||||
/* Fields of zt_taskestimate. */
|
||||
$lang->task->task = '任务';
|
||||
@@ -198,6 +200,9 @@ $lang->task->reasonList[''] = '';
|
||||
$lang->task->reasonList['done'] = '已完成';
|
||||
$lang->task->reasonList['cancel'] = '已取消';
|
||||
|
||||
$lang->task->modeList['linear'] = '串行';
|
||||
$lang->task->modeList['multi'] = '并行';
|
||||
|
||||
$lang->task->afterChoices['continueAdding'] = "继续为该{$lang->SRCommon}添加任务";
|
||||
$lang->task->afterChoices['toTaskList'] = '返回任务列表';
|
||||
$lang->task->afterChoices['toStoryList'] = "返回{$lang->SRCommon}列表";
|
||||
|
||||
+12
-1
@@ -133,6 +133,7 @@ class taskModel extends model
|
||||
|
||||
/* Fix Bug #2466 */
|
||||
if($this->post->multiple) $task->assignedTo = '';
|
||||
if(!$this->post->multiple or count(array_filter($this->post->team)) < 1) $task->mode = '';
|
||||
$this->dao->insert(TABLE_TASK)->data($task, $skip = 'gitlab,gitlabProject')
|
||||
->autoCheck()
|
||||
->batchCheck($requiredFields, 'notempty')
|
||||
@@ -895,6 +896,12 @@ class taskModel extends model
|
||||
return false;
|
||||
}
|
||||
|
||||
/* If a multiple task is assigned to a team member who is not the task, assign to the team member instead. */
|
||||
if(!$this->post->assignedTo and !empty($_POST['team']) and !in_array($oldTask->assignedTo, $this->post->team))
|
||||
{
|
||||
$_POST['assignedTo'] = reset($_POST['team']);
|
||||
}
|
||||
|
||||
/* When the selected parent task is a common task and has consumption, select other parent tasks. */
|
||||
if($this->post->parent > 0)
|
||||
{
|
||||
@@ -942,7 +949,7 @@ class taskModel extends model
|
||||
|
||||
->setIF($oldTask->name != $this->post->name || $oldTask->estStarted != $this->post->estStarted || $oldTask->deadline != $this->post->deadline, 'version', $oldTask->version + 1)
|
||||
|
||||
->setDefault('lastEditedBy', $this->app->user->account)
|
||||
->setDefault('lastEditedBy', $this->app->user->account)
|
||||
->add('lastEditedDate', $now)
|
||||
->stripTags($this->config->task->editor->edit['id'], $this->config->allowedTags)
|
||||
->cleanINT('execution,story,module')
|
||||
@@ -1007,6 +1014,10 @@ class taskModel extends model
|
||||
$task->assignedTo = key($teams);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$task->mode = '';
|
||||
}
|
||||
|
||||
$executionType = $this->dao->select('*')->from(TABLE_PROJECT)->where('id')->eq($task->execution)->fetch('type');
|
||||
$requiredFields = "," . $this->config->task->edit->requiredFields . ",";
|
||||
|
||||
@@ -14,11 +14,15 @@
|
||||
<?php include '../../common/view/kindeditor.html.php';?>
|
||||
<div id='mainContent' class='main-content'>
|
||||
<div class='center-block'>
|
||||
<?php if(!empty($task->team) && $task->assignedTo != $this->app->user->account):?>
|
||||
<?php if(!empty($task->team) and (!isset($task->team[$app->user->account]) or ($task->assignedTo != $app->user->account and $task->mode == 'linear'))):?>
|
||||
<div class="alert with-icon">
|
||||
<i class="icon-exclamation-sign"></i>
|
||||
<div class="content">
|
||||
<?php if($task->assignedTo != $app->user->account and $task->mode == 'linear'):?>
|
||||
<p><?php echo sprintf($lang->task->deniedNotice, '<strong>' . $task->assignedToRealName . '</strong>', $lang->task->transfer);?></p>
|
||||
<?php else:?>
|
||||
<p><?php echo sprintf($lang->task->deniedNotice, '<strong>' . $lang->task->teamMember . '</strong>', $lang->task->transfer);?></p>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
</div>
|
||||
<?php else:?>
|
||||
|
||||
@@ -87,7 +87,7 @@ js::set('dittoNotice', $dittoNotice);
|
||||
}
|
||||
?>
|
||||
<tr>
|
||||
<?php $disableAssignedTo = (isset($teams[$taskID]) and $tasks[$taskID]->assignedTo != $this->app->user->account) ? "disabled='disabled'" : '';?>
|
||||
<?php $disableAssignedTo = (isset($teams[$taskID]) and (($tasks[$taskID]->assignedTo != $this->app->user->account and $tasks[$taskID]->mode == 'linear') or !isset($teams[$taskID][$app->user->account]))) ? "disabled='disabled'" : '';?>
|
||||
<?php $disableHour = (isset($teams[$taskID]) or $tasks[$taskID]->parent < 0) ? "disabled='disabled'" : '';?>
|
||||
<?php
|
||||
$members = array('' => '', 'ditto' => $this->lang->task->ditto);
|
||||
|
||||
@@ -77,6 +77,10 @@
|
||||
<button id='selectAllUser' type="button" class="btn btn-link<?php if($task->type !== 'affair') echo ' hidden';?>"><?php echo $lang->task->selectAllUser;?></button>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class='hidden modeBox'>
|
||||
<th><?php echo $lang->task->mode;?></th>
|
||||
<td><?php echo html::select('mode', $lang->task->modeList, '', "class='form-control chosen'");?></td>
|
||||
</tr>
|
||||
<?php if($execution->type == 'kanban'):?>
|
||||
<tr>
|
||||
<th><?php echo $lang->kanbancard->region;?></th>
|
||||
|
||||
@@ -19,6 +19,9 @@
|
||||
<?php js::set('oldExecutionID', $task->execution);?>
|
||||
<?php js::set('oldConsumed', $task->consumed);?>
|
||||
<?php js::set('taskStatus', $task->status);?>
|
||||
<?php js::set('currentUser', $app->user->account);?>
|
||||
<?php js::set('team', $task->team);?>
|
||||
<?php js::set('members', $members);?>
|
||||
<?php js::set('confirmChangeExecution', $lang->task->confirmChangeExecution);?>
|
||||
<?php js::set('changeExecutionConfirmed', false);?>
|
||||
<?php js::set('newRowCount', count($task->team) < 6 ? 6 - count($task->team) : 1);?>
|
||||
@@ -127,7 +130,7 @@
|
||||
<?php endif;?>
|
||||
<tr>
|
||||
<th><?php echo $lang->task->assignedTo;?></th>
|
||||
<?php $disableAssignedTo = (!empty($task->team) and $task->assignedTo != $this->app->user->account) ? "disabled='disabled'" :'';?>
|
||||
<?php $disableAssignedTo = (!empty($task->team) and (($task->assignedTo != $this->app->user->account and $task->mode == 'linear') or !isset($task->team[$app->user->account]))) ? "disabled='disabled'" :'';?>
|
||||
<?php
|
||||
$taskMembers = array();
|
||||
if(!empty($task->team))
|
||||
@@ -146,6 +149,11 @@
|
||||
?>
|
||||
<td><span id="assignedToIdBox"><?php echo html::select('assignedTo', $taskMembers, $task->assignedTo, "class='form-control chosen' {$disableAssignedTo}");?></span></td>
|
||||
</tr>
|
||||
<tr class="modeBox <?php echo $task->mode ? '' : 'hidden';?>">
|
||||
<th><?php echo $lang->task->mode;?></th>
|
||||
<?php $disabledMode = isset($task->team[$app->user->account]) ? '' : "disabled='disabled'"?>
|
||||
<td><?php echo html::select('mode', $lang->task->modeList, $task->mode, "class='form-control chosen' $disabledMode onchange='updateAssignedTo()'");?></td>
|
||||
</tr>
|
||||
<tr class='<?php echo empty($task->team) ? 'hidden' : ''?>' id='teamTr'>
|
||||
<th><?php echo $lang->task->team;?></th>
|
||||
<td><?php echo html::a('#modalTeam', $lang->task->team, '', "class='form-control btn' data-toggle='modal'");?></td>
|
||||
|
||||
@@ -15,11 +15,15 @@
|
||||
<?php include '../../common/view/datepicker.html.php';?>
|
||||
<div id='mainContent' class='main-content'>
|
||||
<div class='center-block'>
|
||||
<?php if(!empty($task->team) && $task->assignedTo != $this->app->user->account):?>
|
||||
<?php if(!empty($task->team) and (!isset($task->team[$app->user->account]) or ($task->assignedTo != $app->user->account and $task->mode == 'linear'))):?>
|
||||
<div class="alert with-icon">
|
||||
<i class="icon-exclamation-sign"></i>
|
||||
<div class="content">
|
||||
<?php if($task->assignedTo != $app->user->account and $task->mode == 'linear'):?>
|
||||
<p><?php echo sprintf($lang->task->deniedNotice, '<strong>' . $task->assignedToRealName . '</strong>', $lang->task->finish);?></p>
|
||||
<?php else:?>
|
||||
<p><?php echo sprintf($lang->task->deniedNotice, '<strong>' . $lang->task->teamMember . '</strong>', $lang->task->finish);?></p>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
</div>
|
||||
<?php else:?>
|
||||
|
||||
@@ -14,11 +14,15 @@
|
||||
<?php include '../../common/view/kindeditor.html.php';?>
|
||||
<div id='mainContent' class='main-content'>
|
||||
<div class='center-block'>
|
||||
<?php if(!empty($task->team) && $task->assignedTo != $this->app->user->account):?>
|
||||
<?php if(!empty($task->team) and (!isset($task->team[$app->user->account]) or ($task->assignedTo != $app->user->account and $task->mode == 'linear'))):?>
|
||||
<div class="alert with-icon">
|
||||
<i class="icon-exclamation-sign"></i>
|
||||
<div class="content">
|
||||
<?php if($task->assignedTo != $app->user->account and $task->mode == 'linear'):?>
|
||||
<p><?php echo sprintf($lang->task->deniedNotice, '<strong>' . $task->assignedToRealName . '</strong>', $lang->task->pause);?></p>
|
||||
<?php else:?>
|
||||
<p><?php echo sprintf($lang->task->deniedNotice, '<strong>' . $lang->task->teamMember . '</strong>', $lang->task->pause);?></p>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
</div>
|
||||
<?php else:?>
|
||||
|
||||
@@ -71,14 +71,18 @@
|
||||
<?php endif;?>
|
||||
<?php endforeach;?>
|
||||
<?php endif;?>
|
||||
<?php if(!empty($task->team) && $task->assignedTo != $this->app->user->account):?>
|
||||
<?php if(!empty($task->team) and (!isset($task->team[$app->user->account]) or ($task->assignedTo != $app->user->account and $task->mode == 'linear'))):?>
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
<div class="alert with-icon">
|
||||
<i class="icon-exclamation-sign"></i>
|
||||
<div class="content">
|
||||
<?php if($task->assignedTo != $app->user->account and $task->mode == 'linear'):?>
|
||||
<p><?php echo sprintf($lang->task->deniedNotice, '<strong>' . $task->assignedToRealName . '</strong>', $lang->task->logEfforts);?></p>
|
||||
<?php else:?>
|
||||
<p><?php echo sprintf($lang->task->deniedNotice, '<strong>' . $lang->task->teamMember . '</strong>', $lang->task->logEfforts);?></p>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
</div>
|
||||
<?php else:?>
|
||||
|
||||
@@ -18,12 +18,16 @@
|
||||
<div id='mainContent' class='main-content'>
|
||||
<?php
|
||||
/* IF it is multi-task, the suspened can only be restarted by the current user who it is assigned to. */
|
||||
if(!empty($task->team) && $task->assignedTo != $this->app->user->account):
|
||||
if(!empty($task->team) and (!isset($task->team[$app->user->account]) or ($task->assignedTo != $app->user->account and $task->mode == 'linear'))):
|
||||
?>
|
||||
<div class="alert with-icon">
|
||||
<i class="icon-exclamation-sign"></i>
|
||||
<div class="content">
|
||||
<?php if($task->assignedTo != $app->user->account and $task->mode == 'linear'):?>
|
||||
<p><?php echo sprintf($lang->task->deniedNotice, '<strong>' . $task->assignedToRealName . '</strong>', $lang->task->start);?></p>
|
||||
<?php else:?>
|
||||
<p><?php echo sprintf($lang->task->deniedNotice, '<strong>' . $lang->task->teamMember . '</strong>', $lang->task->start);?></p>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
</div>
|
||||
<?php else:?>
|
||||
|
||||
@@ -268,6 +268,12 @@
|
||||
<th><?php echo $lang->task->assignedTo;?></th>
|
||||
<td><?php echo $task->assignedTo ? $task->assignedToRealName . $lang->at . $task->assignedDate : $lang->noData;?></td>
|
||||
</tr>
|
||||
<?php if($task->mode):?>
|
||||
<tr>
|
||||
<th><?php echo $lang->task->mode;?></th>
|
||||
<td><?php echo zget($lang->task->modeList, $task->mode);?></td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<tr>
|
||||
<th><?php echo $lang->task->type;?></th>
|
||||
<td><?php echo $lang->task->typeList[$task->type];?></td>
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
</thead>
|
||||
<?php foreach($lang->bug->priList as $key => $value):?>
|
||||
<tr class='text-center'>
|
||||
<td class='chart-color c-icon'><i class="chart-color-dot pri-<?php echo $key;?>"></i> <?php echo $key == 0 ? $lang->null : $value;?></td>
|
||||
<td class='chart-color c-icon'><i class="chart-color-dot pri-<?php echo $key;?>"></i> <?php echo $key == 0 ? $lang->null : $value;?></td>
|
||||
<td class='chart-value'><?php echo $infoValue[$key]['generated'];?></td>
|
||||
<td class='chart-value'><?php echo $infoValue[$key]['legacy'];?></td>
|
||||
<td class='chart-value'><?php echo $infoValue[$key]['resolved'];?></td>
|
||||
@@ -202,6 +202,7 @@
|
||||
<?php js::set('bugStageGroups', $bugInfo['bugStageGroups']);?>
|
||||
<?php js::set('bugHandleGroups', $bugInfo['bugHandleGroups']);?>
|
||||
<?php js::set('dateGroups', !empty($bugInfo['bugHandleGroups']) ? array_keys($bugInfo['bugHandleGroups']['generated']) : '');?>
|
||||
<?php js::set('priColorList', $config->bug->colorList->pri);?>
|
||||
<script>
|
||||
var priList = [];
|
||||
var stageList = [];
|
||||
@@ -209,16 +210,16 @@ var colorList = ['#d5d9df', '#d50000', '#ff9800', '#2098ee', '#009688'];
|
||||
var colorKey = 0;
|
||||
for(var key in bugPriList)
|
||||
{
|
||||
$('.pri-' + key).css('background', colorList[colorKey]);
|
||||
var currentColor = colorKey <= 7 ? priColorList[colorKey] : '#C0C0C0';
|
||||
$('.pri-' + key).css('background', currentColor);
|
||||
var priName = key == 0 ? zeroPri : bugPriList[key];
|
||||
var pri = {
|
||||
label: priName,
|
||||
color: colorList[colorKey],
|
||||
color: currentColor,
|
||||
data: [bugStageGroups[key]['generated'], bugStageGroups[key]['legacy'], bugStageGroups[key]['resolved']]
|
||||
}
|
||||
priList.push(pri);
|
||||
colorKey++;
|
||||
if(colorKey >= 5) colorKey -= 5;
|
||||
}
|
||||
var data = {
|
||||
labels: bugStageValueList,
|
||||
|
||||
Reference in New Issue
Block a user