* Optimize the implementation of jira data import interface.
This commit is contained in:
@@ -152,6 +152,8 @@ $lang->convert->jira->passwordLess = 'Password must not be less than six c
|
||||
$lang->convert->jira->importSuccessfully = 'Done!';
|
||||
$lang->convert->jira->importResult = "Import <strong class='text-red'>%s</strong> data, <strong class='%scount'>%s</strong> pieces of data processed;";
|
||||
$lang->convert->jira->importing = 'Data is being imported, please do not switch to other pages.';
|
||||
$lang->convert->jira->importingAB = 'Data Import';
|
||||
$lang->convert->jira->imported = 'Data Import Complete';
|
||||
|
||||
$lang->convert->jira->zentaoObjectList[''] = '';
|
||||
$lang->convert->jira->zentaoObjectList['task'] = 'Task';
|
||||
|
||||
@@ -152,6 +152,8 @@ $lang->convert->jira->passwordLess = '密码不能少于六位!';
|
||||
$lang->convert->jira->importSuccessfully = 'Jira导入完成!';
|
||||
$lang->convert->jira->importResult = "导入 <strong class='text-red'>%s</strong> 数据, 已处理 <strong class='%scount'>%s</strong> 条记录;";
|
||||
$lang->convert->jira->importing = '数据导入中,请不要切换其它页面';
|
||||
$lang->convert->jira->importingAB = '数据导入中';
|
||||
$lang->convert->jira->imported = '数据导入完成';
|
||||
|
||||
$lang->convert->jira->zentaoObjectList[''] = '';
|
||||
$lang->convert->jira->zentaoObjectList['task'] = '任务';
|
||||
|
||||
@@ -1164,6 +1164,8 @@ class convertModel extends model
|
||||
$comment = $data->actionbody;
|
||||
if(empty($comment)) continue;
|
||||
|
||||
if(!isset($issueObjectType[$issueID])) continue;
|
||||
|
||||
$objectType = $issueObjectType[$issueID];
|
||||
if($objectType == 'task') $objectID = $issueTasks[$issueID];
|
||||
if($objectType == 'bug') $objectID = $issueBugs[$issueID];
|
||||
@@ -1222,6 +1224,8 @@ class convertModel extends model
|
||||
foreach($dataList as $fileAttachment)
|
||||
{
|
||||
$issueID = $fileAttachment->issueid;
|
||||
if(!isset($issueObjectType[$issueID])) continue;
|
||||
|
||||
$objectType = $issueObjectType[$issueID];
|
||||
if($objectType != 'bug' and $objectType != 'task' and $objectType != 'story') continue;
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<div id='mainContent' class='main-content'>
|
||||
<div class='main-header'>
|
||||
<h2><i class='icon-import'></i> <?php echo $lang->convert->jira->importJira;?></h2>
|
||||
<h2 class="importData"><i class='icon-import'></i> <?php echo $lang->convert->jira->importJira;?></h2>
|
||||
</div>
|
||||
<div>
|
||||
<div class='form-group'>
|
||||
@@ -31,12 +31,15 @@ $(document).ready(function()
|
||||
{
|
||||
$('#execButton').hide();
|
||||
$('#resultBox .text-red').removeClass('hidden');
|
||||
$('.importData').html('<?php echo $lang->convert->jira->importingAB;?>');
|
||||
|
||||
$.getJSON($(this).attr('href'), function(response)
|
||||
{
|
||||
if(response.result == 'finished')
|
||||
{
|
||||
$('#resultBox').append("<li class='text-success'>" + response.message + "</li>");
|
||||
$('#resultBox li.text-red').hide();
|
||||
$('.importData').html('<?php echo $lang->convert->jira->imported;?>');
|
||||
return false;
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user