* Optimize codes when importing issues.
This commit is contained in:
@@ -327,7 +327,7 @@ class gitlab extends control
|
||||
->fetchAll('issueID');
|
||||
$iids = '';
|
||||
foreach($savedIssueIDList as $savedIssueID) $iids = $iids . $savedIssueID->issueID . ',';
|
||||
$options = '¬[iids]=' . trim($iids, ',');
|
||||
$options = '&state=opened¬[iids]=' . trim($iids, ',');
|
||||
$gitlabIssues = $this->gitlab->apiGetIssues($gitlabID, $projectID, $options); //TODO(dingguodong) when no issues here?
|
||||
|
||||
$products = array();
|
||||
@@ -337,6 +337,7 @@ class gitlab extends control
|
||||
$products[$productID] = $this->loadModel("product")->getByID($productID)->name;
|
||||
}
|
||||
|
||||
$this->view->importable = empty($gitlabIssues) ? false : true;
|
||||
$this->view->products = $products;
|
||||
$this->view->gitlabID = $gitlabID;
|
||||
$this->view->gitlabProjectID = $projectID;
|
||||
|
||||
@@ -36,8 +36,9 @@ $lang->gitlab->placeholder->name = '';
|
||||
$lang->gitlab->placeholder->url = "请填写Gitlab Server首页的访问地址,如:https://gitlab.zentao.net。";
|
||||
$lang->gitlab->placeholder->token = "请填写具有admin权限账户的access token";
|
||||
|
||||
$lang->gitlab->tokenError = "当前token非管理员权限。";
|
||||
$lang->gitlab->hostError = "无效的gitlab服务地址。";
|
||||
$lang->gitlab->bindUserError = "不能重复绑定用户 %s";
|
||||
$lang->gitlab->importIssueError = "未选择该议题所属的执行。";
|
||||
$lang->gitlab->importIssueWarn = "存在导入失败的议题,可再次尝试导入。";
|
||||
$lang->gitlab->noImportableIssues = "目前没有可供导入的议题。";
|
||||
$lang->gitlab->tokenError = "当前token非管理员权限。";
|
||||
$lang->gitlab->hostError = "无效的gitlab服务地址。";
|
||||
$lang->gitlab->bindUserError = "不能重复绑定用户 %s";
|
||||
$lang->gitlab->importIssueError = "未选择该议题所属的执行。";
|
||||
$lang->gitlab->importIssueWarn = "存在导入失败的议题,可再次尝试导入。";
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
<div class="main-header">
|
||||
<h2><?php echo $lang->gitlab->importIssue;?></h2>
|
||||
</div>
|
||||
<?php if($importable): ?>
|
||||
<form method='post' class='load-indicator main-form form-ajax' enctype='multipart/form-data'>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-borderless">
|
||||
@@ -46,8 +47,11 @@
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</table>
|
||||
</div>
|
||||
</form>
|
||||
</form>
|
||||
<?php else:?>
|
||||
<?php echo $lang->gitlab->noImportableIssues; ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
Reference in New Issue
Block a user