Merge branch 'master' of https://gitlab.zcorp.cc/easycorp/zentaopms
This commit is contained in:
@@ -1 +1,2 @@
|
||||
#whiteListBox .input-group:last-child {margin-top: 10px;}
|
||||
#mainContent .main-header h2 {width: 90%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;}
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
.main-col .doc-title .version .dropdown-menu a:hover {color: #ffffff;}
|
||||
.main-col .doc-title .actions a {margin-right: 8px;}
|
||||
.main-col .doc-title .actions i {font-size: 15px; color: #8c8c8c;}
|
||||
#content .title {max-width: 54%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;}
|
||||
#mainContent .scrollbar-hover {max-height: 2000px; overflow: scroll;}
|
||||
#sidebar {width: 275px;}
|
||||
#sidebar>.cell {width: 100%;}
|
||||
|
||||
@@ -2092,7 +2092,10 @@ class docModel extends model
|
||||
if($startModule) $startModulePath = $startModule->path . '%';
|
||||
}
|
||||
|
||||
$docs = $this->dao->select('*')->from(TABLE_DOC)->where('lib')->eq($rootID)->andWhere('deleted')->eq(0)->fetchAll();
|
||||
$docs = $this->dao->select('*')->from(TABLE_DOC)
|
||||
->where('lib')->eq($rootID)
|
||||
->andWhere('deleted')->eq(0)
|
||||
->fetchAll();
|
||||
$moduleDocs = array();
|
||||
foreach($docs as $doc)
|
||||
{
|
||||
|
||||
@@ -11,7 +11,7 @@ $sessionString .= session_name() . '=' . session_id();
|
||||
<div class="cell" id="content">
|
||||
<div class="detail no-padding">
|
||||
<div class="detail-title no-padding doc-title">
|
||||
<div class="title"><?php echo $doc->title;?></div>
|
||||
<div class="title" title="<?php echo $doc->title;?>"><?php echo $doc->title;?></div>
|
||||
<div class="info">
|
||||
<div class="version">
|
||||
<div class='btn-group'>
|
||||
|
||||
@@ -37,12 +37,12 @@ if(empty($type)) $type = 'product';
|
||||
$canManageMenu = common::hasPriv('tree', 'browse');
|
||||
$canEditLib = common::hasPriv('doc', 'editLib');
|
||||
$canDeleteLib = common::hasPriv('doc', 'deleteLib');
|
||||
if($type != 'book' and ($canManageMenu or $canEditLib or $canDeleteLib))
|
||||
if($type != 'book' and ($canManageMenu or $canEditLib or $canDeleteLib) and !empty($libs))
|
||||
{
|
||||
echo "<div class='menu-actions'>";
|
||||
echo html::a('javascript:;', "<i class='icon icon-ellipsis-v'></i>", '', "data-toggle='dropdown' class='btn btn-link'");
|
||||
echo "<ul class='dropdown-menu pull-left'>";
|
||||
if($canManageMenu and !empty($libs))
|
||||
if($canManageMenu)
|
||||
{
|
||||
echo '<li>' . html::a($this->createLink('tree', 'browse', "rootID=$libID&view=doc", '', true), '<i class="icon-cog-outline"></i> ' . $this->lang->doc->manageType, '', "class='iframe'") . '</li>';
|
||||
echo "<li class='divider'></li>";
|
||||
|
||||
@@ -3355,7 +3355,7 @@ class executionModel extends model
|
||||
$days = count($dateList) - 1;
|
||||
$rate = $days ? $firstTime / $days : '';
|
||||
$baselineJSON = '[';
|
||||
foreach($dateList as $i => $date) $baselineJSON .= round(($days - $i) * (int)$rate, 1) . ',';
|
||||
foreach($dateList as $i => $date) $baselineJSON .= round(($days - $i) * $rate, 1) . ',';
|
||||
$baselineJSON = rtrim($baselineJSON, ',') . ']';
|
||||
|
||||
$chartData['labels'] = $this->report->convertFormat($dateList, DT_DATE5);
|
||||
|
||||
@@ -171,7 +171,7 @@ class file extends control
|
||||
$zipPath = $this->file->savePath . $zipName;
|
||||
if (!file_exists($zipName))
|
||||
{
|
||||
if($zip->open($zipPath, ZipArchive::OVERWRITE | ZipArchive::OVERWRITE) == true)
|
||||
if($zip->open($zipPath, ZipArchive::OVERWRITE) == true)
|
||||
{
|
||||
foreach($files as $file)
|
||||
{
|
||||
@@ -179,11 +179,12 @@ class file extends control
|
||||
}
|
||||
|
||||
$zip->close();
|
||||
|
||||
$this->sendDownHeader($zipName, 'zip', $zipPath, 'file');
|
||||
}
|
||||
else
|
||||
{
|
||||
die(js::locate('Create failed!'));
|
||||
die(js::error('Create failed!'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -332,7 +332,8 @@ class project extends control
|
||||
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $this->createLink('programplan', 'create', "projectID=$projectID", '', '', $projectID)));
|
||||
}
|
||||
|
||||
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $this->createLink('project', 'browse', "programID=0&browseType=all", '', '', $projectID)));
|
||||
$parent = isset($_POST['parent']) ? $_POST['parent'] : 0;
|
||||
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $this->createLink('project', 'browse', "programID=$parent&browseType=all", '', '', $projectID)));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
th.c-budget,{text-align:right;}
|
||||
td.c-actions {overflow: visible;}
|
||||
.c-actions .btn {overflow: visible;}
|
||||
#programBox {float: left; margin-right: 10px;}
|
||||
#programBox {float: left; margin-right: 10px; width: 170px !important;}
|
||||
#programID_chosen div.chosen-drop.chosen-auto-max-width.in {width: 150px !important;}
|
||||
#switchButton {background: #fff !important;}
|
||||
.panel-actions {position: relative; padding: 0 0;}
|
||||
|
||||
@@ -49,7 +49,7 @@ $lang->project->searchByName = 'Enter the project name to search';
|
||||
$lang->project->linkedProducts = "Linked {$lang->productCommon}s";
|
||||
$lang->project->unlinkedProducts = "Unlinked {$lang->productCommon}s";
|
||||
$lang->project->testreport = 'Testreport';
|
||||
$lang->project->selectProgram = 'Select Program';
|
||||
$lang->project->selectProgram = 'Program filtering';
|
||||
|
||||
/* Fields. */
|
||||
$lang->project->common = 'Program';
|
||||
|
||||
@@ -51,7 +51,7 @@ $lang->project->linkedProducts = "Linked {$lang->productCommon}s";
|
||||
$lang->project->unlinkedProducts = "Unlinked {$lang->productCommon}s";
|
||||
$lang->project->testreport = 'Test Report';
|
||||
$lang->project->testreport = 'Testreport';
|
||||
$lang->project->selectProgram = 'Select Program';
|
||||
$lang->project->selectProgram = 'Program filtering';
|
||||
|
||||
/* Fields. */
|
||||
$lang->project->common = 'Project';
|
||||
|
||||
@@ -49,7 +49,7 @@ $lang->project->searchByName = 'Enter the project name to retrieve';
|
||||
$lang->project->linkedProducts = "Linked {$lang->productCommon}s";
|
||||
$lang->project->unlinkedProducts = "Unlinked {$lang->productCommon}s";
|
||||
$lang->project->testreport = 'Testreport';
|
||||
$lang->project->selectProgram = 'Select Program';
|
||||
$lang->project->selectProgram = 'Program filtering';
|
||||
|
||||
/* Fields. */
|
||||
$lang->project->common = 'Project';
|
||||
|
||||
@@ -49,7 +49,7 @@ $lang->project->searchByName = 'Enter the project name to retrieve';
|
||||
$lang->project->linkedProducts = "Linked {$lang->productCommon}s";
|
||||
$lang->project->unlinkedProducts = "Unlinked {$lang->productCommon}s";
|
||||
$lang->project->testreport = 'Testreport';
|
||||
$lang->project->selectProgram = 'Select Program';
|
||||
$lang->project->selectProgram = 'Program filtering';
|
||||
|
||||
/* Fields. */
|
||||
$lang->project->common = 'Project';
|
||||
|
||||
@@ -50,7 +50,7 @@ $lang->project->deleted = '已删除';
|
||||
$lang->project->linkedProducts = '已关联';
|
||||
$lang->project->unlinkedProducts = '未关联';
|
||||
$lang->project->testreport = '测试报告';
|
||||
$lang->project->selectProgram = '筛选项目集';
|
||||
$lang->project->selectProgram = '项目集筛选';
|
||||
|
||||
/* Fields. */
|
||||
$lang->project->common = '项目';
|
||||
|
||||
@@ -363,6 +363,7 @@ class projectModel extends model
|
||||
ROUND(SUM(`left`), 2) AS totalLeft')
|
||||
->from(TABLE_TASK)
|
||||
->where('execution')->in(array_keys($executions))
|
||||
->andWhere('project')->eq($projectID)
|
||||
->andWhere('deleted')->eq(0)
|
||||
->andWhere('parent')->lt(1)
|
||||
->fetch();
|
||||
@@ -376,6 +377,7 @@ class projectModel extends model
|
||||
|
||||
$closedTotalLeft = $this->dao->select('ROUND(SUM(`left`), 2) AS totalLeft')->from(TABLE_TASK)
|
||||
->where('execution')->in(array_keys($executions))
|
||||
->andWhere('project')->eq($projectID)
|
||||
->andWhere('deleted')->eq(0)
|
||||
->andWhere('parent')->lt(1)
|
||||
->andWhere('status')->in('closed,cancel')
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
?>
|
||||
<div id="mainMenu" class="clearfix table-row">
|
||||
<div class="btn-toolBar pull-left">
|
||||
<div class="input-control space w-150px" id='programBox'><?php echo html::select('programID', $programs, $programID, "onchange=changeProgram(this.value) class='form-control chosen' data-placeholder='{$lang->project->selectProgram}'");?></div>
|
||||
<div class="input-control w-150px" id='programBox'><?php echo html::select('programID', $programs, $programID, "onchange=changeProgram(this.value) class='form-control chosen' data-placeholder='{$lang->project->selectProgram}'");?></div>
|
||||
<?php foreach($lang->project->featureBar as $key => $label):?>
|
||||
<?php $active = $browseType == $key ? 'btn-active-text' : '';?>
|
||||
<?php $label = "<span class='text'>$label</span>";?>
|
||||
@@ -35,113 +35,112 @@
|
||||
<?php endif;?>
|
||||
</div>
|
||||
</div>
|
||||
<div class='row cell' id='cards'>
|
||||
<?php if(empty($projectStats)):?>
|
||||
<div class="table-empty-tip">
|
||||
<p>
|
||||
<span class="text-muted"><?php echo $lang->project->empty;?></span>
|
||||
<?php if(isset($this->config->maxVersion)):?>
|
||||
<?php common::printLink('project', 'createGuide', "programID=$programID", '<i class="icon icon-plus"></i>' . $lang->project->create, '', 'class="btn btn-info" data-toggle="modal" data-target="#guideDialog"');?>
|
||||
<?php elseif($this->config->systemMode == 'new'):?>
|
||||
<?php common::printLink('project', 'create', 'mode=scrum', '<i class="icon icon-plus"></i>' . $lang->project->create, '', 'class="btn btn-info"');?>
|
||||
<?php else:?>
|
||||
<?php common::printLink('execution', 'create', '', '<i class="icon icon-plus"></i>' . $lang->execution->create, '', 'class="btn btn-info"');?>
|
||||
<?php endif;?>
|
||||
</p>
|
||||
</div>
|
||||
<?php else:?>
|
||||
<?php foreach ($projectStats as $projectID => $project):?>
|
||||
<div class='col' data-id='<?php echo $projectID?>'>
|
||||
<div class='panel'>
|
||||
<div class='projectStatus'>
|
||||
<?php $status = ($project->status == 'doing' and isset($project->delay)) ? 'delay' : $project->status;?>
|
||||
<span class="label label-<?php echo $status;?>"><?php echo $lang->project->statusList[$status];?></span>
|
||||
</div>
|
||||
<div class='panel-heading'>
|
||||
<?php if(isset($config->maxVersion) and $project->model === 'waterfall'):?>
|
||||
<span class='project-type-label label label-warning label-outline'><i class='icon icon-waterfall'></i></span>
|
||||
<?php elseif(isset($config->maxVersion)):?>
|
||||
<span class='project-type-label label label-info label-outline'><i class='icon icon-sprint'></i></span>
|
||||
<div id='mainContent'>
|
||||
<div class='row cell' id='cards'>
|
||||
<?php if(empty($projectStats)):?>
|
||||
<div class="table-empty-tip">
|
||||
<p>
|
||||
<span class="text-muted"><?php echo $lang->project->empty;?></span>
|
||||
<?php if(isset($this->config->maxVersion)):?>
|
||||
<?php common::printLink('project', 'createGuide', "programID=$programID", '<i class="icon icon-plus"></i>' . $lang->project->create, '', 'class="btn btn-info" data-toggle="modal" data-target="#guideDialog"');?>
|
||||
<?php elseif($this->config->systemMode == 'new'):?>
|
||||
<?php common::printLink('project', 'create', 'mode=scrum', '<i class="icon icon-plus"></i>' . $lang->project->create, '', 'class="btn btn-info"');?>
|
||||
<?php else:?>
|
||||
<?php common::printLink('execution', 'create', '', '<i class="icon icon-plus"></i>' . $lang->execution->create, '', 'class="btn btn-info"');?>
|
||||
<?php endif;?>
|
||||
<strong class='project-name' title='<?php echo $project->name;?>'><?php echo html::a(helper::createLink('project', 'index', "projectID=$projectID"), $project->name);?></strong>
|
||||
</div>
|
||||
<div class='panel-body'>
|
||||
<div class='project-infos'>
|
||||
<?php
|
||||
$projectBudget = in_array($app->getClientLang(), ['zh-cn','zh-tw']) ? round((float)$project->budget / 10000, 2) . $lang->project->tenThousand : round((float)$project->budget, 2);
|
||||
$budgetTitle = $project->budget != 0 ? zget($lang->project->currencySymbol, $project->budgetUnit) . ' ' . $projectBudget : $lang->project->budget . $lang->project->future;
|
||||
$project->end = $project->end == LONG_TIME ? $this->lang->project->longTime : $project->end;
|
||||
$project->date = str_replace('-', '.', $project->begin) . ' - ' . str_replace('-', '.', $project->end);
|
||||
?>
|
||||
<span title="<?php echo $budgetTitle;?>" class='label label-outline'><?php echo $budgetTitle;?></span>
|
||||
<span title="<?php echo $project->date;?>" class="label label-outline <?php echo $status == 'delay' ? 'text-red' : '';?>"><?php echo $project->date;?></span>
|
||||
</p>
|
||||
</div>
|
||||
<?php else:?>
|
||||
<?php foreach ($projectStats as $projectID => $project):?>
|
||||
<div class='col' data-id='<?php echo $projectID?>'>
|
||||
<div class='panel'>
|
||||
<div class='projectStatus'>
|
||||
<?php $status = ($project->status == 'doing' and isset($project->delay)) ? 'delay' : $project->status;?>
|
||||
<span class="label label-<?php echo $status;?>"><?php echo $lang->project->statusList[$status];?></span>
|
||||
</div>
|
||||
<div class='project-detail'>
|
||||
<div class='row'>
|
||||
<div class='col-xs-2'>
|
||||
<div class='progress-pie' data-doughnut-size='90' data-color='#00da88' data-value="<?php echo $project->hours->progress?>" data-width='24' data-height='24' data-back-color='#e8edf3'>
|
||||
<div class='progress-info'><?php echo $project->hours->progress;?></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='col-xs-4'>
|
||||
<span><?php echo $lang->project->leftTasks;?></span>
|
||||
<span title="<?php echo $project->leftTasks;?>"><?php echo $project->leftTasks;?></span>
|
||||
</div>
|
||||
<div class='col-xs-4'>
|
||||
<span><?php echo $lang->project->leftHours;?></span>
|
||||
<span title="<?php echo empty($project->hours->totalLeft) ? '—' : $project->hours->totalLeft . $lang->execution->workHour;?>"><?php echo empty($project->hours->totalLeft) ? '—' : $project->hours->totalLeft . $lang->execution->workHourUnit;?></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='project-footer table-row'>
|
||||
<div class='project-members table-col'>
|
||||
<?php if(!empty($project->teamMembers)):?>
|
||||
<a href='<?php echo helper::createLink('project', 'manageMembers', "projectID=$projectID");?>'>
|
||||
<?php foreach($project->teamMembers as $key => $member):?>
|
||||
<?php if($key > 4) continue;?>
|
||||
<div class='avatar bg-secondary avatar-circle'>
|
||||
<?php echo !empty(zget($usersAvatar, $member, '')) ? html::image(zget($usersAvatar, $member)) : strtoupper($member[0]);?>
|
||||
</div>
|
||||
<?php endforeach;?>
|
||||
</a>
|
||||
<?php if($project->teamCount > 5):?>
|
||||
<div class='moreMembers'><?php echo html::a(helper::createLink('project', 'manageMembers', "projectID=$projectID"), '+' . ($project->teamCount - 5));?></div>
|
||||
<?php endif;?>
|
||||
<div class='panel-heading'>
|
||||
<?php if(isset($config->maxVersion) and $project->model === 'waterfall'):?>
|
||||
<span class='project-type-label label label-warning label-outline'><i class='icon icon-waterfall'></i></span>
|
||||
<?php elseif(isset($config->maxVersion)):?>
|
||||
<span class='project-type-label label label-info label-outline'><i class='icon icon-sprint'></i></span>
|
||||
<?php endif;?>
|
||||
<strong class='project-name' title='<?php echo $project->name;?>'><?php echo html::a(helper::createLink('project', 'index', "projectID=$projectID"), $project->name);?></strong>
|
||||
</div>
|
||||
<div class='panel-body'>
|
||||
<div class='project-infos'>
|
||||
<?php
|
||||
$projectBudget = in_array($app->getClientLang(), ['zh-cn','zh-tw']) ? round((float)$project->budget / 10000, 2) . $lang->project->tenThousand : round((float)$project->budget, 2);
|
||||
$budgetTitle = $project->budget != 0 ? zget($lang->project->currencySymbol, $project->budgetUnit) . ' ' . $projectBudget : $lang->project->budget . $lang->project->future;
|
||||
$project->end = $project->end == LONG_TIME ? $this->lang->project->longTime : $project->end;
|
||||
$project->date = str_replace('-', '.', $project->begin) . ' - ' . str_replace('-', '.', $project->end);
|
||||
?>
|
||||
<span title="<?php echo $budgetTitle;?>" class='label label-outline'><?php echo $budgetTitle;?></span>
|
||||
<span title="<?php echo $project->date;?>" class="label label-outline <?php echo $status == 'delay' ? 'text-red' : '';?>"><?php echo $project->date;?></span>
|
||||
</div>
|
||||
<div class='project-actions table-col'>
|
||||
<div class='menu-actions'>
|
||||
<?php
|
||||
if($project->status == 'wait' || $project->status == 'suspended') common::printIcon('project', 'start', "projectID=$project->id", $project, 'list', 'play', '', 'iframe btn-action', true);
|
||||
if($project->status == 'doing') common::printIcon('project', 'close', "projectID=$project->id", $project, 'list', 'off', '', 'iframe btn-action', true);
|
||||
if($project->status == 'closed') common::printIcon('project', 'activate', "projectID=$project->id", $project, 'list', 'magic', '', 'iframe btn-action', true);
|
||||
?>
|
||||
<?php $canActions = (common::hasPriv('project','suspend') || (common::hasPriv('project','close') && $project->status != 'doing') || (common::hasPriv('project','activate') && $project->status != 'closed'));?>
|
||||
<?php if($canActions):?>
|
||||
<?php echo html::a('javascript:;', "<i class='icon icon-ellipsis-v'></i>", '', "data-toggle='dropdown' class='btn btn-link'");?>
|
||||
<ul class='dropdown-menu pull-right'>
|
||||
<?php
|
||||
common::printIcon('project', 'suspend', "projectID=$project->id", $project, 'list', 'pause', '', 'iframe btn-action', true);
|
||||
if($project->status != 'doing') common::printIcon('project', 'close', "projectID=$project->id", $project, 'list', 'off', '', 'iframe btn-action', true);
|
||||
if($project->status != 'closed') common::printIcon('project', 'activate', "projectID=$project->id", $project, 'list', 'magic', '', 'iframe btn-action', true);
|
||||
?>
|
||||
</ul>
|
||||
<div class='project-detail'>
|
||||
<div class='row'>
|
||||
<div class='col-xs-2'>
|
||||
<div class='progress-pie' data-doughnut-size='90' data-color='#00da88' data-value="<?php echo $project->hours->progress?>" data-width='24' data-height='24' data-back-color='#e8edf3'>
|
||||
<div class='progress-info'><?php echo $project->hours->progress;?></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='col-xs-4'>
|
||||
<span><?php echo $lang->project->leftTasks;?></span>
|
||||
<span title="<?php echo $project->leftTasks;?>"><?php echo $project->leftTasks;?></span>
|
||||
</div>
|
||||
<div class='col-xs-4'>
|
||||
<span><?php echo $lang->project->leftHours;?></span>
|
||||
<span title="<?php echo empty($project->hours->totalLeft) ? '—' : $project->hours->totalLeft . $lang->execution->workHour;?>"><?php echo empty($project->hours->totalLeft) ? '—' : $project->hours->totalLeft . $lang->execution->workHourUnit;?></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='project-footer table-row'>
|
||||
<div class='project-members table-col'>
|
||||
<?php if(!empty($project->teamMembers)):?>
|
||||
<a href='<?php echo helper::createLink('project', 'manageMembers', "projectID=$projectID");?>'>
|
||||
<?php foreach($project->teamMembers as $key => $member):?>
|
||||
<?php if($key > 4) continue;?>
|
||||
<div class='avatar bg-secondary avatar-circle'>
|
||||
<?php echo !empty(zget($usersAvatar, $member, '')) ? html::image(zget($usersAvatar, $member)) : strtoupper($member[0]);?>
|
||||
</div>
|
||||
<?php endforeach;?>
|
||||
</a>
|
||||
<?php if($project->teamCount > 5):?>
|
||||
<div class='moreMembers'><?php echo html::a(helper::createLink('project', 'manageMembers', "projectID=$projectID"), '+' . ($project->teamCount - 5));?></div>
|
||||
<?php endif;?>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
<div class='project-actions table-col'>
|
||||
<div class='menu-actions'>
|
||||
<?php
|
||||
if($project->status == 'wait' || $project->status == 'suspended') common::printIcon('project', 'start', "projectID=$project->id", $project, 'list', 'play', '', 'iframe btn-action', true);
|
||||
if($project->status == 'doing') common::printIcon('project', 'close', "projectID=$project->id", $project, 'list', 'off', '', 'iframe btn-action', true);
|
||||
if($project->status == 'closed') common::printIcon('project', 'activate', "projectID=$project->id", $project, 'list', 'magic', '', 'iframe btn-action', true);
|
||||
?>
|
||||
<?php $canActions = (common::hasPriv('project','suspend') || (common::hasPriv('project','close') && $project->status != 'doing') || (common::hasPriv('project','activate') && $project->status != 'closed'));?>
|
||||
<?php if($canActions):?>
|
||||
<?php echo html::a('javascript:;', "<i class='icon icon-ellipsis-v'></i>", '', "data-toggle='dropdown' class='btn btn-link'");?>
|
||||
<ul class='dropdown-menu pull-right'>
|
||||
<?php
|
||||
common::printIcon('project', 'suspend', "projectID=$project->id", $project, 'list', 'pause', '', 'iframe btn-action', true);
|
||||
if($project->status != 'doing') common::printIcon('project', 'close', "projectID=$project->id", $project, 'list', 'off', '', 'iframe btn-action', true);
|
||||
if($project->status != 'closed') common::printIcon('project', 'activate', "projectID=$project->id", $project, 'list', 'magic', '', 'iframe btn-action', true);
|
||||
?>
|
||||
</ul>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach;?>
|
||||
<?php endif;?>
|
||||
<div class='col-xs-12' id='cardsFooter'>
|
||||
<?php $pager->show('right', 'pagerjs');?>
|
||||
<?php endforeach;?>
|
||||
<div class='col-xs-12' id='cardsFooter'>
|
||||
<?php $pager->show('right', 'pagerjs');?>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
</div>
|
||||
<style>
|
||||
#mainMenu {padding-left: 10px; padding-right: 10px; margin-bottom: -10px;}
|
||||
</style>
|
||||
<script>
|
||||
$('.progress-pie:visible').progressPie();
|
||||
</script>
|
||||
|
||||
@@ -49,6 +49,7 @@
|
||||
<td class='text-left c-actions'>
|
||||
<?php
|
||||
common::printIcon('repo', 'edit', "repoID=$repo->id&objectID=$objectID", '', 'list', 'edit');
|
||||
if(strtolower($repo->SCM) == "gitlab") common::printIcon('gitlab', 'importIssue', "repo={$repo->id}", '', 'list', 'link');
|
||||
if(common::hasPriv('repo', 'delete')) echo html::a($this->createLink('repo', 'delete', "repoID=$repo->id&objectID=$objectID"), '<i class="icon-trash"></i>', 'hiddenwin', "title='{$lang->repo->delete}' class='btn'");
|
||||
?>
|
||||
</td>
|
||||
|
||||
@@ -4,7 +4,7 @@ $config->story = new stdclass();
|
||||
$config->story->batchCreate = 10;
|
||||
$config->story->affectedFixedNum = 7;
|
||||
$config->story->needReview = 1;
|
||||
$config->story->removeFields = 'objectTypeList,productList,executionList,gitlabID,gitlabProjectID,execution';
|
||||
$config->story->removeFields = 'objectTypeList,productList,executionList,execution';
|
||||
|
||||
$config->story->batchClose = new stdclass();
|
||||
$config->story->batchClose->columns = 10;
|
||||
|
||||
@@ -295,12 +295,6 @@ class story extends control
|
||||
$this->view->customFields = $customFields;
|
||||
$this->view->showFields = $this->config->story->custom->createFields;
|
||||
|
||||
$this->loadModel('gitlab');
|
||||
$allGitlabs = $this->gitlab->getPairs();
|
||||
$executionID = $objectID;
|
||||
$gitlabProjects = $this->gitlab->getProjectsByExecution($executionID);
|
||||
foreach($allGitlabs as $id => $name) if($id and !isset($gitlabProjects[$id])) unset($allGitlabs[$id]);
|
||||
|
||||
$this->view->title = $product->name . $this->lang->colon . $this->lang->story->create;
|
||||
$this->view->position[] = html::a($this->createLink('product', 'browse', "product=$productID&branch=$branch"), $product->name);
|
||||
$this->view->position[] = $this->lang->story->common;
|
||||
@@ -330,8 +324,6 @@ class story extends control
|
||||
$this->view->URS = $type == 'story' ? $this->story->getRequierements($productID) : '';
|
||||
$this->view->needReview = ($this->app->user->account == $product->PO || $objectID > 0 || $this->config->story->needReview == 0) ? "checked='checked'" : "";
|
||||
$this->view->type = $type;
|
||||
$this->view->gitlabList = $allGitlabs;
|
||||
$this->view->gitlabProjects = $gitlabProjects;
|
||||
|
||||
$this->display();
|
||||
}
|
||||
@@ -991,11 +983,6 @@ class story extends control
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Delete related issue in gitlab. */
|
||||
$this->loadModel('gitlab');
|
||||
$relation = $this->gitlab->getRelationByObject('story', $storyID);
|
||||
if(!empty($relation)) $this->gitlab->deleteIssue('story', $storyID, $relation->issueID);
|
||||
|
||||
$this->story->delete(TABLE_STORY, $storyID);
|
||||
if($story->parent > 0)
|
||||
{
|
||||
|
||||
@@ -34,22 +34,3 @@ function refreshPlan()
|
||||
$(window).unload(function(){
|
||||
if(blockID) window.parent.refreshBlock($('#block' + blockID));
|
||||
});
|
||||
|
||||
$(document).ready(function()
|
||||
{
|
||||
$('#gitlab').change(function()
|
||||
{
|
||||
host = $('#gitlab').val();
|
||||
if(host == '') return false;
|
||||
projects = '';
|
||||
$.each(gitlabProjects[host], function(id, obj){projects = projects + ',' + obj.gitlabProject});
|
||||
url = createLink('repo', 'ajaxgetgitlabprojects', "host=" + host + "&projects=" + projects);
|
||||
|
||||
$.get(url, function(response)
|
||||
{
|
||||
$('#gitlabProject').html('').append(response);
|
||||
$('#gitlabProject').chosen().trigger("chosen:updated");;
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
@@ -406,4 +406,3 @@ $lang->story->categoryList['experience'] = 'Experience';
|
||||
$lang->story->categoryList['improve'] = 'Improve';
|
||||
$lang->story->categoryList['other'] = 'Other';
|
||||
|
||||
$lang->story->sync2Gitlab = 'Mit Gitlab synchronisieren';
|
||||
|
||||
@@ -407,4 +407,3 @@ $lang->story->categoryList['experience'] = 'Experience';
|
||||
$lang->story->categoryList['improve'] = 'Improve';
|
||||
$lang->story->categoryList['other'] = 'Other';
|
||||
|
||||
$lang->story->sync2Gitlab = 'Mit Gitlab synchronisieren';
|
||||
|
||||
@@ -406,4 +406,3 @@ $lang->story->categoryList['experience'] = 'Experience';
|
||||
$lang->story->categoryList['improve'] = 'Improve';
|
||||
$lang->story->categoryList['other'] = 'Other';
|
||||
|
||||
$lang->story->sync2Gitlab = 'Synchroniser avec Gitlab';
|
||||
|
||||
@@ -406,4 +406,3 @@ $lang->story->categoryList['experience'] = 'Experience';
|
||||
$lang->story->categoryList['improve'] = 'Improve';
|
||||
$lang->story->categoryList['other'] = 'Other';
|
||||
|
||||
$lang->story->sync2Gitlab = 'Đồng bộ hóa với Gitlab';
|
||||
|
||||
@@ -407,4 +407,3 @@ $lang->story->categoryList['experience'] = '体验';
|
||||
$lang->story->categoryList['improve'] = '改进';
|
||||
$lang->story->categoryList['other'] = '其他';
|
||||
|
||||
$lang->story->sync2Gitlab = '同步到Gitlab';
|
||||
|
||||
@@ -407,4 +407,3 @@ $lang->story->categoryList['experience'] = '體驗';
|
||||
$lang->story->categoryList['improve'] = '改進';
|
||||
$lang->story->categoryList['other'] = '其他';
|
||||
|
||||
$lang->story->sync2Gitlab = '同步到Gitlab';
|
||||
|
||||
+3
-63
@@ -234,7 +234,7 @@ class storyModel extends model
|
||||
|
||||
$requiredFields = trim($requiredFields, ',');
|
||||
|
||||
$this->dao->insert(TABLE_STORY)->data($story, 'spec,verify,gitlab,gitlabProject')->autoCheck()->batchCheck($requiredFields, 'notempty')->exec();
|
||||
$this->dao->insert(TABLE_STORY)->data($story, 'spec,verify')->autoCheck()->batchCheck($requiredFields, 'notempty')->exec();
|
||||
if(!dao::isError())
|
||||
{
|
||||
$storyID = $this->dao->lastInsertID();
|
||||
@@ -340,10 +340,6 @@ class storyModel extends model
|
||||
/* Callback the callable method to process the related data for object that is transfered to story. */
|
||||
if($from && is_callable(array($this, $this->config->story->fromObjects[$from]['callback']))) call_user_func(array($this, $this->config->story->fromObjects[$from]['callback']), $storyID);
|
||||
|
||||
/* push this story to gitlab issue */
|
||||
$object = $this->getByID($storyID);
|
||||
$this->loadModel('gitlab')->apiCreateIssue($this->post->gitlab, $this->post->gitlabProject, 'story', $storyID, $object);
|
||||
|
||||
return array('status' => 'created', 'id' => $storyID);
|
||||
}
|
||||
return false;
|
||||
@@ -380,7 +376,7 @@ class storyModel extends model
|
||||
$data->spec = $story->spec;
|
||||
$data->verify = $story->spec;
|
||||
$this->dao->insert(TABLE_STORYSPEC)->data($data)->exec();
|
||||
|
||||
|
||||
/* Link story to execution. */
|
||||
$this->linkStory($executionID, $story->product, $storyID);
|
||||
|
||||
@@ -699,11 +695,6 @@ class storyModel extends model
|
||||
|
||||
$this->file->updateObjectID($this->post->uid, $storyID, 'story');
|
||||
|
||||
/* update story to gitlab issue. */
|
||||
$this->loadModel('gitlab');
|
||||
$relation = $this->gitlab->getRelationByObject('story', $storyID);
|
||||
if($relation) $this->gitlab->apiUpdateIssue($relation->gitlabID, $relation->projectID, $relation->issueID, 'story', $story, $storyID);
|
||||
|
||||
return common::createChanges($oldStory, $story);
|
||||
}
|
||||
}
|
||||
@@ -883,11 +874,6 @@ class storyModel extends model
|
||||
}
|
||||
}
|
||||
|
||||
/* update story to gitlab issue. */
|
||||
$this->loadModel('gitlab');
|
||||
$relation = $this->gitlab->getRelationByObject('story', $storyID);
|
||||
if($relation) $this->gitlab->apiUpdateIssue($relation->gitlabID, $relation->projectID, $relation->issueID, 'story', $story, $storyID);
|
||||
|
||||
unset($oldStory->parent);
|
||||
unset($story->parent);
|
||||
return common::createChanges($oldStory, $story);
|
||||
@@ -1218,11 +1204,6 @@ class storyModel extends model
|
||||
/* Update story sort of plan when story plan has changed. */
|
||||
if($oldStory->plan != $story->plan) $this->updateStoryOrderOfPlan($storyID, $story->plan, $oldStory->plan);
|
||||
|
||||
/* update story to gitlab issue. */
|
||||
$this->loadModel('gitlab');
|
||||
$relation = $this->gitlab->getRelationByObject('story', $storyID);
|
||||
if(!empty($relation)) $this->gitlab->apiUpdateIssue($relation->gitlabID, $relation->projectID, $relation->issueID, 'story', $story, $storyID);
|
||||
|
||||
$this->executeHooks($storyID);
|
||||
if($story->type == 'story') $this->batchChangeStage(array($storyID), $story->stage);
|
||||
if($story->closedReason == 'done') $this->loadModel('score')->create('story', 'close');
|
||||
@@ -1488,15 +1469,6 @@ class storyModel extends model
|
||||
->checkIF($story->closedReason == 'duplicate', 'duplicateStory', 'notempty')
|
||||
->where('id')->eq($storyID)->exec();
|
||||
|
||||
$this->loadModel('gitlab');
|
||||
$relation = $this->gitlab->getRelationByObject('story', $storyID);
|
||||
|
||||
if(!empty($relation))
|
||||
{
|
||||
$currentIssue = $this->gitlab->apiGetSingleIssue($relation->gitlabID, $relation->projectID, $relation->issueID);
|
||||
if($currentIssue->state != 'closed') $this->gitlab->apiUpdateIssue($relation->gitlabID, $relation->projectID, $relation->issueID, 'story', $story, $storyID);
|
||||
}
|
||||
|
||||
/* Update parent story status. */
|
||||
if($oldStory->parent > 0) $this->updateParentStatus($storyID, $oldStory->parent);
|
||||
$this->setStage($storyID);
|
||||
@@ -1563,14 +1535,6 @@ class storyModel extends model
|
||||
if($oldStory->parent > 0) $this->updateParentStatus($storyID, $oldStory->parent);
|
||||
$this->setStage($storyID);
|
||||
$allChanges[$storyID] = common::createChanges($oldStory, $story);
|
||||
|
||||
$this->loadModel('gitlab');
|
||||
$relation = $this->gitlab->getRelationByObject('story', $storyID);
|
||||
if(!empty($relation))
|
||||
{
|
||||
$currentIssue = $this->gitlab->apiGetSingleIssue($relation->gitlabID, $relation->projectID, $relation->issueID);
|
||||
if($currentIssue->state != 'closed') $this->gitlab->apiUpdateIssue($relation->gitlabID, $relation->projectID, $relation->issueID, 'story', $story, $storyID);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1847,14 +1811,7 @@ class storyModel extends model
|
||||
$story->assignedDate = $now;
|
||||
|
||||
$this->dao->update(TABLE_STORY)->data($story)->autoCheck()->where('id')->eq((int)$storyID)->exec();
|
||||
if(!dao::isError())
|
||||
{
|
||||
$this->loadModel('gitlab');
|
||||
$relation = $this->gitlab->getRelationByObject('story', $storyID);
|
||||
$story->assignee_id = $this->gitlab->getGitlabUserID($relation->gitlabID, $story->assignedTo);
|
||||
if($story->assignee_id != '') $this->gitlab->apiUpdateIssue($relation->gitlabID, $relation->projectID, $relation->issueID, 'story', $story, $storyID);
|
||||
return common::createChanges($oldStory, $story);
|
||||
}
|
||||
if(!dao::isError()) return common::createChanges($oldStory, $story);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1883,18 +1840,6 @@ class storyModel extends model
|
||||
$story->assignedDate = $now;
|
||||
|
||||
$this->dao->update(TABLE_STORY)->data($story)->autoCheck()->where('id')->eq((int)$storyID)->exec();
|
||||
if(!dao::isError())
|
||||
{
|
||||
$this->loadModel('gitlab');
|
||||
$relation = $this->gitlab->getRelationByObject('story', $storyID);
|
||||
$story->assignee_id = $this->gitlab->getGitlabUserID($relation->gitlabID, $story->assignedTo);
|
||||
if($story->assignee_id != '') $this->gitlab->apiUpdateIssue($relation->gitlabID, $relation->projectID, $relation->issueID, 'story', $story, $storyID);
|
||||
|
||||
/* Push this story to gitlab issue. */
|
||||
$this->loadModel('gitlab');
|
||||
$relation = $this->gitlab->getRelationByObject('story', $storyID);
|
||||
if(!empty($relation)) $this->gitlab->apiUpdateIssue($relation->gitlabID, $relation->projectID, $relation->issueID, 'story', $story, $storyID);
|
||||
}
|
||||
}
|
||||
return $allChanges;
|
||||
}
|
||||
@@ -1929,11 +1874,6 @@ class storyModel extends model
|
||||
/* Update parent story status. */
|
||||
if($oldStory->parent > 0) $this->updateParentStatus($storyID, $oldStory->parent);
|
||||
|
||||
/* Push this story to gitlab issue. */
|
||||
$this->loadModel('gitlab');
|
||||
$relation = $this->gitlab->getRelationByObject('story', $storyID);
|
||||
if(!empty($relation)) $this->gitlab->apiUpdateIssue($relation->gitlabID, $relation->projectID, $relation->issueID, 'story', $story, $storyID);
|
||||
|
||||
return common::createChanges($oldStory, $story);
|
||||
}
|
||||
|
||||
|
||||
@@ -217,11 +217,6 @@ class task extends control
|
||||
foreach(explode(',', $this->config->task->customCreateFields) as $field) $customFields[$field] = $this->lang->task->$field;
|
||||
if($execution->type == 'ops') unset($customFields['story']);
|
||||
|
||||
$this->loadModel('gitlab');
|
||||
$allGitlabs = $this->gitlab->getPairs();
|
||||
$gitlabProjects = $this->gitlab->getProjectsByExecution($executionID);
|
||||
foreach($allGitlabs as $id => $name) if($id and !isset($gitlabProjects[$id])) unset($allGitlabs[$id]);
|
||||
|
||||
$this->view->customFields = $customFields;
|
||||
$this->view->showFields = $this->config->task->custom->createFields;
|
||||
$this->view->showAllModule = $showAllModule;
|
||||
@@ -237,8 +232,6 @@ class task extends control
|
||||
$this->view->members = $members;
|
||||
$this->view->blockID = $blockID;
|
||||
$this->view->moduleOptionMenu = $moduleOptionMenu;
|
||||
$this->view->gitlabList = $allGitlabs;
|
||||
$this->view->gitlabProjects = $gitlabProjects;
|
||||
|
||||
$this->display();
|
||||
}
|
||||
@@ -1299,11 +1292,6 @@ class task extends control
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Delete related issue in gitlab. */
|
||||
$this->loadModel('gitlab');
|
||||
$relation = $this->gitlab->getRelationByObject('task', $taskID);
|
||||
if(!empty($relation)) $this->gitlab->deleteIssue('task', $taskID, $relation->issueID);
|
||||
|
||||
$this->task->delete(TABLE_TASK, $taskID);
|
||||
if($task->parent > 0)
|
||||
{
|
||||
|
||||
@@ -479,23 +479,6 @@ $(document).ready(function()
|
||||
$('#moduleIdBox #module').val(moduleID).attr('onchange', "setStories(this.value, " + executionID + ")").chosen();
|
||||
});
|
||||
});
|
||||
|
||||
$('#gitlab').change(function()
|
||||
{
|
||||
host = $('#gitlab').val();
|
||||
if(host == '') return false;
|
||||
projects = '';
|
||||
$.each(gitlabProjects[host], function(id, obj){projects = projects + ',' + obj.gitlabProject});
|
||||
url = createLink('repo', 'ajaxgetgitlabprojects', "host=" + host + "&projects=" + projects);
|
||||
|
||||
$.get(url, function(response)
|
||||
{
|
||||
$('#gitlabProject').html('').append(response);
|
||||
$('#gitlabProject').chosen().trigger("chosen:updated");;
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
$(document).on('click', '#testStory_chosen,#story_chosen', function()
|
||||
|
||||
+2
-60
@@ -121,10 +121,6 @@ class taskModel extends model
|
||||
|
||||
$taskID = $this->dao->lastInsertID();
|
||||
|
||||
/* Sync this task to gitlab issue. */
|
||||
$object = $this->getByID($taskID);
|
||||
$this->loadModel('gitlab')->apiCreateIssue($this->post->gitlab, $this->post->gitlabProject, 'task', $taskID, $object);
|
||||
|
||||
/* Mark design version.*/
|
||||
if(isset($task->design) && !empty($task->design))
|
||||
{
|
||||
@@ -385,10 +381,6 @@ class taskModel extends model
|
||||
|
||||
$taskID = $this->dao->lastInsertID();
|
||||
|
||||
/* Sync this task to gitlab issue. */
|
||||
$object = $this->getByID($taskID);
|
||||
$this->loadModel('gitlab')->apiCreateIssue($this->post->gitlab, $this->post->gitlabProject,'task', $taskID, $object);
|
||||
|
||||
$taskSpec = new stdClass();
|
||||
$taskSpec->task = $taskID;
|
||||
$taskSpec->version = $task->version;
|
||||
@@ -981,11 +973,6 @@ class taskModel extends model
|
||||
->batchCheckIF($task->closedReason == 'cancel', 'finishedBy, finishedDate', 'empty')
|
||||
->where('id')->eq((int)$taskID)->exec();
|
||||
|
||||
/* update task to gitlab issue. */
|
||||
$this->loadModel('gitlab');
|
||||
$relation = $this->gitlab->getRelationByObject('task', $taskID);
|
||||
if(!empty($relation)) $this->gitlab->apiUpdateIssue($relation->gitlabID, $relation->projectID, $relation->issueID, 'task', $task, $taskID);
|
||||
|
||||
if(!dao::isError())
|
||||
{
|
||||
/* Mark design version.*/
|
||||
@@ -1220,15 +1207,6 @@ class taskModel extends model
|
||||
$tasks[$taskID] = $task;
|
||||
}
|
||||
|
||||
$this->loadModel('gitlab');
|
||||
$issues = $this->gitlab->getIssueListByObjects('task', $taskID);
|
||||
foreach($tasks as $taskID => $task)
|
||||
{
|
||||
$issue = zget($issues, $taskID, 0);
|
||||
if(!$issue) continue;
|
||||
$this->gitlab->apiUpdateIssue($issue->gitlabID, $issue->projectID, $issue->issueID, $task);
|
||||
}
|
||||
|
||||
/* Check field not empty. */
|
||||
foreach($tasks as $taskID => $task)
|
||||
{
|
||||
@@ -1298,11 +1276,6 @@ class taskModel extends model
|
||||
if($task->status == 'done') $this->loadModel('score')->create('task', 'finish', $taskID);
|
||||
if($task->status == 'closed') $this->loadModel('score')->create('task', 'close', $taskID);
|
||||
$allChanges[$taskID] = common::createChanges($oldTask, $task);
|
||||
|
||||
/* Update task to gitlab issue. */
|
||||
$this->loadModel('gitlab');
|
||||
$relation = $this->gitlab->getRelationByObject('task', $taskID);
|
||||
if(!empty($relation)) $this->gitlab->apiUpdateIssue($relation->gitlabID, $relation->projectID, $relation->issueID, 'task', $task, $taskID);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1387,11 +1360,8 @@ class taskModel extends model
|
||||
->data($task)
|
||||
->autoCheck()
|
||||
->check('left', 'float')
|
||||
->where('id')->eq($taskID)->exec();
|
||||
|
||||
$task = $this->getById($taskID);
|
||||
$relation = $this->loadModel('gitlab')->getRelationByObject('task', $taskID);
|
||||
if(!empty($relation)) $this->gitlab->apiUpdateIssue($relation->gitlabID, $relation->projectID, $relation->issueID, 'task', $task, $taskID);
|
||||
->where('id')->eq($taskID)
|
||||
->exec();
|
||||
|
||||
if(!dao::isError()) return common::createChanges($oldTask, $task);
|
||||
}
|
||||
@@ -1728,14 +1698,6 @@ class taskModel extends model
|
||||
->where('id')->eq((int)$taskID)
|
||||
->exec();
|
||||
|
||||
$this->loadModel('gitlab');
|
||||
$relation = $this->gitlab->getRelationByObject('task', $taskID);
|
||||
if(!empty($relation))
|
||||
{
|
||||
$currentIssue = $this->gitlab->apiGetSingleIssue($relation->gitlabID, $relation->projectID, $relation->issueID);
|
||||
if($currentIssue->state != 'closed') $this->gitlab->apiUpdateIssue($relation->gitlabID, $relation->projectID, $relation->issueID, 'task', $task, $taskID);
|
||||
}
|
||||
|
||||
if($oldTask->parent > 0) $this->updateParentStatus($taskID);
|
||||
if($oldTask->story) $this->loadModel('story')->setStage($oldTask->story);
|
||||
if($task->status == 'done' && !dao::isError()) $this->loadModel('score')->create('task', 'finish', $taskID);
|
||||
@@ -1792,14 +1754,6 @@ class taskModel extends model
|
||||
|
||||
$this->dao->update(TABLE_TASK)->data($task)->autoCheck()->where('id')->eq((int)$taskID)->exec();
|
||||
|
||||
$this->loadModel('gitlab');
|
||||
$relation = $this->gitlab->getRelationByObject('task', $taskID);
|
||||
if(!empty($relation))
|
||||
{
|
||||
$currentIssue = $this->gitlab->apiGetSingleIssue($relation->gitlabID, $relation->projectID, $relation->issueID);
|
||||
if($currentIssue->state != 'closed') $this->gitlab->apiUpdateIssue($relation->gitlabID, $relation->projectID, $relation->issueID, 'bug', $task, $taskID);
|
||||
}
|
||||
|
||||
if(!dao::isError())
|
||||
{
|
||||
if($oldTask->parent > 0) $this->updateParentStatus($taskID);
|
||||
@@ -1844,14 +1798,6 @@ class taskModel extends model
|
||||
}
|
||||
if($oldTask->story) $this->loadModel('story')->setStage($oldTask->story);
|
||||
|
||||
$this->loadModel('gitlab');
|
||||
$relation = $this->gitlab->getRelationByObject('task', $taskID);
|
||||
if(!empty($relation))
|
||||
{
|
||||
$currentIssue = $this->gitlab->apiGetSingleIssue($relation->gitlabID, $relation->projectID, $relation->issueID);
|
||||
if($currentIssue->state != 'closed') $this->gitlab->apiUpdateIssue($relation->gitlabID, $relation->projectID, $relation->issueID, 'task', $task, $taskID);
|
||||
}
|
||||
|
||||
if(!dao::isError()) return common::createChanges($oldTask, $task);
|
||||
}
|
||||
|
||||
@@ -1917,10 +1863,6 @@ class taskModel extends model
|
||||
}
|
||||
if($oldTask->story) $this->loadModel('story')->setStage($oldTask->story);
|
||||
|
||||
$this->loadModel('gitlab');
|
||||
$relation = $this->gitlab->getRelationByObject('task', $taskID);
|
||||
if(!empty($relation)) $this->gitlab->apiUpdateIssue($relation->gitlabID, $relation->projectID, $relation->issueID, 'task', $task, $taskID);
|
||||
|
||||
if(!dao::isError()) return common::createChanges($oldTask, $task);
|
||||
}
|
||||
|
||||
|
||||
@@ -396,6 +396,7 @@ class tree extends control
|
||||
{
|
||||
$module = $this->tree->getByID($moduleID);
|
||||
$confirmLang = $this->lang->tree->confirmDelete;
|
||||
if($module->type == 'doc') $confirmLang = $this->lang->tree->confirmDeleteMenu;
|
||||
if($module->type == 'line') $confirmLang = $this->lang->tree->confirmDeleteLine;
|
||||
if($module->type == 'host') $confirmLang = $this->lang->tree->confirmDeleteHost;
|
||||
if($module->type == 'feedback') $confirmLang = $this->lang->tree->confirmDelCategory;
|
||||
|
||||
@@ -37,6 +37,7 @@ $lang->tree->dragAndSort = "Ziehen und Sotieren";
|
||||
$lang->tree->sort = "Sortieren";
|
||||
$lang->tree->addChild = "Hinzufügen";
|
||||
$lang->tree->confirmDelete = 'Do you want to delete this module and its child modules?';
|
||||
$lang->tree->confirmDeleteMenu = 'Do you want to delete this menu and its child menus?';
|
||||
$lang->tree->confirmDelCategory = 'Möchten Sie diese Kategorie und ihre Kinderkategorien löschen?';
|
||||
$lang->tree->confirmDeleteLine = "Do you want to delete this {$lang->productCommon} line?";
|
||||
$lang->tree->confirmRoot = "Any changes to the {$lang->productCommon} will change the stories, bugs, cases of {$lang->productCommon} it belongs to, as well as the linkage of {$lang->executionCommon} and {$lang->productCommon}, which is dangerous. Do you want to change it?";
|
||||
|
||||
@@ -37,6 +37,7 @@ $lang->tree->dragAndSort = "Drag to order";
|
||||
$lang->tree->sort = "Order";
|
||||
$lang->tree->addChild = "Add Child Module";
|
||||
$lang->tree->confirmDelete = 'Do you want to delete this module and its child modules?';
|
||||
$lang->tree->confirmDeleteMenu = 'Do you want to delete this menu and its child menus?';
|
||||
$lang->tree->confirmDelCategory = 'Do you want to delete this category and its child categories?';
|
||||
$lang->tree->confirmDeleteLine = "Do you want to delete this {$lang->productCommon} line?";
|
||||
$lang->tree->confirmRoot = "Any changes to the {$lang->productCommon} will change the stories, bugs, cases of {$lang->productCommon} it belongs to, as well as the linkage of {$lang->executionCommon} and {$lang->productCommon}, which is dangerous. Do you want to change it?";
|
||||
|
||||
@@ -37,6 +37,7 @@ $lang->tree->dragAndSort = "Faites glisser pour ordonner";
|
||||
$lang->tree->sort = "Ordonnez";
|
||||
$lang->tree->addChild = "Ajout Sous-Module";
|
||||
$lang->tree->confirmDelete = 'Voulez-vous supprimer ce module et tous ses sous-modules ?';
|
||||
$lang->tree->confirmDeleteMenu = 'Do you want to delete this menu and its child menus?';
|
||||
$lang->tree->confirmDelCategory = 'Voulez-vous supprimer cette catégorie et ses sous-catégories?';
|
||||
$lang->tree->confirmDeleteLine = 'Voulez-vous supprimer cette ligne de produit ?';
|
||||
$lang->tree->confirmRoot = "Les changements du {$lang->productCommon} vont impacter les stories, bugs, casTests du {$lang->productCommon} auquel ils appartiennent, ainsi que les associations de {$lang->executionCommon} et {$lang->productCommon}, ce qui est dangereux. Voulez-vous malgré tout effectuer le changement ?";
|
||||
|
||||
@@ -37,6 +37,7 @@ $lang->tree->dragAndSort = "Drag để sắp xếp";
|
||||
$lang->tree->sort = "Thứ tự";
|
||||
$lang->tree->addChild = "Thêm Module con";
|
||||
$lang->tree->confirmDelete = 'Bạn có muốn xóa module này và module con của nó?';
|
||||
$lang->tree->confirmDeleteMenu = 'Do you want to delete this menu and its child menus?';
|
||||
$lang->tree->confirmDelCategory = 'Bạn có muốn xoá hạng mục này và loại con của nó không?';
|
||||
$lang->tree->confirmDeleteLine = "Bạn có muốn xóa dòng {$lang->productCommon} này không?";
|
||||
$lang->tree->confirmRoot = "Mọi sự thay đổi tới {$lang->productCommon} này sẽ thay đổi the câu chuyện, bugs, tình huống của {$lang->productCommon} nó sở hữu, cũng như liên kết của {$lang->executionCommon} và {$lang->productCommon}, điều này nguy hiểm. Bạn có muốn thay đổi nó?";
|
||||
|
||||
@@ -37,6 +37,7 @@ $lang->tree->dragAndSort = "拖放排序";
|
||||
$lang->tree->sort = "排序";
|
||||
$lang->tree->addChild = "增加子模块";
|
||||
$lang->tree->confirmDelete = '该模块及其子模块都会被删除,您确定删除吗?';
|
||||
$lang->tree->confirmDeleteMenu = '该目录及其子目录都会被删除,您确定删除吗?';
|
||||
$lang->tree->confirmDelCategory = '该分类及其子分类都会被删除,您确定删除吗?';
|
||||
$lang->tree->confirmDeleteLine = "您确定删除该{$lang->productCommon}线吗?";
|
||||
$lang->tree->confirmRoot = "模块的所属{$lang->productCommon}修改,会关联修改该模块下的{$lang->SRCommon}、Bug、用例的所属{$lang->productCommon},以及{$lang->executionCommon}和{$lang->productCommon}的关联关系。该操作比较危险,请谨慎操作。是否确认修改?";
|
||||
|
||||
Reference in New Issue
Block a user