Merge branch ztflow-xieqiyu-feature/doctemplate#xieqiyu of zentao/zentaopms (#7579)
This commit is contained in:
@@ -159,6 +159,12 @@ $config->file->dangers = 'php,php3,php4,phtml,php5,jsp,py,rb,asp,aspx,ashx,a
|
||||
$config->file->allowed = 'txt,doc,docx,dot,wps,wri,pdf,ppt,pptx,xls,xlsx,ett,xlt,xlsm,csv,jpg,jpeg,png,psd,gif,ico,bmp,swf,avi,rmvb,rm,mp3,mp4,3gp,flv,mov,movie,rar,zip,bz,bz2,tar,gz,mpp,rp,pdm,vsdx,vsd,sql,xmind,mm';
|
||||
$config->file->storageType = 'fs'; // fs or s3
|
||||
|
||||
/* 文档多人协同配置。 Document Hocus Pocus. */
|
||||
$config->docHocuspocus = new stdclass();
|
||||
$config->docHocuspocus->enable = false;
|
||||
$config->docHocuspocus->http = 'http://127.0.0.1:1234';
|
||||
$config->docHocuspocus->websocket = 'ws://127.0.0.1:1234';
|
||||
|
||||
/* Upload settings. */
|
||||
$config->allowedTags = '<p><span><h1><h2><h3><h4><h5><em><u><strong><br><ol><ul><li><img><a><b><font><hr><pre><div><table><td><th><tr><tbody><embed><style><s>';
|
||||
$config->accountRule = '|^[a-zA-Z0-9_]{1}[a-zA-Z0-9_\.]{1,}[a-zA-Z0-9_]{1}$|';
|
||||
|
||||
@@ -78,6 +78,7 @@ $filter->productplan = new stdclass();
|
||||
$filter->projectplan = new stdclass();
|
||||
$filter->kanban = new stdclass();
|
||||
$filter->group = new stdclass();
|
||||
$filter->convert = new stdclass();
|
||||
|
||||
$filter->index->index = new stdclass();
|
||||
$filter->block->default = new stdclass();
|
||||
@@ -203,6 +204,7 @@ $filter->group->default = new stdclass();
|
||||
$filter->caselib->default = new stdclass();
|
||||
$filter->requirement->batchchangeparent = new stdclass();
|
||||
$filter->requirement->export = new stdclass();
|
||||
$filter->convert->mapjira2zentao = new stdclass();
|
||||
|
||||
$filter->index->index->get['open'] = 'reg::base64';
|
||||
|
||||
@@ -533,3 +535,6 @@ $filter->bug->ajaxgetproductcases->get['limit'] = 'int';
|
||||
|
||||
$filter->bug->ajaxgetproductbugs->get['search'] = 'reg::any';
|
||||
$filter->bug->ajaxgetproductbugs->get['limit'] = 'int';
|
||||
|
||||
$filter->convert->mapjira2zentao->cookie['stepStatus'] = 'reg::any';
|
||||
$filter->convert->mapjira2zentao->cookie['jiraRelation'] = 'reg::any';
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
ALTER TABLE `zt_workflowgroup` MODIFY `name` varchar(255) NOT NULL DEFAULT '';
|
||||
ALTER TABLE `zt_workflowgroup` ADD COLUMN `exclusive` enum('0','1') NOT NULL DEFAULT '0' AFTER `main`;
|
||||
ALTER TABLE `zt_doclib` ADD COLUMN `archived` enum('0','1') NOT NULL DEFAULT '0';
|
||||
@@ -0,0 +1,5 @@
|
||||
ALTER TABLE `zt_feedback` ADD COLUMN `prevStatus` varchar(30) NOT NULL DEFAULT '' AFTER `subStatus`;
|
||||
ALTER TABLE `zt_feedback` ADD COLUMN `prevAssignedTo` varchar(255) NOT NULL DEFAULT '' AFTER `assignedTo`;
|
||||
|
||||
ALTER TABLE `zt_doc` ADD COLUMN `readGroups` varchar(255) NOT NULL DEFAULT '' AFTER `users`;
|
||||
ALTER TABLE `zt_doc` ADD COLUMN `readUsers` text NULL AFTER `readGroups`;
|
||||
+7
-1
@@ -808,6 +808,8 @@ CREATE TABLE IF NOT EXISTS `zt_doc` (
|
||||
`acl` varchar(10) NOT NULL DEFAULT 'open',
|
||||
`groups` varchar(255) NOT NULL DEFAULT '',
|
||||
`users` text NULL,
|
||||
`readGroups` varchar(255) NOT NULL DEFAULT '',
|
||||
`readUsers` text NULL,
|
||||
`version` smallint(6) unsigned NOT NULL DEFAULT '1',
|
||||
`deleted` enum('0','1') NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`id`)
|
||||
@@ -869,6 +871,7 @@ CREATE TABLE IF NOT EXISTS `zt_doclib` (
|
||||
`addedBy` varchar(30) NOT NULL DEFAULT '',
|
||||
`addedDate` datetime NULL,
|
||||
`deleted` enum('0','1') NOT NULL DEFAULT '0',
|
||||
`archived` enum('0','1') NOT NULL DEFAULT '0',
|
||||
`orderBy` varchar(30) NOT NULL DEFAULT 'id_asc',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
@@ -2629,6 +2632,7 @@ CREATE TABLE IF NOT EXISTS `zt_feedback` (
|
||||
`pri` tinyint unsigned NOT NULL DEFAULT 2,
|
||||
`status` varchar(30) NOT NULL DEFAULT '',
|
||||
`subStatus` varchar(30) NOT NULL default '',
|
||||
`prevStatus` varchar(30) NOT NULL DEFAULT '',
|
||||
`public` enum('0','1') NOT NULL DEFAULT '0',
|
||||
`notify` enum('0','1') NOT NULL DEFAULT '0',
|
||||
`notifyEmail` varchar(100) NOT NULL DEFAULT '',
|
||||
@@ -2648,6 +2652,7 @@ CREATE TABLE IF NOT EXISTS `zt_feedback` (
|
||||
`editedBy` char(30) NOT NULL DEFAULT '',
|
||||
`editedDate` datetime NULL,
|
||||
`assignedTo` varchar(255) NOT NULL DEFAULT '',
|
||||
`prevAssignedTo` varchar(255) NOT NULL DEFAULT '',
|
||||
`assignedDate` datetime NULL,
|
||||
`activatedBy` varchar(30) NOT NULL DEFAULT '',
|
||||
`activatedDate` datetime NULL,
|
||||
@@ -13224,13 +13229,14 @@ CREATE TABLE IF NOT EXISTS `zt_workflowgroup` (
|
||||
`type` varchar(10) NOT NULL DEFAULT '',
|
||||
`projectModel` varchar(10) NOT NULL DEFAULT '',
|
||||
`projectType` varchar(10) NOT NULL DEFAULT '',
|
||||
`name` varchar(30) NOT NULL DEFAULT '',
|
||||
`name` varchar(255) NOT NULL DEFAULT '',
|
||||
`code` varchar(30) NOT NULL DEFAULT '',
|
||||
`desc` text NULL,
|
||||
`disabledModules` varchar(255) NOT NULL DEFAULT '',
|
||||
`status` varchar(10) NOT NULL DEFAULT 'wait',
|
||||
`vision` varchar(10) NOT NULL DEFAULT 'rnd',
|
||||
`main` enum('0','1') NOT NULL DEFAULT '0',
|
||||
`exclusive` enum('0','1') NOT NULL DEFAULT '0',
|
||||
`createdBy` varchar(30) NOT NULL DEFAULT '',
|
||||
`createdDate` datetime NULL,
|
||||
`editedBy` varchar(30) NOT NULL DEFAULT '',
|
||||
|
||||
+101
-13
@@ -333,14 +333,14 @@ function handleSwitchView(mode, location, info)
|
||||
}
|
||||
}
|
||||
|
||||
function showDocBasicModal(docID, isDraft)
|
||||
function showDocBasicModal(docID, isDraft, withTitle = false)
|
||||
{
|
||||
const docApp = getDocApp();
|
||||
const spaceType = docApp.spaceType;
|
||||
const spaceID = docApp.spaceID;
|
||||
const libID = docApp.libID;
|
||||
const moduleID = docApp.moduleID;
|
||||
const url = $.createLink('doc', 'setDocBasic', `objectType=${spaceType}&objectID=${spaceID}&libID=${libID}&moduleID=${moduleID}&docID=${docID || 0}&isDraft=${isDraft ? 'yes' : 'no'}`);
|
||||
const url = $.createLink('doc', 'setDocBasic', `objectType=${spaceType}&objectID=${spaceID}&libID=${libID}&moduleID=${moduleID}&docID=${docID || 0}&isDraft=${isDraft ? 'yes' : 'no'}&withTitle=${withTitle ? 'yes' : 'no'}`);
|
||||
|
||||
console.log('showDocBasicModal', {docBasicModal: {...docBasicModal}, docID});
|
||||
if(docBasicModal.doc === docID && docBasicModal.current)
|
||||
@@ -431,7 +431,7 @@ function removeEmoji(text)
|
||||
* @param {FormData} formData
|
||||
* @returns
|
||||
*/
|
||||
function submitNewDoc(doc, spaceID, libID, moduleID, formData)
|
||||
function submitNewDoc(doc, spaceID, libID, moduleID, formData, afterCreate)
|
||||
{
|
||||
const docApp = getDocApp();
|
||||
|
||||
@@ -487,6 +487,9 @@ function submitNewDoc(doc, spaceID, libID, moduleID, formData)
|
||||
newDoc.space = `${spaceType}.${docData[spaceType]}`;
|
||||
}
|
||||
resolve(newDoc);
|
||||
docApp.load(null, null, null, {noLoading: true, picks: 'doc'}).then(() => {
|
||||
afterCreate?.(newDoc);
|
||||
});
|
||||
}
|
||||
catch (error)
|
||||
{
|
||||
@@ -673,10 +676,24 @@ function renameDocFile(file, doc)
|
||||
});
|
||||
}
|
||||
|
||||
/* Import markdown or json file to editor. */
|
||||
function importFileToEditor(type)
|
||||
async function importContentToEditor(type)
|
||||
{
|
||||
const accept = type === 'markdown' ? '.md' : '.json';
|
||||
const docApp = getDocApp();
|
||||
if(!docApp) return;
|
||||
const editor = docApp.editor.$;
|
||||
if(!editor) return;
|
||||
|
||||
let content = '';
|
||||
if(navigator.clipboard) content = await navigator.clipboard.readText();
|
||||
content = await zui.Modal.prompt({size: 'lg', message: `Import ${type}`, defaultValue: content, placeholder: 'Paste content here...', multiline: true});
|
||||
return getDocApp().importDoc(content, type);
|
||||
}
|
||||
|
||||
/* Import markdown or json file to editor. */
|
||||
function importFileToEditor(type, options)
|
||||
{
|
||||
if(options && options.fromText) return importContentToEditor(type);
|
||||
const accept = type === 'markdown' ? '.md' : (type === 'confluence' ? '.html,.txt' : '.json');
|
||||
return zui.selectFile(accept).then(file => {
|
||||
if(!file) return;
|
||||
zui.readFile(file).then(content => {
|
||||
@@ -742,6 +759,7 @@ const actionsMap =
|
||||
const isApi = isApiDoc(doc);
|
||||
const isTemplate = doc.templateType !== '';
|
||||
const canEditDoc = canModify && hasPriv(isApi ? 'editApi' : 'edit');
|
||||
const isChapter = doc.type === 'chapter';
|
||||
|
||||
/* 侧边栏上的文档操作按钮。Doc actions in sidebar. */
|
||||
if(info.ui === 'sidebar')
|
||||
@@ -749,9 +767,14 @@ const actionsMap =
|
||||
if(!canModify) return [];
|
||||
const moreItems =
|
||||
[
|
||||
canMoveDoc(doc) ? {icon: 'folder-move', text: lang.moveDoc, command: `moveDoc/${doc.id}`} : null,
|
||||
hasPriv('delete') ? {icon: 'trash', text: lang.delete, command: `deleteDoc/${doc.id}`} : null,
|
||||
].filter(item => item !== null);
|
||||
hasPriv('addChapter') ? {icon: 'plus', text: lang.addSubChapter, command: `addChapter/${doc.id}`} : null,
|
||||
hasPriv('addChapter') ? {icon: 'plus', text: lang.addSameChapter, command: `addChapter/${doc.parent}`} : null,
|
||||
hasPriv('create') ? {icon: 'plus', text: lang.addSubDoc, command: `addDoc/${doc.id}`} : null,
|
||||
!isChapter && canMoveDoc(doc) ? {icon: 'folder-move', text: lang.moveDoc, command: `moveDoc/${doc.id}`} : null,
|
||||
!isChapter && hasPriv('delete') ? {icon: 'trash', text: lang.delete, command: `deleteDoc/${doc.id}`} : null,
|
||||
isChapter && hasPriv('editChapter') ? {icon: 'pencil', text: lang.editChapter, command: `editChapter/${doc.id}`} : null,
|
||||
isChapter && hasPriv('deleteChapter') ? {icon: 'trash', text: lang.deleteChapter, command: `deleteChapter/${doc.id}`} : null,
|
||||
];
|
||||
return [
|
||||
hasPriv('sortDoc') ? {icon: 'move cursor-move', className: 'sort-handler', hint: lang.sortDoc, size: 'xs'} : null,
|
||||
moreItems.length ? {icon: 'ellipsis-v', caret: false, placement: 'bottom-end', size: 'xs', items: moreItems} : null,
|
||||
@@ -983,6 +1006,7 @@ const actionsMap =
|
||||
const moreItems = [];
|
||||
if((doc.contentType === 'doc' || doc.contentType === 'markdown') && !isApiDoc(doc))
|
||||
{
|
||||
if(config.debug > 5) moreItems.push({text: lang.importConfluence, command: 'importFile/confluence'});
|
||||
moreItems.push(
|
||||
{text: lang.importMarkdown, command: 'importFile/markdown'},
|
||||
{text: lang.importJSON, command: 'importFile/json'},
|
||||
@@ -1085,7 +1109,25 @@ const commands =
|
||||
{
|
||||
const docApp = getDocApp();
|
||||
if(!docApp.libList.length) return zui.Modal.alert(getLang('createLibFirst'));
|
||||
docApp.startCreateDoc();
|
||||
|
||||
const {spaceID, libID, moduleID} = docApp;
|
||||
return showDocBasicModal(0, true, true).then((formData) => {
|
||||
const doc = {contentType: 'doc', status: 'draft'};
|
||||
return submitNewDoc(doc, spaceID, libID, moduleID, formData, (newDoc) => {
|
||||
docApp.startEditDoc(newDoc.id);
|
||||
});
|
||||
});
|
||||
},
|
||||
startEditDoc: function(_, [doc], options)
|
||||
{
|
||||
const docApp = getDocApp();
|
||||
doc = doc || docApp._doc.value?.data;
|
||||
if (typeof doc !== 'object') {
|
||||
doc = docApp._treeMap.value.docs.get(doc)?.data;
|
||||
}
|
||||
const editable = doc?.editable;
|
||||
if(!editable) return zui.Modal.alert(getLang('needEditable'));
|
||||
docApp.startEditDoc(doc, options);
|
||||
},
|
||||
/** 上传文档。Upload Doc. */
|
||||
uploadDoc: function()
|
||||
@@ -1279,6 +1321,51 @@ const commands =
|
||||
getDocApp().update('doc', $.extend(doc, {isCollector: collected, collects: collected ? doc.collects + 1 : doc.collects - 1}));
|
||||
});
|
||||
},
|
||||
addChapter: function(_, args)
|
||||
{
|
||||
zui.Modal.prompt({message: getLang('chapterName')}).then(newChapterName =>
|
||||
{
|
||||
if(!newChapterName) return;
|
||||
|
||||
const docApp = getDocApp();
|
||||
const {spaceType, spaceID, libID, moduleID} = docApp;
|
||||
const url = $.createLink('doc', 'create', `objectType=${spaceType}&objectID=${Math.max(spaceID, 0)}&libID=${libID}&moduleID=${moduleID}`);
|
||||
const docData =
|
||||
{
|
||||
status : 'normal',
|
||||
type : 'chapter',
|
||||
lib : libID,
|
||||
module : moduleID,
|
||||
title : newChapterName,
|
||||
acl : 'open',
|
||||
space : spaceType,
|
||||
parent : args[0] || 0,
|
||||
};
|
||||
|
||||
$.post(url, docData, (res) =>
|
||||
{
|
||||
try
|
||||
{
|
||||
const data = JSON.parse(res);
|
||||
if(!checkResponse(data)) return;
|
||||
if(typeof data !== 'object' || data.result === 'fail') throw new Error(getErrorMessage(data));
|
||||
}
|
||||
catch (error)
|
||||
{
|
||||
showSaveFailedAlert(error);
|
||||
}
|
||||
}).fail(error => {
|
||||
showSaveFailedAlert(error);
|
||||
}).complete(() => {
|
||||
docApp.load(null, null, null, {noLoading: true, picks: 'doc'});
|
||||
});
|
||||
});
|
||||
},
|
||||
editChapter: function(_, args)
|
||||
{
|
||||
const {spaceID, libID, moduleID} = docApp;
|
||||
return showDocBasicModal(args[0], false, true)
|
||||
},
|
||||
moveDoc: function(_, args)
|
||||
{
|
||||
const docApp = getDocApp();
|
||||
@@ -1367,14 +1454,15 @@ const commands =
|
||||
const url = $.createLink('api', 'export', `libID=${libID}&version=0&release=${release}&moduleID=${moduleID}`);
|
||||
zui.Modal.open({url: url, size: 'sm'});
|
||||
},
|
||||
importFile: function(_, args)
|
||||
importFile: function(info, args)
|
||||
{
|
||||
const type = args[0] || 'markdown';
|
||||
const docApp = getDocApp();
|
||||
const editor = docApp.editor.$;
|
||||
if(editor.isEmpty) return importFileToEditor(type);
|
||||
const altKey = info.event.altKey;
|
||||
if(editor.isEmpty) return importFileToEditor(type, {fromText: altKey});
|
||||
zui.Modal.confirm({message: getLang('importConfirm')})
|
||||
.then((result) => result && importFileToEditor(type));
|
||||
.then((result) => result && importFileToEditor(type, {fromText: altKey}));
|
||||
},
|
||||
showDocSettingModal: function(_, args)
|
||||
{
|
||||
|
||||
@@ -274,6 +274,10 @@ class docApp extends wg
|
||||
set::_class('shadow rounded ring canvas'),
|
||||
set::_style(array('height' => 'calc(100vh - 72px)')),
|
||||
set::_id('docApp'),
|
||||
set::token(session_id()),
|
||||
set::awarenessUser(array('id' => $app->user->id, 'name' => $app->user->realname)),
|
||||
set::useHocuspocus($config->docHocuspocus->enable),
|
||||
set::hocuspocusUrls(array($config->docHocuspocus->http, $config->docHocuspocus->websocket)),
|
||||
set::spaceType($spaceType),
|
||||
set::spaceID(data('spaceID')),
|
||||
set::libID(data('libID')),
|
||||
|
||||
@@ -90,7 +90,7 @@ $config->action->needGetProjectType = 'build,task,bug,case,testcase,caseli
|
||||
$config->action->needGetRelateField = ',branch,story,epic,requirement,productplan,release,task,build,bug,testcase,case,testtask,testreport,doc,doclib,issue,risk,opportunity,trainplan,gapanalysis,team,whitelist,researchplan,researchreport,meeting,kanbanlane,kanbancolumn,module,review,';
|
||||
$config->action->noLinkModules = ',doclib,module,webhook,gitlab,instance,gitea,gogs,sonarqube,pipeline,jenkins,kanban,kanbanspace,kanbancolumn,kanbanlane,kanbanregion,kanbancard,execution,project,traincategory,apistruct,program,product,user,entry,repo,pivot,scene,boardspace,auditplan,auditresult,productline,';
|
||||
$config->action->ignoreObjectType4Dynamic = 'kanbanregion,kanbanlane,kanbancolumn';
|
||||
$config->action->ignoreActions4Dynamic = 'disconnectxuanxuan,reconnectxuanxuan,loginxuanxuan,logoutxuanxuan,editmr,removemr';
|
||||
$config->action->ignoreActions4Dynamic = 'disconnectxuanxuan,reconnectxuanxuan,loginxuanxuan,logoutxuanxuan,editmr,removemr,syncdoingbyticket,syncdoingbystory,syncdoingbyuserstory,syncdoingbyepic,syncdoingbytask,syncdoingbybug,syncdoingbytodo,syncdoingbydemand';
|
||||
|
||||
$config->action->latestDateList = array('today', 'yesterday', 'thisWeek', 'lastWeek', 'thisMonth');
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ $lang->admin->menuList->dev['order'] = 45;
|
||||
|
||||
$lang->admin->menuList->convert['name'] = $lang->admin->menuSetting['convert']['name'];
|
||||
$lang->admin->menuList->convert['desc'] = $lang->admin->menuSetting['convert']['desc'];
|
||||
$lang->admin->menuList->convert['link'] = 'convert|convertjira';
|
||||
$lang->admin->menuList->convert['link'] = 'convert|index|mode=restore';
|
||||
$lang->admin->menuList->convert['order'] = 50;
|
||||
|
||||
$lang->admin->menuList->system['subMenu']['mode'] = array('link' => "{$lang->custom->mode}|custom|mode|");
|
||||
|
||||
@@ -200,8 +200,8 @@ class adminModel extends model
|
||||
|
||||
if(!empty($menu['link']) && strpos($menu['link'], '|') !== false)
|
||||
{
|
||||
list($module, $method) = explode('|', $menu['link']);
|
||||
$menu['link'] = helper::createLink($module, $method);
|
||||
list($module, $method, $params) = explode('|', $menu['link'] . '|');
|
||||
$menu['link'] = helper::createLink($module, $method, $params);
|
||||
if(common::hasPriv($module, $method)) $menu['disabled'] = false;
|
||||
}
|
||||
|
||||
|
||||
@@ -510,7 +510,7 @@ class bugModel extends model
|
||||
if($changes) $this->action->logHistory($actionID, $changes);
|
||||
|
||||
/* If the edition is not pms, update feedback. */
|
||||
if($this->config->edition != 'open' && $oldBug->feedback) $this->loadModel('feedback')->updateStatus('bug', $oldBug->feedback, $bug->status, $oldBug->status);
|
||||
if($this->config->edition != 'open' && $oldBug->feedback) $this->loadModel('feedback')->updateStatus('bug', $oldBug->feedback, $bug->status, $oldBug->status, $oldBug->id);
|
||||
|
||||
return !dao::isError();
|
||||
}
|
||||
@@ -608,6 +608,8 @@ class bugModel extends model
|
||||
if(isset($kanbanParams['toColID'])) $this->kanban->moveCard($bug->id, $kanbanParams['fromColID'], $kanbanParams['toColID'], $kanbanParams['fromLaneID'], $kanbanParams['toLaneID']);
|
||||
}
|
||||
|
||||
if($this->config->edition != 'open' && $oldBug->feedback) $this->loadModel('feedback')->updateStatus('bug', $oldBug->feedback, $bug->status, $oldBug->status, $oldBug->id);
|
||||
|
||||
$changes = common::createChanges($oldBug, $bug);
|
||||
$files = $this->loadModel('file')->saveUpload('bug', $bug->id);
|
||||
if($changes || $files)
|
||||
@@ -637,7 +639,7 @@ class bugModel extends model
|
||||
$this->dao->update(TABLE_BUG)->data($bug, 'comment')->autoCheck()->checkFlow()->where('id')->eq($bug->id)->exec();
|
||||
if(dao::isError()) return false;
|
||||
|
||||
if($this->config->edition != 'open' && $oldBug->feedback) $this->loadModel('feedback')->updateStatus('bug', $oldBug->feedback, $bug->status, $oldBug->status);
|
||||
if($this->config->edition != 'open' && $oldBug->feedback) $this->loadModel('feedback')->updateStatus('bug', $oldBug->feedback, $bug->status, $oldBug->status, $oldBug->id);
|
||||
|
||||
$changes = common::createChanges($oldBug, $bug);
|
||||
$actionID = $this->loadModel('action')->create('bug', $bug->id, 'Closed', $this->post->comment);
|
||||
|
||||
+3
-3
@@ -2012,7 +2012,7 @@ class bugZen extends bug
|
||||
if($this->config->edition != 'open')
|
||||
{
|
||||
$todo = $this->dao->select('type, objectID')->from(TABLE_TODO)->where('id')->eq($todoID)->fetch();
|
||||
if($todo->type == 'feedback' && $todo->objectID) $this->loadModel('feedback')->updateStatus('todo', $todo->objectID, 'done');
|
||||
if($todo->type == 'feedback' && $todo->objectID) $this->loadModel('feedback')->updateStatus('todo', $todo->objectID, 'done', '', $todoID);
|
||||
}
|
||||
|
||||
return !dao::isError();
|
||||
@@ -2106,7 +2106,7 @@ class bugZen extends bug
|
||||
|
||||
/* 更新反馈的状态。*/
|
||||
/* Update the status of feedback. */
|
||||
if(($this->config->edition != 'open') && $oldBug->feedback) $this->loadModel('feedback')->updateStatus('bug', $oldBug->feedback, $bug->status, $oldBug->status);
|
||||
if(($this->config->edition != 'open') && $oldBug->feedback) $this->loadModel('feedback')->updateStatus('bug', $oldBug->feedback, $bug->status, $oldBug->status, $oldBug->id);
|
||||
|
||||
return !dao::isError();
|
||||
}
|
||||
@@ -2345,7 +2345,7 @@ class bugZen extends bug
|
||||
|
||||
/* 更新相关反馈的状态。*/
|
||||
/* Update status of related feedback. */
|
||||
if($this->config->edition != 'open' && $oldBug->feedback) $this->loadModel('feedback')->updateStatus('bug', $oldBug->feedback, $bug->status, $oldBug->status);
|
||||
if($this->config->edition != 'open' && $oldBug->feedback) $this->loadModel('feedback')->updateStatus('bug', $oldBug->feedback, $bug->status, $oldBug->status, $oldBug->id);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -147,6 +147,7 @@ $lang->levelExceeded = 'The level has exceeded the display range. For more inf
|
||||
$lang->noticeOkFile = 'Aus Sicherheitsgrü nden muss Ihr Adminkonto bestätigt werden. \n Bitte melden Sie sich an und erstellen Sie die Datei %s File.\n Hinweis:\n 1. Die Datei ist leer.\n 2. Wenn die Datei bereits existiert, löschen Sie sie und erstellen Sie eine neue Datei.';
|
||||
$lang->noticeDrag = 'Click to add or drag to upload, no more than %s';
|
||||
$lang->allProgress = 'All Progress';
|
||||
$lang->hasReviewed = 'The content has already been reviewed and does not need further review !';
|
||||
|
||||
$lang->fieldDisplaySetting = 'Field Display Setting';
|
||||
$lang->fieldSettingTip = 'The following fields are collapsed by default, click on the "Show more fields" button to expand the view, if you want some fields not to be collapsed by default, you can fix it with a pin.';
|
||||
|
||||
@@ -147,6 +147,7 @@ $lang->levelExceeded = 'The level has exceeded the display range. For more inf
|
||||
$lang->noticeOkFile = 'For security reasons, your Admin account has to be confirmed. \n Please login ZenTao server and create %s File.\n Note:\n 1. File is blank.\n 2. If the file existed, delete it and then create a new one.';
|
||||
$lang->noticeDrag = 'Click to add or drag to upload, no more than %s';
|
||||
$lang->allProgress = 'All Progress';
|
||||
$lang->hasReviewed = 'The content has already been reviewed and does not need further review !';
|
||||
|
||||
$lang->fieldDisplaySetting = 'Field Display Setting';
|
||||
$lang->fieldSettingTip = 'The following fields are collapsed by default, click on the "Show more fields" button to expand the view, if you want some fields not to be collapsed by default, you can fix it with a pin.';
|
||||
|
||||
@@ -147,6 +147,7 @@ $lang->levelExceeded = 'The level has exceeded the display range. For more inf
|
||||
$lang->noticeOkFile = 'For security reasons, your Admin account has to be confirmed. \n Please login ZenTao server and create %s File.\n Note:\n 1. File is blank.\n 2. If the file existed, delete it and then create a new one.';
|
||||
$lang->noticeDrag = 'Click to add or drag to upload, no more than %s';
|
||||
$lang->allProgress = 'All Progress';
|
||||
$lang->hasReviewed = 'The content has already been reviewed and does not need further review !';
|
||||
|
||||
$lang->fieldDisplaySetting = 'Field Display Setting';
|
||||
$lang->fieldSettingTip = 'The following fields are collapsed by default, click on the "Show more fields" button to expand the view, if you want some fields not to be collapsed by default, you can fix it with a pin.';
|
||||
|
||||
@@ -147,6 +147,7 @@ $lang->levelExceeded = '层级已超过显示范围,更多信息请前往网
|
||||
$lang->noticeOkFile = '为了安全起见,系统需要确认您的管理员身份。\n 请登录禅道所在的服务器,创建%s文件。\n 注意:\n 1. 文件内容为空。\n 2. 如果之前文件存在,删除之后重新创建。';
|
||||
$lang->noticeDrag = '可点击添加或拖拽上传, 不超过 %s';
|
||||
$lang->allProgress = '总进度';
|
||||
$lang->hasReviewed = '该内容已经评审过,无需重复评审!';
|
||||
|
||||
$lang->fieldDisplaySetting = '字段显示设置';
|
||||
$lang->fieldSettingTip = '以下字段默认收起,点击「显示更多字段」按钮展开查看,若您希望某些字段默认不收起,通过图钉固定即可。';
|
||||
|
||||
@@ -911,7 +911,7 @@ class commonModel extends model
|
||||
if(is_object($value) || is_array($value)) continue;
|
||||
|
||||
$check = strtolower($key);
|
||||
if(in_array($check, array('lastediteddate', 'lasteditedby', 'assigneddate', 'editedby', 'editeddate', 'editingdate', 'uid'))) continue;
|
||||
if(in_array($check, array('lastediteddate', 'lasteditedby', 'assigneddate', 'editedby', 'editeddate', 'editingdate', 'uid', 'prevstatus', 'prevassignedto'))) continue;
|
||||
if(in_array($check, array('finisheddate', 'canceleddate', 'hangupeddate', 'lastcheckeddate', 'activateddate', 'closeddate', 'actualcloseddate')) && $value == '') continue;
|
||||
|
||||
if(isset($old->$key) && !is_object($old->$key) && !is_array($old->$key))
|
||||
|
||||
+137
-7
@@ -12,14 +12,144 @@ define('JIRA_BUILD', '`projectversion`');
|
||||
define('JIRA_ACTION', '`jiraaction`');
|
||||
define('JIRA_NODEASSOCIATION', '`nodeassociation`');
|
||||
define('JIRA_FILE', '`fileattachment`');
|
||||
define('JIRA_PRIORITY', '`priority`');
|
||||
define('JIRA_TMPRELATION', '`jiratmprelation`');
|
||||
define('JIRA_WORKFLOW', '`jiraworkflows`');
|
||||
define('JIRA_WORKFLOWSCHEME', '`workflowscheme`');
|
||||
define('JIRA_WORKLOG', '`worklog`');
|
||||
define('JIRA_AUDITLOG', '`audit_log`');
|
||||
define('JIRA_MEMBERSHIP', '`cwd_membership`');
|
||||
define('JIRA_PROJECTROLEACTOR', '`projectroleactor`');
|
||||
define('JIRA_CUSTOMFIELD', '`customfield`');
|
||||
define('JIRA_CUSTOMFIELDVALUE', '`customfieldvalue`');
|
||||
define('JIRA_CUSTOMFIELDOPTION', '`customfieldoption`');
|
||||
define('JIRA_OSPROPERTYENTRY', '`propertyentry`');
|
||||
define('JIRA_OPTIONCONFIGURATION', '`optionconfiguration`');
|
||||
define('JIRA_CONFIGURATIONCONTEXT', '`configurationcontext`');
|
||||
define('JIRA_FIELDSCREENLAYOUTITEM', '`fieldscreenlayoutitem`');
|
||||
define('JIRA_FIELDCONFIGSCHEME', '`fieldconfigscheme`');
|
||||
define('JIRA_FIELDCONFIGSCHEMEISSUETYPE', '`fieldconfigschemeissuetype`');
|
||||
define('CONFLUENCE_TMPRELATION', '`confluencetmprelation`');
|
||||
|
||||
$config->convert = new stdClass();
|
||||
$config->convert->objectTables = array();
|
||||
$config->convert->objectTables['user'] = JIRA_USER;
|
||||
$config->convert->objectTables['project'] = JIRA_PROJECT;
|
||||
$config->convert->objectTables['issue'] = JIRA_ISSUE;
|
||||
$config->convert->objectTables['build'] = JIRA_BUILD;
|
||||
$config->convert->objectTables['issuelink'] = JIRA_ISSUELINK;
|
||||
$config->convert->objectTables['action'] = JIRA_ACTION;
|
||||
$config->convert->objectTables['file'] = JIRA_FILE;
|
||||
$config->convert->objectTables['user'] = JIRA_USER;
|
||||
$config->convert->objectTables['project'] = JIRA_PROJECT;
|
||||
$config->convert->objectTables['issue'] = JIRA_ISSUE;
|
||||
$config->convert->objectTables['build'] = JIRA_BUILD;
|
||||
$config->convert->objectTables['issuelink'] = JIRA_ISSUELINK;
|
||||
$config->convert->objectTables['issuetype'] = JIRA_ISSUETYPE;
|
||||
$config->convert->objectTables['issuelinktype'] = JIRA_ISSUELINKTYPE;
|
||||
$config->convert->objectTables['resolution'] = JIRA_RESOLUTION;
|
||||
$config->convert->objectTables['nodeassociation'] = JIRA_NODEASSOCIATION;
|
||||
$config->convert->objectTables['workflow'] = JIRA_WORKFLOW;
|
||||
$config->convert->objectTables['workflowscheme'] = JIRA_WORKFLOWSCHEME;
|
||||
$config->convert->objectTables['worklog'] = JIRA_WORKLOG;
|
||||
$config->convert->objectTables['auditlog'] = JIRA_AUDITLOG;
|
||||
$config->convert->objectTables['status'] = JIRA_ISSUESTATUS;
|
||||
$config->convert->objectTables['action'] = JIRA_ACTION;
|
||||
$config->convert->objectTables['file'] = JIRA_FILE;
|
||||
$config->convert->objectTables['priority'] = JIRA_PRIORITY;
|
||||
$config->convert->objectTables['membership'] = JIRA_MEMBERSHIP;
|
||||
$config->convert->objectTables['projectroleactor'] = JIRA_PROJECTROLEACTOR;
|
||||
$config->convert->objectTables['customfield'] = JIRA_CUSTOMFIELD;
|
||||
$config->convert->objectTables['customfieldvalue'] = JIRA_CUSTOMFIELDVALUE;
|
||||
$config->convert->objectTables['customfieldoption'] = JIRA_CUSTOMFIELDOPTION;
|
||||
$config->convert->objectTables['ospropertyentry'] = JIRA_OSPROPERTYENTRY;
|
||||
$config->convert->objectTables['optionconfiguration'] = JIRA_OPTIONCONFIGURATION;
|
||||
$config->convert->objectTables['configurationcontext'] = JIRA_CONFIGURATIONCONTEXT;
|
||||
$config->convert->objectTables['fieldscreenlayoutitem'] = JIRA_FIELDSCREENLAYOUTITEM;
|
||||
$config->convert->objectTables['fieldconfigscheme'] = JIRA_FIELDCONFIGSCHEME;
|
||||
$config->convert->objectTables['fieldconfigschemeissuetype'] = JIRA_FIELDCONFIGSCHEMEISSUETYPE;
|
||||
|
||||
$config->convert->jiraFieldControl['com.atlassian.jira.plugin.system.customfieldtypes:textfield'] = array('control' => 'input', 'type' => 'varchar', 'length' => '255');
|
||||
$config->convert->jiraFieldControl['com.atlassian.jira.plugin.system.customfieldtypes:labels'] = array('control' => 'input', 'type' => 'varchar', 'length' => '255');
|
||||
$config->convert->jiraFieldControl['com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons'] = array('control' => 'radio', 'type' => 'varchar', 'length' => '255');
|
||||
$config->convert->jiraFieldControl['com.atlassian.jira.plugin.system.customfieldtypes:multicheckboxes'] = array('control' => 'checkbox', 'type' => 'text', 'length' => '0');
|
||||
$config->convert->jiraFieldControl['com.atlassian.jira.plugin.system.customfieldtypes:datetime'] = array('control' => 'datetime', 'type' => 'datetime', 'length' => '0');
|
||||
$config->convert->jiraFieldControl['com.atlassian.jira.plugin.system.customfieldtypes:datepicker'] = array('control' => 'date', 'type' => 'date', 'length' => '0');
|
||||
$config->convert->jiraFieldControl['com.atlassian.jira.plugin.system.customfieldtypes:textarea'] = array('control' => 'textarea', 'type' => 'text', 'length' => '0');
|
||||
$config->convert->jiraFieldControl['com.atlassian.jira.plugin.system.customfieldtypes:float'] = array('control' => 'decimal', 'type' => 'decimal', 'length' => '0');
|
||||
$config->convert->jiraFieldControl['com.atlassian.jira.plugin.system.customfieldtypes:multiselect'] = array('control' => 'multi-select', 'type' => 'text', 'length' => '0');
|
||||
$config->convert->jiraFieldControl['com.atlassian.jira.plugin.system.customfieldtypes:cascadingselect'] = array('control' => 'multi-select', 'type' => 'text', 'length' => '0');
|
||||
$config->convert->jiraFieldControl['com.atlassian.jira.plugin.system.customfieldtypes:select'] = array('control' => 'select', 'type' => 'varchar', 'length' => '255');
|
||||
$config->convert->jiraFieldControl['com.atlassian.jira.plugin.system.customfieldtypes:userpicker'] = array('control' => 'select', 'type' => 'varchar', 'length' => '255');
|
||||
$config->convert->jiraFieldControl['com.atlassian.jira.plugin.system.customfieldtypes:multiuserpicker'] = array('control' => 'multi-select', 'type' => 'text', 'length' => '0');
|
||||
|
||||
$config->convert->objectFields['epic'] = array('module', 'source', 'sourceNote', 'keywords', 'mailto', 'subStatus');
|
||||
$config->convert->objectFields['requirement'] = $config->convert->objectFields['epic'];
|
||||
$config->convert->objectFields['story'] = $config->convert->objectFields['epic'];
|
||||
$config->convert->objectFields['bug'] = array('module', 'keywords', 'type', 'os', 'browser', 'hardware', 'feedbackBy', 'notifyEmail', 'deadline', 'resolvedBy', 'resolvedBuild', 'resolvedDate', 'mailto', 'subStatus');
|
||||
$config->convert->objectFields['task'] = array('module', 'type', 'estStarted', 'finishedBy', 'mailto', 'subStatus');
|
||||
$config->convert->objectFields['testcase'] = array('module', 'precondition', 'type', 'stage', 'scene', 'lastRunner', 'lastRunResult', 'keywords', 'mailto', 'subStatus');
|
||||
$config->convert->objectFields['feedback'] = array('module', 'type', 'solution', 'subStatus', 'public', 'notify', 'notifyEmail', 'source', 'likes', 'processedBy', 'processedDate', 'feedbackBy', 'mailto');
|
||||
$config->convert->objectFields['ticket'] = array('module', 'openedBuild', 'realStarted', 'startedBy', 'startedDate', 'deadline', 'resolvedBy', 'resolvedDate');
|
||||
|
||||
$config->convert->importDeafaultValue = array();
|
||||
$config->convert->importDeafaultValue['zentaoObject']['Epic'] = 'requirement';
|
||||
$config->convert->importDeafaultValue['zentaoObject']['长篇故事'] = 'requirement';
|
||||
$config->convert->importDeafaultValue['zentaoObject']['Story'] = 'story';
|
||||
$config->convert->importDeafaultValue['zentaoObject']['故事'] = 'story';
|
||||
$config->convert->importDeafaultValue['zentaoObject']['需求'] = 'story';
|
||||
$config->convert->importDeafaultValue['zentaoObject']['Sub-story'] = 'story';
|
||||
$config->convert->importDeafaultValue['zentaoObject']['子需求'] = 'story';
|
||||
$config->convert->importDeafaultValue['zentaoObject']['Task'] = 'task';
|
||||
$config->convert->importDeafaultValue['zentaoObject']['任务'] = 'task';
|
||||
$config->convert->importDeafaultValue['zentaoObject']['Sub-task'] = 'task';
|
||||
$config->convert->importDeafaultValue['zentaoObject']['子任务'] = 'task';
|
||||
$config->convert->importDeafaultValue['zentaoObject']['Bug'] = 'bug';
|
||||
$config->convert->importDeafaultValue['zentaoObject']['测试'] = 'bug';
|
||||
$config->convert->importDeafaultValue['zentaoObject']['Case'] = 'testcase';
|
||||
$config->convert->importDeafaultValue['zentaoObject']['用例'] = 'testcase';
|
||||
|
||||
$config->convert->importDeafaultValue['bug']['status']['Open'] = 'active';
|
||||
$config->convert->importDeafaultValue['bug']['status']['To Do'] = 'active';
|
||||
$config->convert->importDeafaultValue['bug']['status']['In Progress'] = 'active';
|
||||
$config->convert->importDeafaultValue['bug']['status']['Reopened'] = 'active';
|
||||
$config->convert->importDeafaultValue['bug']['status']['In Review'] = 'active';
|
||||
$config->convert->importDeafaultValue['bug']['status']['Resolved'] = 'resolved';
|
||||
$config->convert->importDeafaultValue['bug']['status']['Done'] = 'closed';
|
||||
$config->convert->importDeafaultValue['bug']['status']['Closed'] = 'closed';
|
||||
|
||||
$config->convert->importDeafaultValue['task']['status']['Open'] = 'wait';
|
||||
$config->convert->importDeafaultValue['task']['status']['To Do'] = 'doing';
|
||||
$config->convert->importDeafaultValue['task']['status']['In Progress'] = 'doing';
|
||||
$config->convert->importDeafaultValue['task']['status']['Reopened'] = 'doing';
|
||||
$config->convert->importDeafaultValue['task']['status']['In Review'] = 'doing';
|
||||
$config->convert->importDeafaultValue['task']['status']['Resolved'] = 'done';
|
||||
$config->convert->importDeafaultValue['task']['status']['Done'] = 'closed';
|
||||
$config->convert->importDeafaultValue['task']['status']['Closed'] = 'closed';
|
||||
|
||||
$config->convert->importDeafaultValue['story']['status']['Open'] = 'draft';
|
||||
$config->convert->importDeafaultValue['story']['status']['To Do'] = 'active';
|
||||
$config->convert->importDeafaultValue['story']['status']['In Progress'] = 'active';
|
||||
$config->convert->importDeafaultValue['story']['status']['Reopened'] = 'active';
|
||||
$config->convert->importDeafaultValue['story']['status']['In Review'] = 'reviewing';
|
||||
$config->convert->importDeafaultValue['story']['status']['Resolved'] = 'closed';
|
||||
$config->convert->importDeafaultValue['story']['status']['Done'] = 'closed';
|
||||
$config->convert->importDeafaultValue['story']['status']['Closed'] = 'closed';
|
||||
|
||||
$config->convert->importDeafaultValue['bug']['action']['Create'] = 'create';
|
||||
$config->convert->importDeafaultValue['task']['action'] = $config->convert->importDeafaultValue['bug']['action'];
|
||||
$config->convert->importDeafaultValue['story']['action'] = $config->convert->importDeafaultValue['bug']['action'];
|
||||
|
||||
$config->convert->importDeafaultValue['bug']['resolution']['Done'] = 'fixed';
|
||||
$config->convert->importDeafaultValue['bug']['resolution']["Won't Do"] = 'willnotfix';
|
||||
$config->convert->importDeafaultValue['bug']['resolution']["Duplicate"] = 'duplicate';
|
||||
$config->convert->importDeafaultValue['bug']['resolution']["Cannot Reproduce"] = 'notrepro';
|
||||
$config->convert->importDeafaultValue['bug']['resolution']["Declined"] = 'willnotfix';
|
||||
|
||||
$config->convert->importDeafaultValue['task']['reason']['Done'] = 'done';
|
||||
$config->convert->importDeafaultValue['task']['reason']["Won't Do"] = 'cancel';
|
||||
$config->convert->importDeafaultValue['task']['reason']["Duplicate"] = 'cancel';
|
||||
$config->convert->importDeafaultValue['task']['reason']["Cannot Reproduce"] = 'cancel';
|
||||
$config->convert->importDeafaultValue['task']['reason']["Declined"] = 'cancel';
|
||||
|
||||
$config->convert->importDeafaultValue['story']['reason']['Done'] = 'done';
|
||||
$config->convert->importDeafaultValue['story']['reason']["Won't Do"] = 'willnotdo';
|
||||
$config->convert->importDeafaultValue['story']['reason']["Duplicate"] = 'duplicate';
|
||||
$config->convert->importDeafaultValue['story']['reason']["Cannot Reproduce"] = 'bydesign';
|
||||
$config->convert->importDeafaultValue['story']['reason']["Declined"] = 'cancel';
|
||||
|
||||
$config->convert->importDeafaultValue['requirement'] = $config->convert->importDeafaultValue['story'];
|
||||
$config->convert->importDeafaultValue['epic'] = $config->convert->importDeafaultValue['story'];
|
||||
|
||||
+178
-69
@@ -16,12 +16,37 @@ class convert extends control
|
||||
* 数据导入首页。
|
||||
* Index page of convert.
|
||||
*
|
||||
* @param string $mode
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function index()
|
||||
public function index(string $mode = '')
|
||||
{
|
||||
$this->convert->saveState();
|
||||
$jiraRelation = $this->session->jiraRelation;
|
||||
$jiraRelation = $jiraRelation ? json_decode($jiraRelation, true) : array();
|
||||
if($jiraRelation && $mode == 'restore')
|
||||
{
|
||||
$currentStep = 'object';
|
||||
$stepStatus = $this->session->stepStatus;
|
||||
$stepStatus = $stepStatus ? json_decode($stepStatus, true) : array();
|
||||
$stepList = $this->convert->getJiraStepList($jiraRelation);
|
||||
foreach($stepList as $step => $stepLabel)
|
||||
{
|
||||
if(!empty($stepStatus[$step]) && $stepStatus[$step] == 'done') $currentStep = $step;
|
||||
}
|
||||
$confirmedURL = $currentStep == 'user' ? inlink('initJiraUser', "method={$this->session->jiraMethod}&dbName={$this->session->jiraDB}") : inlink('mapJira2Zentao', "method={$this->session->jiraMethod}&dbName={$this->session->jiraDB}&step=$currentStep");
|
||||
$canceledURL = inlink('index', 'type=reset');
|
||||
$this->send(array('result' => 'success', 'load' => array('confirm' => $this->lang->convert->jira->restore, 'confirmed' => $confirmedURL, 'canceled' => $canceledURL)));
|
||||
}
|
||||
if($mode == 'reset')
|
||||
{
|
||||
unset($_SESSION['jiraDB']);
|
||||
unset($_SESSION['jiraMethod']);
|
||||
unset($_SESSION['jiraRelation']);
|
||||
unset($_SESSION['stepStatus']);
|
||||
unset($_SESSION['jiraUser']);
|
||||
}
|
||||
|
||||
$this->view->title = $this->lang->convert->common;
|
||||
$this->display();
|
||||
}
|
||||
@@ -252,110 +277,161 @@ class convert extends control
|
||||
}
|
||||
|
||||
/**
|
||||
* 选择数据导入方式。
|
||||
* Import jira index.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function convertJira()
|
||||
{
|
||||
$this->view->title = $this->lang->convert->jira->method;
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* 数据导入提示。
|
||||
* Jira数据导入提示。
|
||||
* Import jira notice.
|
||||
*
|
||||
* @param string $mehotd db|file
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function importNotice(string $method = 'db')
|
||||
public function importJiraNotice(string $method = 'db')
|
||||
{
|
||||
if($this->server->request_method == 'POST')
|
||||
{
|
||||
$domain = $this->post->jiraDomain;
|
||||
if($domain && strpos($domain, 'http') === false) $domain = 'http://' . $domain;
|
||||
|
||||
$jiraApi = array();
|
||||
$jiraApi['domain'] = $domain ? trim($domain, '/') : '';
|
||||
$jiraApi['admin'] = $domain ? $this->post->jiraAdmin : '';
|
||||
$jiraApi['token'] = $domain ? $this->post->jiraToken : '';
|
||||
|
||||
$this->session->set('jiraApi', json_encode($jiraApi));
|
||||
$this->session->set('jiraDB', $this->post->dbName);
|
||||
$this->session->set('jiraMethod', $method);
|
||||
|
||||
if($method == 'db')
|
||||
{
|
||||
$dbName = $this->post->dbName;
|
||||
if(!$dbName) return $this->send(array('result' => 'fail', 'message' => array('dbName' => sprintf($this->lang->error->notempty, $this->lang->convert->jira->database))));
|
||||
if(!$this->convert->dbExists($dbName)) return $this->send(array('result' => 'fail', 'message' => array('dbName' => $this->lang->convert->jira->invalidDB)));
|
||||
if(!$this->convert->tableExistsOfJira($dbName, 'nodeassociation')) return $this->send(array('result' => 'fail', 'message' => array('dbName' => $this->lang->convert->jira->invalidTable)));
|
||||
}
|
||||
else
|
||||
{
|
||||
if($domain)
|
||||
{
|
||||
$this->convert->checkJiraApi();
|
||||
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
|
||||
}
|
||||
$this->convert->deleteJiraFile();
|
||||
$jiraFilePath = $this->app->getTmpRoot() . 'jirafile/';
|
||||
if(!is_readable($jiraFilePath) || !is_writable($jiraFilePath)) return $this->send(array('result' => 'fail', 'message' => sprintf($this->lang->convert->jira->notReadAndWrite, $jiraFilePath)));
|
||||
if(!file_exists($jiraFilePath . 'entities.xml')) return $this->send(array('result' => 'fail', 'message' => sprintf($this->lang->convert->jira->notExistEntities, $jiraFilePath . 'entities.xml')));
|
||||
|
||||
$this->session->set('jiraDB', $dbName);
|
||||
$link = $this->createLink('convert', 'mapJira2Zentao', "method=db&dbName={$this->post->dbName}");
|
||||
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'load' => $link));
|
||||
/* 解析entities.xml文件。 */
|
||||
$this->convert->splitFile();
|
||||
}
|
||||
|
||||
$this->convert->deleteJiraFile();
|
||||
$jiraFilePath = $this->app->getTmpRoot() . 'jirafile/';
|
||||
if(!is_readable($jiraFilePath) || !is_writable($jiraFilePath)) return $this->send(array('result' => 'fail', 'message' => sprintf($this->lang->convert->jira->notReadAndWrite, $jiraFilePath)));
|
||||
if(!file_exists($jiraFilePath . 'entities.xml')) return $this->send(array('result' => 'fail', 'message' => sprintf($this->lang->convert->jira->notExistEntities, $jiraFilePath . 'entities.xml')));
|
||||
|
||||
$this->convert->splitFile();
|
||||
|
||||
$link = $this->createLink('convert', 'mapJira2Zentao', 'method=file');
|
||||
$link = $this->createLink('convert', 'mapJira2Zentao', "method={$method}&dbName={$this->post->dbName}");
|
||||
return $this->send(array('result' => 'success', 'load' => $link));
|
||||
}
|
||||
|
||||
$this->view->title = $this->lang->convert->jira->method;
|
||||
$this->view->method = $method;
|
||||
$this->view->title = $this->lang->convert->jira->method;
|
||||
$this->view->method = $method;
|
||||
$this->view->jiraApi = !empty($_SESSION['jiraApi']) ? json_decode($this->session->jiraApi) : array();
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取下一步。
|
||||
* Get next key.
|
||||
*
|
||||
* @param array $array
|
||||
* @param string $currentKey
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function getNextKey($array, $currentKey)
|
||||
{
|
||||
$keys = array_keys($array);
|
||||
$currentIndex = array_search($currentKey, $keys);
|
||||
if($currentIndex !== false && isset($keys[$currentIndex + 1])) return $keys[$currentIndex + 1];
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取上一步。
|
||||
* Get back key.
|
||||
*
|
||||
* @param array $array
|
||||
* @param string $currentKey
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function getBackKey($array, $currentKey)
|
||||
{
|
||||
$keys = array_keys($array);
|
||||
$currentIndex = array_search($currentKey, $keys);
|
||||
if($currentIndex !== false && isset($keys[$currentIndex - 1])) return $keys[$currentIndex - 1];
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* 将jira对象映射到zentao。
|
||||
* Map jira objects to zentao.
|
||||
*
|
||||
* @param string $method db|file
|
||||
* @param string $dbName
|
||||
* @param int $step
|
||||
* @param string $step
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function mapJira2Zentao(string $method = 'db', string $dbName = '', int $step = 1)
|
||||
public function mapJira2Zentao(string $method = 'db', string $dbName = '', string $step = 'object')
|
||||
{
|
||||
$this->app->loadLang('story');
|
||||
$this->app->loadLang('bug');
|
||||
$this->app->loadLang('task');
|
||||
$stepStatus = $this->session->stepStatus;
|
||||
$stepStatus = $stepStatus ? json_decode($stepStatus, true) : array();
|
||||
$jiraRelation = $this->session->jiraRelation;
|
||||
$jiraRelation = $jiraRelation ? json_decode($jiraRelation, true) : array();
|
||||
if($step != 'object' && empty($jiraRelation)) $this->locate(inlink('index'));
|
||||
|
||||
if($_POST)
|
||||
{
|
||||
foreach($_POST as $key => $value) $_SESSION['jiraRelation'][$key] = $value;
|
||||
$this->convert->checkImportJira($step);
|
||||
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
|
||||
|
||||
$link = $step == 4 ? inlink('initJiraUser', "method={$method}") : inlink('mapJira2Zentao', "method={$method}&dbName={$dbName}&step=" . ++$step);
|
||||
foreach($_POST as $key => $value) $jiraRelation[$key] = $value;
|
||||
$this->session->set('jiraRelation', json_encode($jiraRelation));
|
||||
|
||||
$stepStatus[$step] = 'done';
|
||||
$this->session->set('stepStatus', json_encode($stepStatus));
|
||||
|
||||
/* 提交后要获取新的步骤列表。 */
|
||||
$stepList = $this->convert->getJiraStepList($jiraRelation);
|
||||
$nextSteps = $this->getNextKey($stepList, $step);
|
||||
|
||||
$link = $step == 'relation' ? inlink('initJiraUser', "method={$method}&dbName={$dbName}") : inlink('mapJira2Zentao', "method={$method}&dbName={$dbName}&step={$nextSteps}");
|
||||
return $this->send(array('result' => 'success', 'load' => $link));
|
||||
}
|
||||
|
||||
if($method == 'db')
|
||||
{
|
||||
$originDBH = $this->dbh;
|
||||
$dbh = $this->convert->connectDB($dbName);
|
||||
|
||||
$issueTypeList = $this->dao->dbh($dbh)->select('*')->from(JIRA_ISSUETYPE)->fetchAll('ID');
|
||||
$linkTypeList = $this->dao->dbh($dbh)->select('*, LINKNAME as linkname')->from(JIRA_ISSUELINKTYPE)->fetchAll('ID');
|
||||
$resolutionList = $this->dao->dbh($dbh)->select('*')->from(JIRA_RESOLUTION)->fetchAll('ID');
|
||||
$statusList = $this->dao->dbh($dbh)->select('*')->from(JIRA_ISSUESTATUS)->fetchAll('ID');
|
||||
|
||||
$this->dao->dbh($originDBH);
|
||||
}
|
||||
else
|
||||
{
|
||||
$issueTypeList = $this->convert->getJiraDataFromFile('issuetype');
|
||||
$linkTypeList = $this->convert->getJiraDataFromFile('issuelinktype');
|
||||
$resolutionList = $this->convert->getJiraDataFromFile('resolution');
|
||||
$statusList = $this->convert->getJiraDataFromFile('status');
|
||||
}
|
||||
$this->loadModel('story');
|
||||
$this->loadModel('bug');
|
||||
$this->loadModel('task');
|
||||
$objectRelation = !empty($jiraRelation['zentaoObject']) && in_array($step, array_keys($jiraRelation['zentaoObject']));
|
||||
$resolutionList = $objectRelation ? $this->convert->getJiraData($method, 'resolution') : array();
|
||||
$statusList = $objectRelation ? $this->convert->getJiraStatusList($step, $jiraRelation) : array();
|
||||
$jiraFields = $objectRelation ? $this->convert->getJiraCustomField($step, $jiraRelation) : array();
|
||||
$issueTypeList = $this->convert->getJiraTypeList();
|
||||
$linkTypeList = $step == 'relation' ? $this->convert->getJiraData($method, 'issuelinktype') : array();
|
||||
$stepList = $this->convert->getJiraStepList($jiraRelation, $issueTypeList);
|
||||
$backSteps = $this->getBackKey($stepList, $step);
|
||||
|
||||
$this->view->title = $this->lang->convert->jira->mapJira2Zentao;
|
||||
$this->view->issueTypeList = $issueTypeList;
|
||||
$this->view->linkTypeList = $linkTypeList;
|
||||
$this->view->resolutionList = $resolutionList;
|
||||
$this->view->statusList = $statusList;
|
||||
$this->view->method = $method;
|
||||
$this->view->step = $step;
|
||||
$this->view->dbName = $dbName;
|
||||
$this->view->stepStatus = $stepStatus;
|
||||
$this->view->stepList = $stepList;
|
||||
$this->view->jiraRelation = $jiraRelation;
|
||||
$this->view->issueTypeList = $issueTypeList;
|
||||
$this->view->zentaoObjects = $this->convert->getZentaoObjectList();;
|
||||
$this->view->fieldList = $jiraFields;
|
||||
$this->view->statusList = $statusList;
|
||||
$this->view->jiraActions = $this->convert->getJiraWorkflowActions();
|
||||
$this->view->resolutionList = $resolutionList;
|
||||
$this->view->defaultValue = $this->convert->getObjectDefaultValue($step);
|
||||
$this->view->linkTypeList = $linkTypeList;
|
||||
$this->view->backUrl = $backSteps ? inlink('mapJira2Zentao', "method={$method}&dbName={$dbName}&step={$backSteps}") : '';
|
||||
$this->display();
|
||||
}
|
||||
|
||||
@@ -364,32 +440,51 @@ class convert extends control
|
||||
* Init jira user.
|
||||
*
|
||||
* @param string $method db|file
|
||||
* @param string $dbName
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function initJiraUser(string $method = 'db')
|
||||
public function initJiraUser(string $method = 'db', string $dbName = '')
|
||||
{
|
||||
$this->app->loadLang('user');
|
||||
$stepStatus = $this->session->stepStatus;
|
||||
$stepStatus = $stepStatus ? json_decode($stepStatus, true) : array();
|
||||
|
||||
if($_POST)
|
||||
{
|
||||
$errors = array();
|
||||
if(!$this->post->password1) $errors['password1'][] = sprintf($this->lang->error->notempty, $this->lang->user->password);
|
||||
if(!$this->post->password2) $errors['password2'][] = sprintf($this->lang->error->notempty, $this->lang->user->abbr->password2);
|
||||
if(!$this->post->password2) $errors['password2'][] = sprintf($this->lang->error->notempty, $this->lang->user->password2);
|
||||
if($this->post->password1 && strlen(trim($this->post->password1)) < 6) $errors['password1'][] = $this->lang->convert->jira->passwordLess;
|
||||
if($this->post->password1 && $this->post->password2 && $this->post->password1 != $this->post->password2) $errors['password2'][] = $this->lang->convert->jira->passwordDifferent;
|
||||
if($errors) return $this->send(array('result' => 'fail', 'message' => $errors));
|
||||
|
||||
$jiraUser['password'] = md5($this->post->password1);
|
||||
$jiraUser['group'] = $this->post->group;
|
||||
$jiraUser['mode'] = $this->post->mode;
|
||||
$this->session->set('jiraUser', $jiraUser);
|
||||
|
||||
$stepStatus['user'] = 'done';
|
||||
$this->session->set('stepStatus', json_encode($stepStatus));
|
||||
|
||||
return $this->send(array('result' => 'success', 'load' => inlink('importJira', "method={$method}")));
|
||||
}
|
||||
|
||||
$this->view->title = $this->lang->convert->jira->initJiraUser;
|
||||
$this->view->groups = $this->loadModel('group')->getPairs();
|
||||
$this->view->method = $method;
|
||||
$jiraRelation = $this->session->jiraRelation;
|
||||
$jiraRelation = $jiraRelation ? json_decode($jiraRelation, true) : array();
|
||||
if(empty($jiraRelation)) $this->locate(inlink('index'));
|
||||
|
||||
$stepList = $this->convert->getJiraStepList($jiraRelation);
|
||||
$backSteps = $this->getBackKey($stepList, 'user');
|
||||
|
||||
$this->view->title = $this->lang->convert->jira->initJiraUser;
|
||||
$this->view->method = $method;
|
||||
$this->view->dbName = $dbName;
|
||||
$this->view->step = 'user';
|
||||
$this->view->stepList = $stepList;
|
||||
$this->view->stepStatus = $stepStatus;
|
||||
$this->view->backUrl = $backSteps ? inlink('mapJira2Zentao', "method={$method}&dbName={$dbName}&step={$backSteps}") : '';
|
||||
$this->view->groups = $this->loadModel('group')->getPairs();
|
||||
$this->display();
|
||||
}
|
||||
|
||||
@@ -411,8 +506,7 @@ class convert extends control
|
||||
|
||||
if($mode == 'import')
|
||||
{
|
||||
$importFunc = 'importJiraFrom' . $method;
|
||||
$result = $this->convert->$importFunc($type, $lastID, $createTable);
|
||||
$result = $this->convert->importJiraData($type, $lastID, $createTable);
|
||||
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
|
||||
|
||||
if(!empty($result['finished'])) return $this->send(array('result' => 'finished', 'message' => $this->lang->convert->jira->importSuccessfully));
|
||||
@@ -427,8 +521,23 @@ class convert extends control
|
||||
return $this->send($response);
|
||||
}
|
||||
|
||||
$this->view->title = $this->lang->convert->jira->importJira;
|
||||
$this->view->method = $method;
|
||||
$jiraRelation = $this->session->jiraRelation;
|
||||
$jiraRelation = $jiraRelation ? json_decode($jiraRelation, true) : array();
|
||||
if(empty($jiraRelation)) $this->locate(inlink('index'));
|
||||
|
||||
$stepStatus = $this->session->stepStatus;
|
||||
$stepStatus = $stepStatus ? json_decode($stepStatus, true) : array();
|
||||
|
||||
$stepList = $this->convert->getJiraStepList($jiraRelation);
|
||||
$backSteps = $this->getBackKey($stepList, 'user');
|
||||
|
||||
$this->view->title = $this->lang->convert->jira->importJira;
|
||||
$this->view->method = $method;
|
||||
$this->view->dbName = $this->session->jiraDB;
|
||||
$this->view->step = 'confirme';
|
||||
$this->view->stepList = $stepList;
|
||||
$this->view->stepStatus = $stepStatus;
|
||||
$this->view->backUrl = $backSteps ? inlink('initJiraUser', "method={$method}&dbName={$this->session->jiraDB}") : '';
|
||||
$this->display();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
function importConfluence(event, url, hide)
|
||||
{
|
||||
if(hide === true) $(event.target).hide();
|
||||
|
||||
$('#importResult .importing').removeClass('hidden');
|
||||
|
||||
$.getJSON(url, function(response)
|
||||
{
|
||||
if(response.result == 'finished')
|
||||
{
|
||||
$('#importResult').append("<li class='text-success my-1'>" + response.message + '</li>');
|
||||
$('#importResult .importing').addClass('hidden');
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
className = response.type + 'count';
|
||||
$typeCount = $('#importResult .' + className)
|
||||
if($typeCount.length == 0)
|
||||
{
|
||||
$('#importResult').append("<li class='text-success my-1'>" + response.message + '</li>');
|
||||
}
|
||||
else
|
||||
{
|
||||
count = parseInt($typeCount.html()) + parseInt(response.count);
|
||||
$typeCount.html(count);
|
||||
}
|
||||
|
||||
return importConfluence(event, response.next);
|
||||
}
|
||||
});
|
||||
return false;
|
||||
};
|
||||
@@ -1,32 +1,59 @@
|
||||
let dynamicImporting = langImporting;
|
||||
const intervalId = setInterval(function()
|
||||
{
|
||||
const $dynamicImporting = $('#importResult .dynamicImporting');
|
||||
if($dynamicImporting.length == 0) return;
|
||||
|
||||
let ellipsis = $dynamicImporting.html().replace(langImporting, '');
|
||||
ellipsis += '•';
|
||||
if(ellipsis.length > 12) ellipsis = '';
|
||||
$('#importResult .dynamicImporting').html(langImporting + ' ' + ellipsis);
|
||||
}, 1000);
|
||||
|
||||
function importJira(event, url, hide)
|
||||
{
|
||||
if(hide === true) $(event.target).hide();
|
||||
|
||||
$('#importResult .importing').removeClass('hidden');
|
||||
if($('#importResult .dynamicImporting').length == 0) $('#importResult').append("<li class='dynamicImporting'>" + dynamicImporting + "</li>");
|
||||
|
||||
$.getJSON(url, function(response)
|
||||
$.get(url, function(data)
|
||||
{
|
||||
if(response.result == 'finished')
|
||||
try
|
||||
{
|
||||
$('#importResult').append("<li class='text-success my-1'>" + response.message + '</li>');
|
||||
$('#importResult .importing').addClass('hidden');
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
className = response.type + 'count';
|
||||
$typeCount = $('#importResult .' + className)
|
||||
if($typeCount.length == 0)
|
||||
let response = JSON.parse(data);
|
||||
if(response.result == 'finished')
|
||||
{
|
||||
clearInterval(intervalId);
|
||||
$('#importResult .dynamicImporting').remove();
|
||||
$('#importResult').append("<li class='text-success my-1'>" + response.message + '</li>');
|
||||
$('#importResult .importing').addClass('hidden');
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
count = parseInt($typeCount.html()) + parseInt(response.count);
|
||||
$typeCount.html(count);
|
||||
}
|
||||
const className = response.type + 'count';
|
||||
const $typeCount = $('#importResult .' + className)
|
||||
if($typeCount.length == 0)
|
||||
{
|
||||
dynamicImporting = $('#importResult .dynamicImporting').html();
|
||||
$('#importResult .dynamicImporting').remove();
|
||||
$('#importResult').append("<li class='text-success my-1'>" + response.message + '</li>');
|
||||
}
|
||||
else
|
||||
{
|
||||
const count = parseInt($typeCount.html()) + parseInt(response.count);
|
||||
$typeCount.html(count);
|
||||
}
|
||||
|
||||
return importJira(event, response.next);
|
||||
return importJira(event, response.next);
|
||||
}
|
||||
}
|
||||
catch(e)
|
||||
{
|
||||
clearInterval(intervalId);
|
||||
$('#importResult .dynamicImporting').remove();
|
||||
$('#importResult').append("<li class='text-danger my-1'>" + data + '</li>');
|
||||
}
|
||||
});
|
||||
return false;
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
window.next = function()
|
||||
{
|
||||
$('button[type=submit]').trigger('click');
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
window.next = function()
|
||||
{
|
||||
$('button[type=submit]').trigger('click');
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
window.changeSpace = function(event)
|
||||
{
|
||||
space = $(event.target).val();
|
||||
const link = $.createLink('convert', 'ajaxGetZentaoDocLib', 'spaceType=' + space);
|
||||
$.getJSON(link, function(data)
|
||||
{
|
||||
$(event.target).closest('.form-row').find('[name^=zentaoDocLib]').zui('picker').render(data);
|
||||
$(event.target).closest('.form-row').find('[name^=zentaoDocLib]').zui('picker').$.setValue(data.defaultValue);
|
||||
});
|
||||
}
|
||||
|
||||
window.next = function()
|
||||
{
|
||||
$('button[type=submit]').trigger('click');
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
$(function()
|
||||
{
|
||||
$('.picker-box').last().on('inited', function(){updateItems();});
|
||||
});
|
||||
|
||||
window.next = function()
|
||||
{
|
||||
$('button[type=submit]').trigger('click');
|
||||
}
|
||||
|
||||
window.changeField = function(e)
|
||||
{
|
||||
updateItems();
|
||||
}
|
||||
|
||||
window.updateItems = function()
|
||||
{
|
||||
let chosenFields = [];
|
||||
$("[name^='zentaoField']").each(function()
|
||||
{
|
||||
const field = $(this).val();
|
||||
if(field == 'add_field') return;
|
||||
if(field && chosenFields.indexOf(field) == -1) chosenFields.push(field);
|
||||
});
|
||||
|
||||
let allItems = zui.Picker.query("[name^='zentaoField']")?.options?.items;
|
||||
if(typeof allItems == 'undefined') return;
|
||||
|
||||
let fieldItems = [];
|
||||
for(i = 0; i < allItems.length; i++)
|
||||
{
|
||||
allItems[i].disabled = false;
|
||||
if(chosenFields.includes(allItems[i].value)) allItems[i].disabled = true;
|
||||
fieldItems[allItems[i].value] = Object.assign({},allItems[i]);
|
||||
fieldItems[allItems[i].value].i = i;
|
||||
}
|
||||
|
||||
$("[name^='zentaoField']").each(function()
|
||||
{
|
||||
const $field = $(this).zui('picker');
|
||||
const field = $(this).val();
|
||||
let currentFieldItems = JSON.parse(JSON.stringify(allItems));
|
||||
if(field) currentFieldItems[fieldItems[field].i].disabled = false;
|
||||
$field.render({items: currentFieldItems});
|
||||
});
|
||||
}
|
||||
+114
-67
@@ -9,7 +9,7 @@
|
||||
* @version $Id: en.php 4129 2013-01-18 01:58:14Z wwccss $
|
||||
* @link https://www.zentao.net
|
||||
*/
|
||||
$lang->convert->common = 'Importiert';
|
||||
$lang->convert->common = 'Imported';
|
||||
$lang->convert->index = 'Home';
|
||||
|
||||
$lang->convert->start = 'Start';
|
||||
@@ -18,112 +18,128 @@ $lang->convert->desc = <<<EOT
|
||||
<strong>There are risks in the conversion, so it is strongly recommended that you back up your databse and relavant files before conversion, and make sure that no one is using either system.</strong>
|
||||
EOT;
|
||||
|
||||
$lang->convert->setConfig = 'Source Konfiguration';
|
||||
$lang->convert->setBugfree = 'Bugfree Konfiguration';
|
||||
$lang->convert->setRedmine = 'Redmine Konfiguration';
|
||||
$lang->convert->checkBugFree = 'Prüfe Bugfree';
|
||||
$lang->convert->checkRedmine = 'Prüfe Redmine';
|
||||
$lang->convert->convertRedmine = 'Konvertiere Redmine';
|
||||
$lang->convert->convertBugFree = 'Konvertiere BugFree';
|
||||
$lang->convert->setConfig = 'Source Config';
|
||||
$lang->convert->setBugfree = 'Bugfree Config';
|
||||
$lang->convert->setRedmine = 'Redmine Config';
|
||||
$lang->convert->checkBugFree = 'Check Bugfree';
|
||||
$lang->convert->checkRedmine = 'Check Redmine';
|
||||
$lang->convert->convertRedmine = 'Convert Redmine';
|
||||
$lang->convert->convertBugFree = 'Convert BugFree';
|
||||
|
||||
$lang->convert->selectSource = 'Quellsystem und Version wählen';
|
||||
$lang->convert->mustSelectSource = "Sie müssen eine Quellsystem wählen.";
|
||||
$lang->convert->selectSource = 'Select source system and its version';
|
||||
$lang->convert->mustSelectSource = "You must select a source system.";
|
||||
|
||||
$lang->convert->direction = "{$lang->executionCommon} konvertieren nach";
|
||||
$lang->convert->questionTypeOfRedmine = 'Typ in Redmine';
|
||||
$lang->convert->aimTypeOfZentao = 'Konvertieren nach Typ in Zentao';
|
||||
$lang->convert->direction = "{$lang->executionCommon} converted to";
|
||||
$lang->convert->questionTypeOfRedmine = 'Type in Redmine';
|
||||
$lang->convert->aimTypeOfZentao = 'Convert to Type in ZenTao';
|
||||
|
||||
$lang->convert->jiraUserMode = array();
|
||||
$lang->convert->jiraUserMode['account'] = 'Use Jira Account';
|
||||
$lang->convert->jiraUserMode['email'] = 'Use Jira Email';
|
||||
|
||||
$lang->convert->confluenceUserMode = array();
|
||||
$lang->convert->confluenceUserMode['account'] = 'Use Confluence Account';
|
||||
$lang->convert->confluenceUserMode['email'] = 'Use Confluence Email';
|
||||
|
||||
$lang->convert->directionList['bug'] = 'Bug';
|
||||
$lang->convert->directionList['task'] = 'Aufgabe';
|
||||
$lang->convert->directionList['story'] = 'Story';
|
||||
$lang->convert->directionList['task'] = 'Task';
|
||||
$lang->convert->directionList['story'] = $lang->SRCommon;
|
||||
|
||||
$lang->convert->sourceList['BugFree'] = array('bugfree_1' => '1.x', 'bugfree_2' => '2.x');
|
||||
$lang->convert->sourceList['Redmine'] = array('Redmine_1.1' => '1.1');
|
||||
|
||||
$lang->convert->setting = 'Einstellungen';
|
||||
$lang->convert->checkConfig = 'Prüfe Einstellungen';
|
||||
$lang->convert->setting = 'Settings';
|
||||
$lang->convert->checkConfig = 'Check Settings';
|
||||
$lang->convert->add = 'Add';
|
||||
$lang->convert->title = 'Title';
|
||||
|
||||
$lang->convert->ok = '<span class="text-success"><i class="icon-check-sign"></i> OK </span>';
|
||||
$lang->convert->fail = '<span class="text-danger"><i class="icon-remove-sign"></i> Fehlgeschlagen</span>';
|
||||
$lang->convert->fail = '<span class="text-danger"><i class="icon-remove-sign"></i> Failed</span>';
|
||||
|
||||
$lang->convert->dbHost = 'Datenbank Server';
|
||||
$lang->convert->dbHost = 'Database Server';
|
||||
$lang->convert->dbPort = 'Server Port';
|
||||
$lang->convert->dbUser = 'Datenbank User Name';
|
||||
$lang->convert->dbPassword = 'Datenbank Passwort';
|
||||
$lang->convert->dbName = 'Datenbank benutzt in %s';
|
||||
$lang->convert->dbCharset = '%s Datenbank Code';
|
||||
$lang->convert->dbPrefix = '%s Tabellen Prefix';
|
||||
$lang->convert->installPath = '%s Installationspfad';
|
||||
$lang->convert->dbUser = 'Database User Name';
|
||||
$lang->convert->dbPassword = 'Database Password';
|
||||
$lang->convert->dbName = 'Database used in %s';
|
||||
$lang->convert->dbCharset = '%s Database Coding';
|
||||
$lang->convert->dbPrefix = '%s Table Prefix';
|
||||
$lang->convert->installPath = '%s Installation Root Directory';
|
||||
|
||||
$lang->convert->checkDB = 'Datenbank';
|
||||
$lang->convert->checkTable = 'Tabelle';
|
||||
$lang->convert->checkPath = 'Installationspfad';
|
||||
$lang->convert->checkDB = 'Database';
|
||||
$lang->convert->checkTable = 'Table';
|
||||
$lang->convert->checkPath = 'Installation Path';
|
||||
|
||||
$lang->convert->execute = 'Konvertieren';
|
||||
$lang->convert->item = 'Objekt konvertiert';
|
||||
$lang->convert->count = 'Zähler';
|
||||
$lang->convert->execute = 'Convert';
|
||||
$lang->convert->item = 'Item Converted';
|
||||
$lang->convert->count = 'No.';
|
||||
$lang->convert->info = 'Info';
|
||||
|
||||
$lang->convert->bugfree = new stdclass();
|
||||
$lang->convert->bugfree->users = 'Benutzer';
|
||||
$lang->convert->bugfree->users = 'User';
|
||||
$lang->convert->bugfree->executions = $lang->executionCommon;
|
||||
$lang->convert->bugfree->modules = 'Modul';
|
||||
$lang->convert->bugfree->modules = 'Module';
|
||||
$lang->convert->bugfree->bugs = 'Bug';
|
||||
$lang->convert->bugfree->cases = 'Testfälle';
|
||||
$lang->convert->bugfree->results = 'Ergebnis';
|
||||
$lang->convert->bugfree->actions = 'Verlauf';
|
||||
$lang->convert->bugfree->files = 'Datei';
|
||||
$lang->convert->bugfree->cases = 'Test Case';
|
||||
$lang->convert->bugfree->results = 'Result';
|
||||
$lang->convert->bugfree->actions = 'History';
|
||||
$lang->convert->bugfree->files = 'Files';
|
||||
|
||||
$lang->convert->redmine = new stdclass();
|
||||
$lang->convert->redmine->users = 'Benutzer';
|
||||
$lang->convert->redmine->groups = 'Gruppe';
|
||||
$lang->convert->redmine->users = 'User';
|
||||
$lang->convert->redmine->groups = 'Group';
|
||||
$lang->convert->redmine->products = $lang->productCommon;
|
||||
$lang->convert->redmine->executions = $lang->executionCommon;
|
||||
$lang->convert->redmine->stories = 'Story';
|
||||
$lang->convert->redmine->tasks = 'Aufgabe';
|
||||
$lang->convert->redmine->tasks = 'Task';
|
||||
$lang->convert->redmine->bugs = 'Bug';
|
||||
$lang->convert->redmine->productPlans = $lang->productCommon . 'Plan';
|
||||
$lang->convert->redmine->teams = 'Team';
|
||||
$lang->convert->redmine->releases = 'Release';
|
||||
$lang->convert->redmine->builds = 'Build';
|
||||
$lang->convert->redmine->docLibs = 'Dok Bibliothek';
|
||||
$lang->convert->redmine->docs = 'Dok';
|
||||
$lang->convert->redmine->files = 'Datei';
|
||||
$lang->convert->redmine->docLibs = 'Doc Lib';
|
||||
$lang->convert->redmine->docs = 'Doc';
|
||||
$lang->convert->redmine->files = 'Files';
|
||||
|
||||
$lang->convert->errorFileNotExits = 'Datei %s nicht gefunden.';
|
||||
$lang->convert->errorUserExists = 'Benutzer %s existiert.';
|
||||
$lang->convert->errorGroupExists = 'Gruppe %s existiert.';
|
||||
$lang->convert->errorBuildExists = 'Build %s existiert.';
|
||||
$lang->convert->errorReleaseExists = 'Release %s existiert.';
|
||||
$lang->convert->errorCopyFailed = 'Datei %s Kopiervorgang fehlgeschlagen.';
|
||||
$lang->convert->errorFileNotExits = 'File %s is not found.';
|
||||
$lang->convert->errorUserExists = 'User %s existed.';
|
||||
$lang->convert->errorGroupExists = 'Group %s existed.';
|
||||
$lang->convert->errorBuildExists = 'Build %s existed.';
|
||||
$lang->convert->errorReleaseExists = 'Release %s existed.';
|
||||
$lang->convert->errorCopyFailed = 'File %s copy failed.';
|
||||
|
||||
$lang->convert->setParam = 'Bitte setzen Sie die Parameter.';
|
||||
$lang->convert->setParam = 'Set parameters.';
|
||||
|
||||
$lang->convert->statusType = new stdclass();
|
||||
$lang->convert->priType = new stdclass();
|
||||
|
||||
$lang->convert->aimType = 'Konvertiere Probleme';
|
||||
$lang->convert->statusType->bug = 'Konvertiere Status (Bug Status)';
|
||||
$lang->convert->statusType->story = 'Konvertiere Status (Story Status)';
|
||||
$lang->convert->statusType->task = 'Konvertiere Status (Aufgaben Status)';
|
||||
$lang->convert->priType->bug = 'Konvertiere Priorität (Bug Status)';
|
||||
$lang->convert->priType->story = 'Konvertiere Priorität (Story Status)';
|
||||
$lang->convert->priType->task = 'Konvertiere Priorität (Aufgaben Status)';
|
||||
$lang->convert->aimType = 'Convert Issue';
|
||||
$lang->convert->statusType->bug = 'Convert Status (Bug Status)';
|
||||
$lang->convert->statusType->story = 'Convert Status (Story Status)';
|
||||
$lang->convert->statusType->task = 'Convert Status (Task Status)';
|
||||
$lang->convert->priType->bug = 'Convert Priority (Bug Status)';
|
||||
$lang->convert->priType->story = 'Convert Priority (Story Status)';
|
||||
$lang->convert->priType->task = 'Convert Priority (Task Status)';
|
||||
|
||||
$lang->convert->issue = new stdclass();
|
||||
$lang->convert->issue->redmine = 'Redmine';
|
||||
$lang->convert->issue->zentao = 'ZenTao';
|
||||
$lang->convert->issue->goto = 'Konvertieren nach';
|
||||
$lang->convert->issue->goto = 'Convert To';
|
||||
|
||||
$lang->convert->jira = new stdclass();
|
||||
$lang->convert->jira->method = 'Chose Import Method';
|
||||
$lang->convert->jira->back = 'Back';
|
||||
$lang->convert->jira->next = 'Next';
|
||||
$lang->convert->jira->importFromDB = 'Import From Database';
|
||||
$lang->convert->jira->importFromFile = 'Import From File';
|
||||
$lang->convert->jira->mapJira2Zentao = 'Map Jira To Zentao';
|
||||
$lang->convert->jira->database = 'Jira Database';
|
||||
$lang->convert->jira->domain = 'Jira Domain';
|
||||
$lang->convert->jira->admin = 'Jira Account';
|
||||
$lang->convert->jira->token = 'Jira Passwork/Token';
|
||||
$lang->convert->jira->dbNameNotice = "Please enter the Jira database name.";
|
||||
$lang->convert->jira->importNotice = 'Notice: Importing data is risky! Make sure to complete the following steps in sequence before merging.';
|
||||
$lang->convert->jira->accountNotice = 'Those who use email will use the string before @ as their username, and those exceeding 30 characters will be truncated.';
|
||||
$lang->convert->jira->apiError = 'Unable to connect to Jira API interface, please check your Jira domain name and account, password/Token information.';
|
||||
$lang->convert->jira->dbDesc = 'If your Jira uses MySQL database, please choose this way.';
|
||||
$lang->convert->jira->fileDesc = 'Choose this method if your Jira uses a non-MySQL database.';
|
||||
$lang->convert->jira->jiraObject = 'Jira Issues';
|
||||
@@ -138,6 +154,20 @@ $lang->convert->jira->storyStatus = 'Zentao Story Status';
|
||||
$lang->convert->jira->storyStage = 'Zentao Story Stage';
|
||||
$lang->convert->jira->bugStatus = 'Zentao Bug Status';
|
||||
$lang->convert->jira->taskStatus = 'Zentao Task Status';
|
||||
$lang->convert->jira->objectField = 'Field mapping';
|
||||
$lang->convert->jira->objectStatus = 'Status mapping';
|
||||
$lang->convert->jira->objectAction = 'Action mapping';
|
||||
$lang->convert->jira->objectResolution = 'Resolution mapping';
|
||||
$lang->convert->jira->jiraField = 'Jira %s Field';
|
||||
$lang->convert->jira->jiraStatus = 'Jira %s Status';
|
||||
$lang->convert->jira->jiraAction = 'Jira %s Action';
|
||||
$lang->convert->jira->jiraResolution = 'Jira %s Resolution';
|
||||
$lang->convert->jira->zentaoField = 'Zentao %s Field';
|
||||
$lang->convert->jira->zentaoStatus = 'Zentao %s Status';
|
||||
$lang->convert->jira->zentaoStage = 'Zentao %s Stage';
|
||||
$lang->convert->jira->zentaoAction = 'Zentao %s Action';
|
||||
$lang->convert->jira->zentaoReason = 'Zentao %s Closed Reason';
|
||||
$lang->convert->jira->zentaoResolution = 'Zentao %s Resolution';
|
||||
$lang->convert->jira->initJiraUser = 'Init Jira User';
|
||||
$lang->convert->jira->importJira = 'Import Jira';
|
||||
$lang->convert->jira->start = 'Start';
|
||||
@@ -147,8 +177,13 @@ $lang->convert->jira->invalidDB = 'Invalid database name!';
|
||||
$lang->convert->jira->invalidTable = 'This database is not a Jira database!';
|
||||
$lang->convert->jira->notReadAndWrite = 'Please modify the %s directory permissions!';
|
||||
$lang->convert->jira->notExistEntities = 'The %s file does not exist!';
|
||||
$lang->convert->jira->passwordNotice = 'Set the default password of Jira users after they are imported into ZenTao. Users can modify the password in ZenTao later.';
|
||||
$lang->convert->jira->groupNotice = 'Set the default permission grouping of Jira users after importing into ZenTao.';
|
||||
$lang->convert->jira->passwordNotice = 'Set the default password of users after they are imported into ZenTao. Users can modify the password in ZenTao later.';
|
||||
$lang->convert->jira->groupNotice = 'Set the default permission grouping of users after importing into ZenTao.';
|
||||
$lang->convert->jira->mapObjectNotice = 'When selecting a mapping relationship, if you choose to add a new workflow, a new object will be automatically created in the workflow after import.';
|
||||
$lang->convert->jira->mapFieldNotice = 'The built-in fields in JIRA have been automatically matched. Please select the mapping relationship for custom fields. When selecting the mapping relationship, if you choose to add, new fields will be automatically created after import, and unselected fields will not be imported.';
|
||||
$lang->convert->jira->mapStatusNotice = 'When selecting a mapping relationship, unselected states are imported and automatically matched to %s.';
|
||||
$lang->convert->jira->mapReasonNotice = 'When selecting a mapping relationship, if "Add" is chosen, a new solution will be automatically created after import. Solutions not selected will be matched as "Completed" by default after import.';
|
||||
$lang->convert->jira->mapRelationNotice = 'When selecting a mapping relationship, if you choose to add, an association relationship will be automatically created after import, and unselected associations will not be imported.';
|
||||
$lang->convert->jira->passwordDifferent = 'Password do not match!';
|
||||
$lang->convert->jira->passwordEmpty = 'Password can not be empty!';
|
||||
$lang->convert->jira->passwordLess = 'Password must not be less than six characters!';
|
||||
@@ -157,11 +192,14 @@ $lang->convert->jira->importResult = "Import <strong class='text-red'>%s</
|
||||
$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->restore = 'The last import of information was not completed. Do you want to continue filling in from the last process?';
|
||||
|
||||
$lang->convert->jira->zentaoObjectList[''] = '';
|
||||
$lang->convert->jira->zentaoObjectList['task'] = 'Task';
|
||||
$lang->convert->jira->zentaoObjectList[''] = '';
|
||||
$lang->convert->jira->zentaoObjectList['epic'] = 'Epic';
|
||||
$lang->convert->jira->zentaoObjectList['requirement'] = 'Requirement';
|
||||
$lang->convert->jira->zentaoObjectList['story'] = 'Story';
|
||||
$lang->convert->jira->zentaoObjectList['task'] = 'Task';
|
||||
$lang->convert->jira->zentaoObjectList['testcase'] = 'Case';
|
||||
$lang->convert->jira->zentaoObjectList['bug'] = 'Bug';
|
||||
|
||||
$lang->convert->jira->zentaoLinkTypeList['subTaskLink'] = 'Parent-Child Task';
|
||||
@@ -169,10 +207,11 @@ $lang->convert->jira->zentaoLinkTypeList['subStoryLink'] = 'Parent-Child Story';
|
||||
$lang->convert->jira->zentaoLinkTypeList['duplicate'] = 'Duplicate';
|
||||
$lang->convert->jira->zentaoLinkTypeList['relates'] = 'Relates';
|
||||
|
||||
$lang->convert->jira->steps[1] = 'Objects';
|
||||
$lang->convert->jira->steps[2] = 'Relates';
|
||||
$lang->convert->jira->steps[3] = 'Resolution';
|
||||
$lang->convert->jira->steps[4] = 'Status';
|
||||
$lang->convert->jira->steps['object'] = 'Objects';
|
||||
$lang->convert->jira->steps['objectData'] = 'Object Data';
|
||||
$lang->convert->jira->steps['relation'] = 'Relation';
|
||||
$lang->convert->jira->steps['user'] = 'Import Jira User';
|
||||
$lang->convert->jira->steps['confirme'] = 'Import Data';
|
||||
|
||||
$lang->convert->jira->importSteps['db'][1] = 'Backup ZenTao database, backup Jira database.';
|
||||
$lang->convert->jira->importSteps['db'][2] = 'Using ZenTao when importing data will cause performance pressure on the server, please try to ensure that no one is using ZenTao when importing data.';
|
||||
@@ -184,12 +223,20 @@ $lang->convert->jira->importSteps['file'][1] = 'Backup ZenTao database, backup J
|
||||
$lang->convert->jira->importSteps['file'][2] = 'Using ZenTao when importing data will cause performance pressure on the server, please try to ensure that no one is using ZenTao when importing data.';
|
||||
$lang->convert->jira->importSteps['file'][3] = "Put the Jira backup file <strong class='text-red'>entities.xml</strong> under <strong class='text-red'>%s</strong>.";
|
||||
$lang->convert->jira->importSteps['file'][4] = "Put the Jira <strong class='text-red'> attachments</strong> directory under <strong class='text-red'>%s</strong>, Make sure you have enough disk space on the ZenTao server.";
|
||||
$lang->convert->jira->importSteps['file'][5] = "After the above steps are completed, click Next.";
|
||||
$lang->convert->jira->importSteps['file'][5] = "To ensure the integrity of the imported data, please enter the domain name, administrator account, password/ToKen of the current Jira environment.";
|
||||
$lang->convert->jira->importSteps['file'][6] = "After the above steps are completed, click Next.";
|
||||
|
||||
$lang->convert->jira->objectList['user'] = 'User';
|
||||
$lang->convert->jira->objectList['project'] = 'Project';
|
||||
$lang->convert->jira->objectList['issue'] = 'Issue';
|
||||
$lang->convert->jira->objectList['build'] = 'Build';
|
||||
$lang->convert->jira->objectList['issuelink'] = 'Issue Link';
|
||||
$lang->convert->jira->objectList['worklog'] = 'Worklog';
|
||||
$lang->convert->jira->objectList['action'] = 'Action';
|
||||
$lang->convert->jira->objectList['file'] = 'File';
|
||||
|
||||
$lang->convert->jira->buildinFields = array();
|
||||
$lang->convert->jira->buildinFields['summary'] = array('name'=> 'Summary', 'jiraField' => 'SUMMARY', 'control' => 'input', 'type' => 'varchar', 'length' => '255');
|
||||
$lang->convert->jira->buildinFields['pri'] = array('name'=> 'Pri', 'jiraField' => 'PRIORITY', 'control' => 'select', 'type' => 'int', 'length' => '3');
|
||||
$lang->convert->jira->buildinFields['resolution'] = array('name'=> 'Resolution', 'jiraField' => 'RESOLUTION', 'control' => 'select', 'type' => 'varchar', 'length' => '255');
|
||||
$lang->convert->jira->buildinFields['desc'] = array('name'=> 'Desc', 'jiraField' => 'DESCRIPTION', 'control' => 'richtext', 'type' => 'mediumtext', 'length' => '0');
|
||||
|
||||
+57
-10
@@ -33,15 +33,25 @@ $lang->convert->direction = "{$lang->executionCommon} converted to";
|
||||
$lang->convert->questionTypeOfRedmine = 'Type in Redmine';
|
||||
$lang->convert->aimTypeOfZentao = 'Convert to Type in ZenTao';
|
||||
|
||||
$lang->convert->jiraUserMode = array();
|
||||
$lang->convert->jiraUserMode['account'] = 'Use Jira Account';
|
||||
$lang->convert->jiraUserMode['email'] = 'Use Jira Email';
|
||||
|
||||
$lang->convert->confluenceUserMode = array();
|
||||
$lang->convert->confluenceUserMode['account'] = 'Use Confluence Account';
|
||||
$lang->convert->confluenceUserMode['email'] = 'Use Confluence Email';
|
||||
|
||||
$lang->convert->directionList['bug'] = 'Bug';
|
||||
$lang->convert->directionList['task'] = 'Task';
|
||||
$lang->convert->directionList['story'] = 'Story';
|
||||
$lang->convert->directionList['story'] = $lang->SRCommon;
|
||||
|
||||
$lang->convert->sourceList['BugFree'] = array('bugfree_1' => '1.x', 'bugfree_2' => '2.x');
|
||||
$lang->convert->sourceList['Redmine'] = array('Redmine_1.1' => '1.1');
|
||||
|
||||
$lang->convert->setting = 'Settings';
|
||||
$lang->convert->checkConfig = 'Check Settings';
|
||||
$lang->convert->add = 'Add';
|
||||
$lang->convert->title = 'Title';
|
||||
|
||||
$lang->convert->ok = '<span class="text-success"><i class="icon-check-sign"></i> OK </span>';
|
||||
$lang->convert->fail = '<span class="text-danger"><i class="icon-remove-sign"></i> Failed</span>';
|
||||
@@ -117,13 +127,19 @@ $lang->convert->issue->goto = 'Convert To';
|
||||
|
||||
$lang->convert->jira = new stdclass();
|
||||
$lang->convert->jira->method = 'Chose Import Method';
|
||||
$lang->convert->jira->back = 'Back';
|
||||
$lang->convert->jira->next = 'Next';
|
||||
$lang->convert->jira->importFromDB = 'Import From Database';
|
||||
$lang->convert->jira->importFromFile = 'Import From File';
|
||||
$lang->convert->jira->mapJira2Zentao = 'Map Jira To Zentao';
|
||||
$lang->convert->jira->database = 'Jira Database';
|
||||
$lang->convert->jira->domain = 'Jira Domain';
|
||||
$lang->convert->jira->admin = 'Jira Account';
|
||||
$lang->convert->jira->token = 'Jira Passwork/Token';
|
||||
$lang->convert->jira->dbNameNotice = "Please enter the Jira database name.";
|
||||
$lang->convert->jira->importNotice = 'Notice: Importing data is risky! Make sure to complete the following steps in sequence before merging.';
|
||||
$lang->convert->jira->accountNotice = 'Those who use email will use the string before @ as their username, and those exceeding 30 characters will be truncated.';
|
||||
$lang->convert->jira->apiError = 'Unable to connect to Jira API interface, please check your Jira domain name and account, password/Token information.';
|
||||
$lang->convert->jira->dbDesc = 'If your Jira uses MySQL database, please choose this way.';
|
||||
$lang->convert->jira->fileDesc = 'Choose this method if your Jira uses a non-MySQL database.';
|
||||
$lang->convert->jira->jiraObject = 'Jira Issues';
|
||||
@@ -138,6 +154,20 @@ $lang->convert->jira->storyStatus = 'Zentao Story Status';
|
||||
$lang->convert->jira->storyStage = 'Zentao Story Stage';
|
||||
$lang->convert->jira->bugStatus = 'Zentao Bug Status';
|
||||
$lang->convert->jira->taskStatus = 'Zentao Task Status';
|
||||
$lang->convert->jira->objectField = 'Field mapping';
|
||||
$lang->convert->jira->objectStatus = 'Status mapping';
|
||||
$lang->convert->jira->objectAction = 'Action mapping';
|
||||
$lang->convert->jira->objectResolution = 'Resolution mapping';
|
||||
$lang->convert->jira->jiraField = 'Jira %s Field';
|
||||
$lang->convert->jira->jiraStatus = 'Jira %s Status';
|
||||
$lang->convert->jira->jiraAction = 'Jira %s Action';
|
||||
$lang->convert->jira->jiraResolution = 'Jira %s Resolution';
|
||||
$lang->convert->jira->zentaoField = 'Zentao %s Field';
|
||||
$lang->convert->jira->zentaoStatus = 'Zentao %s Status';
|
||||
$lang->convert->jira->zentaoStage = 'Zentao %s Stage';
|
||||
$lang->convert->jira->zentaoAction = 'Zentao %s Action';
|
||||
$lang->convert->jira->zentaoReason = 'Zentao %s Closed Reason';
|
||||
$lang->convert->jira->zentaoResolution = 'Zentao %s Resolution';
|
||||
$lang->convert->jira->initJiraUser = 'Init Jira User';
|
||||
$lang->convert->jira->importJira = 'Import Jira';
|
||||
$lang->convert->jira->start = 'Start';
|
||||
@@ -147,8 +177,13 @@ $lang->convert->jira->invalidDB = 'Invalid database name!';
|
||||
$lang->convert->jira->invalidTable = 'This database is not a Jira database!';
|
||||
$lang->convert->jira->notReadAndWrite = 'Please modify the %s directory permissions!';
|
||||
$lang->convert->jira->notExistEntities = 'The %s file does not exist!';
|
||||
$lang->convert->jira->passwordNotice = 'Set the default password of Jira users after they are imported into ZenTao. Users can modify the password in ZenTao later.';
|
||||
$lang->convert->jira->groupNotice = 'Set the default permission grouping of Jira users after importing into ZenTao.';
|
||||
$lang->convert->jira->passwordNotice = 'Set the default password of users after they are imported into ZenTao. Users can modify the password in ZenTao later.';
|
||||
$lang->convert->jira->groupNotice = 'Set the default permission grouping of users after importing into ZenTao.';
|
||||
$lang->convert->jira->mapObjectNotice = 'When selecting a mapping relationship, if you choose to add a new workflow, a new object will be automatically created in the workflow after import.';
|
||||
$lang->convert->jira->mapFieldNotice = 'The built-in fields in JIRA have been automatically matched. Please select the mapping relationship for custom fields. When selecting the mapping relationship, if you choose to add, new fields will be automatically created after import, and unselected fields will not be imported.';
|
||||
$lang->convert->jira->mapStatusNotice = 'When selecting a mapping relationship, unselected states are imported and automatically matched to %s.';
|
||||
$lang->convert->jira->mapReasonNotice = 'When selecting a mapping relationship, if "Add" is chosen, a new solution will be automatically created after import. Solutions not selected will be matched as "Completed" by default after import.';
|
||||
$lang->convert->jira->mapRelationNotice = 'When selecting a mapping relationship, if you choose to add, an association relationship will be automatically created after import, and unselected associations will not be imported.';
|
||||
$lang->convert->jira->passwordDifferent = 'Password do not match!';
|
||||
$lang->convert->jira->passwordEmpty = 'Password can not be empty!';
|
||||
$lang->convert->jira->passwordLess = 'Password must not be less than six characters!';
|
||||
@@ -157,11 +192,14 @@ $lang->convert->jira->importResult = "Import <strong class='text-red'>%s</
|
||||
$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->restore = 'The last import of information was not completed. Do you want to continue filling in from the last process?';
|
||||
|
||||
$lang->convert->jira->zentaoObjectList[''] = '';
|
||||
$lang->convert->jira->zentaoObjectList['task'] = 'Task';
|
||||
$lang->convert->jira->zentaoObjectList[''] = '';
|
||||
$lang->convert->jira->zentaoObjectList['epic'] = 'Epic';
|
||||
$lang->convert->jira->zentaoObjectList['requirement'] = 'Requirement';
|
||||
$lang->convert->jira->zentaoObjectList['story'] = 'Story';
|
||||
$lang->convert->jira->zentaoObjectList['task'] = 'Task';
|
||||
$lang->convert->jira->zentaoObjectList['testcase'] = 'Case';
|
||||
$lang->convert->jira->zentaoObjectList['bug'] = 'Bug';
|
||||
|
||||
$lang->convert->jira->zentaoLinkTypeList['subTaskLink'] = 'Parent-Child Task';
|
||||
@@ -169,10 +207,11 @@ $lang->convert->jira->zentaoLinkTypeList['subStoryLink'] = 'Parent-Child Story';
|
||||
$lang->convert->jira->zentaoLinkTypeList['duplicate'] = 'Duplicate';
|
||||
$lang->convert->jira->zentaoLinkTypeList['relates'] = 'Relates';
|
||||
|
||||
$lang->convert->jira->steps[1] = 'Objects';
|
||||
$lang->convert->jira->steps[2] = 'Relates';
|
||||
$lang->convert->jira->steps[3] = 'Resolution';
|
||||
$lang->convert->jira->steps[4] = 'Status';
|
||||
$lang->convert->jira->steps['object'] = 'Objects';
|
||||
$lang->convert->jira->steps['objectData'] = 'Object Data';
|
||||
$lang->convert->jira->steps['relation'] = 'Relation';
|
||||
$lang->convert->jira->steps['user'] = 'Import Jira User';
|
||||
$lang->convert->jira->steps['confirme'] = 'Import Data';
|
||||
|
||||
$lang->convert->jira->importSteps['db'][1] = 'Backup ZenTao database, backup Jira database.';
|
||||
$lang->convert->jira->importSteps['db'][2] = 'Using ZenTao when importing data will cause performance pressure on the server, please try to ensure that no one is using ZenTao when importing data.';
|
||||
@@ -184,12 +223,20 @@ $lang->convert->jira->importSteps['file'][1] = 'Backup ZenTao database, backup J
|
||||
$lang->convert->jira->importSteps['file'][2] = 'Using ZenTao when importing data will cause performance pressure on the server, please try to ensure that no one is using ZenTao when importing data.';
|
||||
$lang->convert->jira->importSteps['file'][3] = "Put the Jira backup file <strong class='text-red'>entities.xml</strong> under <strong class='text-red'>%s</strong>.";
|
||||
$lang->convert->jira->importSteps['file'][4] = "Put the Jira <strong class='text-red'> attachments</strong> directory under <strong class='text-red'>%s</strong>, Make sure you have enough disk space on the ZenTao server.";
|
||||
$lang->convert->jira->importSteps['file'][5] = "After the above steps are completed, click Next.";
|
||||
$lang->convert->jira->importSteps['file'][5] = "To ensure the integrity of the imported data, please enter the domain name, administrator account, password/Token of the current Jira environment.";
|
||||
$lang->convert->jira->importSteps['file'][6] = "After the above steps are completed, click Next.";
|
||||
|
||||
$lang->convert->jira->objectList['user'] = 'User';
|
||||
$lang->convert->jira->objectList['project'] = 'Project';
|
||||
$lang->convert->jira->objectList['issue'] = 'Issue';
|
||||
$lang->convert->jira->objectList['build'] = 'Build';
|
||||
$lang->convert->jira->objectList['issuelink'] = 'Issue Link';
|
||||
$lang->convert->jira->objectList['worklog'] = 'Worklog';
|
||||
$lang->convert->jira->objectList['action'] = 'Action';
|
||||
$lang->convert->jira->objectList['file'] = 'File';
|
||||
|
||||
$lang->convert->jira->buildinFields = array();
|
||||
$lang->convert->jira->buildinFields['summary'] = array('name'=> 'Summary', 'jiraField' => 'SUMMARY', 'control' => 'input', 'type' => 'varchar', 'length' => '255');
|
||||
$lang->convert->jira->buildinFields['pri'] = array('name'=> 'Pri', 'jiraField' => 'PRIORITY', 'control' => 'select', 'type' => 'int', 'length' => '3');
|
||||
$lang->convert->jira->buildinFields['resolution'] = array('name'=> 'Resolution', 'jiraField' => 'RESOLUTION', 'control' => 'select', 'type' => 'varchar', 'length' => '255');
|
||||
$lang->convert->jira->buildinFields['desc'] = array('name'=> 'Desc', 'jiraField' => 'DESCRIPTION', 'control' => 'richtext', 'type' => 'mediumtext', 'length' => '0');
|
||||
|
||||
+92
-45
@@ -9,10 +9,10 @@
|
||||
* @version $Id: en.php 4129 2013-01-18 01:58:14Z wwccss $
|
||||
* @link https://www.zentao.net
|
||||
*/
|
||||
$lang->convert->common = 'Importé';
|
||||
$lang->convert->index = 'Accueil';
|
||||
$lang->convert->common = 'Imported';
|
||||
$lang->convert->index = 'Home';
|
||||
|
||||
$lang->convert->start = 'Commencer';
|
||||
$lang->convert->start = 'Start';
|
||||
$lang->convert->desc = <<<EOT
|
||||
<p>Welcome to the System Conversion Wizard, this program will assist you to convert data to ZenTao.</p>
|
||||
<strong>There are risks in the conversion, so it is strongly recommended that you back up your databse and relavant files before conversion, and make sure that no one is using either system.</strong>
|
||||
@@ -26,22 +26,32 @@ $lang->convert->checkRedmine = 'Check Redmine';
|
||||
$lang->convert->convertRedmine = 'Convert Redmine';
|
||||
$lang->convert->convertBugFree = 'Convert BugFree';
|
||||
|
||||
$lang->convert->selectSource = 'Sélectionnez le système source et sa version';
|
||||
$lang->convert->mustSelectSource = "Vous devez sélectionner un système source.";
|
||||
$lang->convert->selectSource = 'Select source system and its version';
|
||||
$lang->convert->mustSelectSource = "You must select a source system.";
|
||||
|
||||
$lang->convert->direction = "{$lang->executionCommon} convertis vers";
|
||||
$lang->convert->questionTypeOfRedmine = 'Type dans Redmine';
|
||||
$lang->convert->aimTypeOfZentao = 'Convertir vers Type dans ZenTao';
|
||||
$lang->convert->direction = "{$lang->executionCommon} converted to";
|
||||
$lang->convert->questionTypeOfRedmine = 'Type in Redmine';
|
||||
$lang->convert->aimTypeOfZentao = 'Convert to Type in ZenTao';
|
||||
|
||||
$lang->convert->jiraUserMode = array();
|
||||
$lang->convert->jiraUserMode['account'] = 'Use Jira Account';
|
||||
$lang->convert->jiraUserMode['email'] = 'Use Jira Email';
|
||||
|
||||
$lang->convert->confluenceUserMode = array();
|
||||
$lang->convert->confluenceUserMode['account'] = 'Use Confluence Account';
|
||||
$lang->convert->confluenceUserMode['email'] = 'Use Confluence Email';
|
||||
|
||||
$lang->convert->directionList['bug'] = 'Bug';
|
||||
$lang->convert->directionList['task'] = 'Task';
|
||||
$lang->convert->directionList['story'] = 'Story';
|
||||
$lang->convert->directionList['story'] = $lang->SRCommon;
|
||||
|
||||
$lang->convert->sourceList['BugFree'] = array('bugfree_1' => '1.x', 'bugfree_2' => '2.x');
|
||||
$lang->convert->sourceList['Redmine'] = array('Redmine_1.1' => '1.1');
|
||||
|
||||
$lang->convert->setting = 'Paramètres';
|
||||
$lang->convert->checkConfig = 'Vérifier les paramètres';
|
||||
$lang->convert->setting = 'Settings';
|
||||
$lang->convert->checkConfig = 'Check Settings';
|
||||
$lang->convert->add = 'Add';
|
||||
$lang->convert->title = 'Title';
|
||||
|
||||
$lang->convert->ok = '<span class="text-success"><i class="icon-check-sign"></i> OK </span>';
|
||||
$lang->convert->fail = '<span class="text-danger"><i class="icon-remove-sign"></i> Failed</span>';
|
||||
@@ -50,7 +60,7 @@ $lang->convert->dbHost = 'Database Server';
|
||||
$lang->convert->dbPort = 'Server Port';
|
||||
$lang->convert->dbUser = 'Database User Name';
|
||||
$lang->convert->dbPassword = 'Database Password';
|
||||
$lang->convert->dbName = 'Database utilisée dans %s';
|
||||
$lang->convert->dbName = 'Database used in %s';
|
||||
$lang->convert->dbCharset = '%s Database Coding';
|
||||
$lang->convert->dbPrefix = '%s Table Prefix';
|
||||
$lang->convert->installPath = '%s Installation Root Directory';
|
||||
@@ -59,9 +69,9 @@ $lang->convert->checkDB = 'Database';
|
||||
$lang->convert->checkTable = 'Table';
|
||||
$lang->convert->checkPath = 'Installation Path';
|
||||
|
||||
$lang->convert->execute = 'Convertir';
|
||||
$lang->convert->item = 'Item Convertis';
|
||||
$lang->convert->count = 'Non.';
|
||||
$lang->convert->execute = 'Convert';
|
||||
$lang->convert->item = 'Item Converted';
|
||||
$lang->convert->count = 'No.';
|
||||
$lang->convert->info = 'Info';
|
||||
|
||||
$lang->convert->bugfree = new stdclass();
|
||||
@@ -69,14 +79,14 @@ $lang->convert->bugfree->users = 'User';
|
||||
$lang->convert->bugfree->executions = $lang->executionCommon;
|
||||
$lang->convert->bugfree->modules = 'Module';
|
||||
$lang->convert->bugfree->bugs = 'Bug';
|
||||
$lang->convert->bugfree->cases = 'CasTests';
|
||||
$lang->convert->bugfree->results = 'Résultats';
|
||||
$lang->convert->bugfree->actions = 'Historique';
|
||||
$lang->convert->bugfree->files = 'Fichiers';
|
||||
$lang->convert->bugfree->cases = 'Test Case';
|
||||
$lang->convert->bugfree->results = 'Result';
|
||||
$lang->convert->bugfree->actions = 'History';
|
||||
$lang->convert->bugfree->files = 'Files';
|
||||
|
||||
$lang->convert->redmine = new stdclass();
|
||||
$lang->convert->redmine->users = 'User';
|
||||
$lang->convert->redmine->groups = 'Groupe';
|
||||
$lang->convert->redmine->groups = 'Group';
|
||||
$lang->convert->redmine->products = $lang->productCommon;
|
||||
$lang->convert->redmine->executions = $lang->executionCommon;
|
||||
$lang->convert->redmine->stories = 'Story';
|
||||
@@ -88,42 +98,48 @@ $lang->convert->redmine->releases = 'Release';
|
||||
$lang->convert->redmine->builds = 'Build';
|
||||
$lang->convert->redmine->docLibs = 'Doc Lib';
|
||||
$lang->convert->redmine->docs = 'Doc';
|
||||
$lang->convert->redmine->files = 'Fichiers';
|
||||
$lang->convert->redmine->files = 'Files';
|
||||
|
||||
$lang->convert->errorFileNotExits = 'Fichier %s non trouvé.';
|
||||
$lang->convert->errorUserExists = 'Utilisation %s existant.';
|
||||
$lang->convert->errorGroupExists = 'Groupe %s existant.';
|
||||
$lang->convert->errorBuildExists = 'Build %s existant.';
|
||||
$lang->convert->errorReleaseExists = 'Release %s existante.';
|
||||
$lang->convert->errorCopyFailed = 'Echec de la copie du fichier %s.';
|
||||
$lang->convert->errorFileNotExits = 'File %s is not found.';
|
||||
$lang->convert->errorUserExists = 'User %s existed.';
|
||||
$lang->convert->errorGroupExists = 'Group %s existed.';
|
||||
$lang->convert->errorBuildExists = 'Build %s existed.';
|
||||
$lang->convert->errorReleaseExists = 'Release %s existed.';
|
||||
$lang->convert->errorCopyFailed = 'File %s copy failed.';
|
||||
|
||||
$lang->convert->setParam = 'Fixer les paramètres.';
|
||||
$lang->convert->setParam = 'Set parameters.';
|
||||
|
||||
$lang->convert->statusType = new stdclass();
|
||||
$lang->convert->priType = new stdclass();
|
||||
|
||||
$lang->convert->aimType = 'Problème de conversion';
|
||||
$lang->convert->statusType->bug = 'Convert Statut (Bug Statut)';
|
||||
$lang->convert->statusType->story = 'Convert Statut (Story Statut)';
|
||||
$lang->convert->statusType->task = 'Convert Statut (Task Statut)';
|
||||
$lang->convert->priType->bug = 'Convert Priorité (Bug Statut)';
|
||||
$lang->convert->priType->story = 'Convert Priorité (Story Statut)';
|
||||
$lang->convert->priType->task = 'Convert Priorité (Task Statut)';
|
||||
$lang->convert->aimType = 'Convert Issue';
|
||||
$lang->convert->statusType->bug = 'Convert Status (Bug Status)';
|
||||
$lang->convert->statusType->story = 'Convert Status (Story Status)';
|
||||
$lang->convert->statusType->task = 'Convert Status (Task Status)';
|
||||
$lang->convert->priType->bug = 'Convert Priority (Bug Status)';
|
||||
$lang->convert->priType->story = 'Convert Priority (Story Status)';
|
||||
$lang->convert->priType->task = 'Convert Priority (Task Status)';
|
||||
|
||||
$lang->convert->issue = new stdclass();
|
||||
$lang->convert->issue->redmine = 'Redmine';
|
||||
$lang->convert->issue->zentao = 'ZenTao';
|
||||
$lang->convert->issue->goto = 'Convertir vers';
|
||||
$lang->convert->issue->goto = 'Convert To';
|
||||
|
||||
$lang->convert->jira = new stdclass();
|
||||
$lang->convert->jira->method = 'Chose Import Method';
|
||||
$lang->convert->jira->back = 'Back';
|
||||
$lang->convert->jira->next = 'Next';
|
||||
$lang->convert->jira->importFromDB = 'Import From Database';
|
||||
$lang->convert->jira->importFromFile = 'Import From File';
|
||||
$lang->convert->jira->mapJira2Zentao = 'Map Jira To Zentao';
|
||||
$lang->convert->jira->database = 'Jira Database';
|
||||
$lang->convert->jira->domain = 'Jira Domain';
|
||||
$lang->convert->jira->admin = 'Jira Account';
|
||||
$lang->convert->jira->token = 'Jira Passwork/Token';
|
||||
$lang->convert->jira->dbNameNotice = "Please enter the Jira database name.";
|
||||
$lang->convert->jira->importNotice = 'Notice: Importing data is risky! Make sure to complete the following steps in sequence before merging.';
|
||||
$lang->convert->jira->accountNotice = 'Those who use email will use the string before @ as their username, and those exceeding 30 characters will be truncated.';
|
||||
$lang->convert->jira->apiError = 'Unable to connect to Jira API interface, please check your Jira domain name and account, password/Token information.';
|
||||
$lang->convert->jira->dbDesc = 'If your Jira uses MySQL database, please choose this way.';
|
||||
$lang->convert->jira->fileDesc = 'Choose this method if your Jira uses a non-MySQL database.';
|
||||
$lang->convert->jira->jiraObject = 'Jira Issues';
|
||||
@@ -138,6 +154,20 @@ $lang->convert->jira->storyStatus = 'Zentao Story Status';
|
||||
$lang->convert->jira->storyStage = 'Zentao Story Stage';
|
||||
$lang->convert->jira->bugStatus = 'Zentao Bug Status';
|
||||
$lang->convert->jira->taskStatus = 'Zentao Task Status';
|
||||
$lang->convert->jira->objectField = 'Field mapping';
|
||||
$lang->convert->jira->objectStatus = 'Status mapping';
|
||||
$lang->convert->jira->objectAction = 'Action mapping';
|
||||
$lang->convert->jira->objectResolution = 'Resolution mapping';
|
||||
$lang->convert->jira->jiraField = 'Jira %s Field';
|
||||
$lang->convert->jira->jiraStatus = 'Jira %s Status';
|
||||
$lang->convert->jira->jiraAction = 'Jira %s Action';
|
||||
$lang->convert->jira->jiraResolution = 'Jira %s Resolution';
|
||||
$lang->convert->jira->zentaoField = 'Zentao %s Field';
|
||||
$lang->convert->jira->zentaoStatus = 'Zentao %s Status';
|
||||
$lang->convert->jira->zentaoStage = 'Zentao %s Stage';
|
||||
$lang->convert->jira->zentaoAction = 'Zentao %s Action';
|
||||
$lang->convert->jira->zentaoReason = 'Zentao %s Closed Reason';
|
||||
$lang->convert->jira->zentaoResolution = 'Zentao %s Resolution';
|
||||
$lang->convert->jira->initJiraUser = 'Init Jira User';
|
||||
$lang->convert->jira->importJira = 'Import Jira';
|
||||
$lang->convert->jira->start = 'Start';
|
||||
@@ -147,9 +177,14 @@ $lang->convert->jira->invalidDB = 'Invalid database name!';
|
||||
$lang->convert->jira->invalidTable = 'This database is not a Jira database!';
|
||||
$lang->convert->jira->notReadAndWrite = 'Please modify the %s directory permissions!';
|
||||
$lang->convert->jira->notExistEntities = 'The %s file does not exist!';
|
||||
$lang->convert->jira->passwordNotice = 'Set the default password of Jira users after they are imported into ZenTao. Users can modify the password in ZenTao later.';
|
||||
$lang->convert->jira->groupNotice = 'Set the default permission grouping of Jira users after importing into ZenTao.';
|
||||
$lang->convert->jira->passwordNotice = 'Set the default password of users after they are imported into ZenTao. Users can modify the password in ZenTao later.';
|
||||
$lang->convert->jira->groupNotice = 'Set the default permission grouping of users after importing into ZenTao.';
|
||||
$lang->convert->jira->passwordDifferent = 'Password do not match!';
|
||||
$lang->convert->jira->mapObjectNotice = 'When selecting a mapping relationship, if you choose to add a new workflow, a new object will be automatically created in the workflow after import.';
|
||||
$lang->convert->jira->mapFieldNotice = 'The built-in fields in JIRA have been automatically matched. Please select the mapping relationship for custom fields. When selecting the mapping relationship, if you choose to add, new fields will be automatically created after import, and unselected fields will not be imported.';
|
||||
$lang->convert->jira->mapStatusNotice = 'When selecting a mapping relationship, unselected states are imported and automatically matched to %s.';
|
||||
$lang->convert->jira->mapReasonNotice = 'When selecting a mapping relationship, if "Add" is chosen, a new solution will be automatically created after import. Solutions not selected will be matched as "Completed" by default after import.';
|
||||
$lang->convert->jira->mapRelationNotice = 'When selecting a mapping relationship, if you choose to add, an association relationship will be automatically created after import, and unselected associations will not be imported.';
|
||||
$lang->convert->jira->passwordEmpty = 'Password can not be empty!';
|
||||
$lang->convert->jira->passwordLess = 'Password must not be less than six characters!';
|
||||
$lang->convert->jira->importSuccessfully = 'Done!';
|
||||
@@ -157,11 +192,14 @@ $lang->convert->jira->importResult = "Import <strong class='text-red'>%s</
|
||||
$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->restore = 'The last import of information was not completed. Do you want to continue filling in from the last process?';
|
||||
|
||||
$lang->convert->jira->zentaoObjectList[''] = '';
|
||||
$lang->convert->jira->zentaoObjectList['task'] = 'Task';
|
||||
$lang->convert->jira->zentaoObjectList[''] = '';
|
||||
$lang->convert->jira->zentaoObjectList['epic'] = 'Epic';
|
||||
$lang->convert->jira->zentaoObjectList['requirement'] = 'Requirement';
|
||||
$lang->convert->jira->zentaoObjectList['story'] = 'Story';
|
||||
$lang->convert->jira->zentaoObjectList['task'] = 'Task';
|
||||
$lang->convert->jira->zentaoObjectList['testcase'] = 'Case';
|
||||
$lang->convert->jira->zentaoObjectList['bug'] = 'Bug';
|
||||
|
||||
$lang->convert->jira->zentaoLinkTypeList['subTaskLink'] = 'Parent-Child Task';
|
||||
@@ -169,10 +207,11 @@ $lang->convert->jira->zentaoLinkTypeList['subStoryLink'] = 'Parent-Child Story';
|
||||
$lang->convert->jira->zentaoLinkTypeList['duplicate'] = 'Duplicate';
|
||||
$lang->convert->jira->zentaoLinkTypeList['relates'] = 'Relates';
|
||||
|
||||
$lang->convert->jira->steps[1] = 'Objects';
|
||||
$lang->convert->jira->steps[2] = 'Relates';
|
||||
$lang->convert->jira->steps[3] = 'Resolution';
|
||||
$lang->convert->jira->steps[4] = 'Status';
|
||||
$lang->convert->jira->steps['object'] = 'Objects';
|
||||
$lang->convert->jira->steps['objectData'] = 'Object Data';
|
||||
$lang->convert->jira->steps['relation'] = 'Relation';
|
||||
$lang->convert->jira->steps['user'] = 'Import Jira User';
|
||||
$lang->convert->jira->steps['confirme'] = 'Import Data';
|
||||
|
||||
$lang->convert->jira->importSteps['db'][1] = 'Backup ZenTao database, backup Jira database.';
|
||||
$lang->convert->jira->importSteps['db'][2] = 'Using ZenTao when importing data will cause performance pressure on the server, please try to ensure that no one is using ZenTao when importing data.';
|
||||
@@ -184,12 +223,20 @@ $lang->convert->jira->importSteps['file'][1] = 'Backup ZenTao database, backup J
|
||||
$lang->convert->jira->importSteps['file'][2] = 'Using ZenTao when importing data will cause performance pressure on the server, please try to ensure that no one is using ZenTao when importing data.';
|
||||
$lang->convert->jira->importSteps['file'][3] = "Put the Jira backup file <strong class='text-red'>entities.xml</strong> under <strong class='text-red'>%s</strong>.";
|
||||
$lang->convert->jira->importSteps['file'][4] = "Put the Jira <strong class='text-red'> attachments</strong> directory under <strong class='text-red'>%s</strong>, Make sure you have enough disk space on the ZenTao server.";
|
||||
$lang->convert->jira->importSteps['file'][5] = "After the above steps are completed, click Next.";
|
||||
$lang->convert->jira->importSteps['file'][5] = "To ensure the integrity of the imported data, please enter the domain name, administrator account, password/Token of the current Jira environment.";
|
||||
$lang->convert->jira->importSteps['file'][6] = "After the above steps are completed, click Next.";
|
||||
|
||||
$lang->convert->jira->objectList['user'] = 'User';
|
||||
$lang->convert->jira->objectList['project'] = 'Project';
|
||||
$lang->convert->jira->objectList['issue'] = 'Issue';
|
||||
$lang->convert->jira->objectList['build'] = 'Build';
|
||||
$lang->convert->jira->objectList['issuelink'] = 'Issue Link';
|
||||
$lang->convert->jira->objectList['worklog'] = 'Worklog';
|
||||
$lang->convert->jira->objectList['action'] = 'Action';
|
||||
$lang->convert->jira->objectList['file'] = 'File';
|
||||
|
||||
$lang->convert->jira->buildinFields = array();
|
||||
$lang->convert->jira->buildinFields['summary'] = array('name'=> 'Summary', 'jiraField' => 'SUMMARY', 'control' => 'input', 'type' => 'varchar', 'length' => '255');
|
||||
$lang->convert->jira->buildinFields['pri'] = array('name'=> 'Pri', 'jiraField' => 'PRIORITY', 'control' => 'select', 'type' => 'int', 'length' => '3');
|
||||
$lang->convert->jira->buildinFields['resolution'] = array('name'=> 'Resolution', 'jiraField' => 'RESOLUTION', 'control' => 'select', 'type' => 'varchar', 'length' => '255');
|
||||
$lang->convert->jira->buildinFields['desc'] = array('name'=> 'Desc', 'jiraField' => 'DESCRIPTION', 'control' => 'richtext', 'type' => 'mediumtext', 'length' => '0');
|
||||
|
||||
@@ -33,6 +33,14 @@ $lang->convert->direction = "请选择{$lang->executionCommon}问题
|
||||
$lang->convert->questionTypeOfRedmine = 'Redmine中问题类型';
|
||||
$lang->convert->aimTypeOfZentao = '转化为Zentao中的类型';
|
||||
|
||||
$lang->convert->jiraUserMode = array();
|
||||
$lang->convert->jiraUserMode['account'] = '使用Jira帐号';
|
||||
$lang->convert->jiraUserMode['email'] = '使用Jira邮箱';
|
||||
|
||||
$lang->convert->confluenceUserMode = array();
|
||||
$lang->convert->confluenceUserMode['account'] = '使用Confluence帐号';
|
||||
$lang->convert->confluenceUserMode['email'] = '使用Confluence邮箱';
|
||||
|
||||
$lang->convert->directionList['bug'] = 'Bug';
|
||||
$lang->convert->directionList['task'] = '任务';
|
||||
$lang->convert->directionList['story'] = $lang->SRCommon;
|
||||
@@ -42,6 +50,8 @@ $lang->convert->sourceList['Redmine'] = array('Redmine_1.1' => '1.1');
|
||||
|
||||
$lang->convert->setting = '设置';
|
||||
$lang->convert->checkConfig = '检查配置';
|
||||
$lang->convert->add = '新增';
|
||||
$lang->convert->title = '标题';
|
||||
|
||||
$lang->convert->ok = '<span class="text-success"><i class="icon-check-sign"></i> 检查通过</span>';
|
||||
$lang->convert->fail = '<span class="text-danger"><i class="icon-remove-sign"></i> 检查失败</span>';
|
||||
@@ -117,13 +127,19 @@ $lang->convert->issue->goto = '转换为';
|
||||
|
||||
$lang->convert->jira = new stdclass();
|
||||
$lang->convert->jira->method = '选择导入方式';
|
||||
$lang->convert->jira->back = '上一步';
|
||||
$lang->convert->jira->next = '下一步';
|
||||
$lang->convert->jira->importFromDB = '从数据库导入';
|
||||
$lang->convert->jira->importFromFile = '从文件导入';
|
||||
$lang->convert->jira->mapJira2Zentao = '设置Jira与禅道数据对应关系';
|
||||
$lang->convert->jira->database = 'Jira数据库';
|
||||
$lang->convert->jira->domain = 'Jira域名';
|
||||
$lang->convert->jira->admin = 'Jira管理员帐号';
|
||||
$lang->convert->jira->token = 'Jira密码/Token';
|
||||
$lang->convert->jira->dbNameNotice = '请输入Jira数据库名字';
|
||||
$lang->convert->jira->importNotice = '注意:导入数据有风险!请务必确保如下操作步骤依次完成,再进行合并。';
|
||||
$lang->convert->jira->accountNotice = '使用邮箱的会将@前面的字符串作为用户名,超过30位的会被截断处理。';
|
||||
$lang->convert->jira->apiError = '无法连接到JiraAPI接口,请检查您的Jira域名和帐号、密码/Token信息。';
|
||||
$lang->convert->jira->dbDesc = '如果您的Jira使用Mysql数据库, 请选择此方式';
|
||||
$lang->convert->jira->fileDesc = '如果您的Jira使用非Mysql数据库, 请选择此方式';
|
||||
$lang->convert->jira->jiraObject = 'Jira Issues';
|
||||
@@ -138,6 +154,20 @@ $lang->convert->jira->storyStatus = '禅道需求状态';
|
||||
$lang->convert->jira->storyStage = '禅道需求阶段';
|
||||
$lang->convert->jira->bugStatus = '禅道Bug状态';
|
||||
$lang->convert->jira->taskStatus = '禅道任务状态';
|
||||
$lang->convert->jira->objectField = '对象字段映射';
|
||||
$lang->convert->jira->objectStatus = '对象状态映射';
|
||||
$lang->convert->jira->objectAction = '对象动作映射';
|
||||
$lang->convert->jira->objectResolution = '对象解决方案映射';
|
||||
$lang->convert->jira->jiraField = 'Jira%s字段';
|
||||
$lang->convert->jira->jiraStatus = 'Jira%s状态';
|
||||
$lang->convert->jira->jiraAction = 'Jira%s动作';
|
||||
$lang->convert->jira->jiraResolution = 'Jira%s解决方案';
|
||||
$lang->convert->jira->zentaoField = '禅道%s字段';
|
||||
$lang->convert->jira->zentaoStatus = '禅道%s状态';
|
||||
$lang->convert->jira->zentaoStage = '禅道%s阶段';
|
||||
$lang->convert->jira->zentaoAction = '禅道%s动作';
|
||||
$lang->convert->jira->zentaoReason = '禅道%s关闭原因';
|
||||
$lang->convert->jira->zentaoResolution = '禅道%s解决方案';
|
||||
$lang->convert->jira->initJiraUser = '设置Jira用户';
|
||||
$lang->convert->jira->importJira = '导入Jira';
|
||||
$lang->convert->jira->start = '开始导入';
|
||||
@@ -147,8 +177,13 @@ $lang->convert->jira->invalidDB = '无效的数据库名!';
|
||||
$lang->convert->jira->invalidTable = '本数据库非Jira数据库!';
|
||||
$lang->convert->jira->notReadAndWrite = '权限不足!请修改%s目录读写权限!';
|
||||
$lang->convert->jira->notExistEntities = '%s 文件不存在!';
|
||||
$lang->convert->jira->passwordNotice = '设置Jira用户导入到禅道后的默认密码,用户后续可以在禅道中自行修改密码。';
|
||||
$lang->convert->jira->groupNotice = '设置Jira用户导入到禅道后的默认权限分组。';
|
||||
$lang->convert->jira->passwordNotice = '设置用户导入到禅道后的默认密码,用户后续可以在禅道中自行修改密码。';
|
||||
$lang->convert->jira->groupNotice = '设置用户导入到禅道后的默认权限分组。';
|
||||
$lang->convert->jira->mapObjectNotice = '选择映射关系时,如果选择新增成工作流,导入后将自动在工作流中创建一个新对象。';
|
||||
$lang->convert->jira->mapFieldNotice = 'jira内置字段已自动匹配,请选择自定义字段的映射关系,选择映射关系时,若选择新增,导入后将自动创建新字段,未选择的字段则不会导入。';
|
||||
$lang->convert->jira->mapStatusNotice = '选择映射关系时,未选择的状态导入后默认匹配为%s。';
|
||||
$lang->convert->jira->mapReasonNotice = '选择映射关系时,若选择新增,导入后将自动创建新解决方案,未选择的解决方案导入后默认匹配为已完成。';
|
||||
$lang->convert->jira->mapRelationNotice = '选择映射关系时,若选择新增,导入后将自动创建关联关系,未选择的关联关系不导入。';
|
||||
$lang->convert->jira->passwordDifferent = '两次密码不一致!';
|
||||
$lang->convert->jira->passwordEmpty = '密码不能为空!';
|
||||
$lang->convert->jira->passwordLess = '密码不能少于六位!';
|
||||
@@ -157,11 +192,14 @@ $lang->convert->jira->importResult = "导入 <strong class='text-danger'>%
|
||||
$lang->convert->jira->importing = '数据导入中,请不要切换其它页面';
|
||||
$lang->convert->jira->importingAB = '数据导入中';
|
||||
$lang->convert->jira->imported = '数据导入完成';
|
||||
$lang->convert->jira->restore = '上次导入信息没有完成,是否从上次流程继续填写?';
|
||||
|
||||
$lang->convert->jira->zentaoObjectList[''] = '';
|
||||
$lang->convert->jira->zentaoObjectList['task'] = '任务';
|
||||
$lang->convert->jira->zentaoObjectList[''] = '';
|
||||
$lang->convert->jira->zentaoObjectList['epic'] = '业务需求';
|
||||
$lang->convert->jira->zentaoObjectList['requirement'] = '用户需求';
|
||||
$lang->convert->jira->zentaoObjectList['story'] = '软件需求';
|
||||
$lang->convert->jira->zentaoObjectList['task'] = '任务';
|
||||
$lang->convert->jira->zentaoObjectList['testcase'] = '用例';
|
||||
$lang->convert->jira->zentaoObjectList['bug'] = 'Bug';
|
||||
|
||||
$lang->convert->jira->zentaoLinkTypeList['subTaskLink'] = '父-子任务';
|
||||
@@ -169,27 +207,36 @@ $lang->convert->jira->zentaoLinkTypeList['subStoryLink'] = '父-子需求';
|
||||
$lang->convert->jira->zentaoLinkTypeList['duplicate'] = '重复对象';
|
||||
$lang->convert->jira->zentaoLinkTypeList['relates'] = '互相关联';
|
||||
|
||||
$lang->convert->jira->steps[1] = '对象';
|
||||
$lang->convert->jira->steps[2] = '对象关联关系';
|
||||
$lang->convert->jira->steps[3] = '解决方案';
|
||||
$lang->convert->jira->steps[4] = '状态';
|
||||
$lang->convert->jira->steps['object'] = '对象映射';
|
||||
$lang->convert->jira->steps['objectData'] = '对象数据映射';
|
||||
$lang->convert->jira->steps['relation'] = '全局关联关系映射';
|
||||
$lang->convert->jira->steps['user'] = '导入Jira用户';
|
||||
$lang->convert->jira->steps['confirme'] = '导入数据确认';
|
||||
|
||||
$lang->convert->jira->importSteps['db'][1] = '备份禅道数据库,备份Jira数据库。';
|
||||
$lang->convert->jira->importSteps['db'][2] = '导入数据时使用禅道会给服务器造成性能压力,请尽量保证导入数据时无人使用禅道。';
|
||||
$lang->convert->jira->importSteps['db'][3] = '将Jira数据库导入到禅道使用的Mysql中,名字和禅道数据库区别开来。';
|
||||
$lang->convert->jira->importSteps['db'][4] = "将Jira附件目录<strong class='text-danger'> attachments</strong> 放到 <strong class='text-danger'>%s</strong> 下,确保禅道服务器磁盘空间足够。";
|
||||
|
||||
$lang->convert->jira->importSteps['db'][5] = "上述步骤完成后,请输入Jira数据库名字进行下一步。";
|
||||
|
||||
$lang->convert->jira->importSteps['file'][1] = '备份禅道数据库,备份Jira数据库。';
|
||||
$lang->convert->jira->importSteps['file'][2] = '导入数据时使用禅道会给服务器造成性能压力,请尽量保证导入数据时无人使用禅道。';
|
||||
$lang->convert->jira->importSteps['file'][3] = "将Jira的备份文件 <strong class='text-danger'>entities.xml</strong> 放到 <strong class='text-danger'>%s</strong> 下,并给该目录读写权限。";
|
||||
$lang->convert->jira->importSteps['file'][4] = "将Jira附件目录<strong class='text-danger'> attachments</strong> 放到 <strong class='text-danger'>%s</strong> 下,确保禅道服务器磁盘空间足够。";
|
||||
$lang->convert->jira->importSteps['file'][5] = "上述步骤完成后,点击下一步。";
|
||||
$lang->convert->jira->importSteps['file'][5] = "为了保证导入数据的完整性,请输入当前Jira环境的域名、管理员帐号、密码/Token。";
|
||||
$lang->convert->jira->importSteps['file'][6] = "上述步骤完成后,点击下一步。";
|
||||
|
||||
$lang->convert->jira->objectList['user'] = '用户';
|
||||
$lang->convert->jira->objectList['project'] = '项目';
|
||||
$lang->convert->jira->objectList['issue'] = 'Issue';
|
||||
$lang->convert->jira->objectList['build'] = '构建';
|
||||
$lang->convert->jira->objectList['issuelink'] = '关联关系';
|
||||
$lang->convert->jira->objectList['worklog'] = '工作日志';
|
||||
$lang->convert->jira->objectList['action'] = '历史记录';
|
||||
$lang->convert->jira->objectList['file'] = '附件';
|
||||
|
||||
$lang->convert->jira->buildinFields = array();
|
||||
$lang->convert->jira->buildinFields['summary'] = array('name'=> '标题', 'jiraField' => 'SUMMARY', 'control' => 'input', 'type' => 'varchar', 'length' => '255');
|
||||
$lang->convert->jira->buildinFields['pri'] = array('name'=> '优先级', 'jiraField' => 'PRIORITY', 'control' => 'select', 'type' => 'int', 'length' => '3');
|
||||
$lang->convert->jira->buildinFields['resolution'] = array('name'=> '解决方案', 'jiraField' => 'RESOLUTION', 'control' => 'select', 'type' => 'varchar', 'length' => '255');
|
||||
$lang->convert->jira->buildinFields['desc'] = array('name'=> '描述', 'jiraField' => 'DESCRIPTION', 'control' => 'richtext', 'type' => 'mediumtext', 'length' => '0');
|
||||
|
||||
+170
-65
@@ -1,116 +1,221 @@
|
||||
<?php
|
||||
/**
|
||||
* The convert module zh-tw file of ZenTaoPMS.
|
||||
* The convert module zh-cn file of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2023 青島易軟天創網絡科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
|
||||
* @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.cnezsoft.com)
|
||||
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package convert
|
||||
* @version $Id: zh-tw.php 4129 2013-01-18 01:58:14Z wwccss $
|
||||
* @version $Id: zh-cn.php 4129 2013-01-18 01:58:14Z wwccss $
|
||||
* @link https://www.zentao.net
|
||||
*/
|
||||
$lang->convert->common = '從其他系統導入';
|
||||
$lang->convert->index = '首頁';
|
||||
$lang->convert->common = '从其他系统导入';
|
||||
$lang->convert->index = '首页';
|
||||
|
||||
$lang->convert->start = '開始轉換';
|
||||
$lang->convert->start = '开始转换';
|
||||
$lang->convert->desc = <<<EOT
|
||||
<p>歡迎使用系統轉換嚮導,本程序會幫助您將其他系統的數據轉換到禪道項目管理系統中。</p>
|
||||
<strong>轉換存在一定的風險,轉換之前,我們強烈建議您備份資料庫及相應的數據檔案,並保證轉換的時候,沒有其他人進行操作。</strong>
|
||||
<p>欢迎使用系统转换向导,本程序会帮助您将其他系统的数据转换到禅道项目管理系统中。</p>
|
||||
<strong>转换存在一定的风险,转换之前,我们强烈建议您备份数据库及相应的数据文件,并保证转换的时候,没有其他人进行操作。</strong>
|
||||
EOT;
|
||||
|
||||
$lang->convert->setConfig = '來源系統配置';
|
||||
$lang->convert->setConfig = '来源系统配置';
|
||||
$lang->convert->setBugfree = 'Bugfree配置';
|
||||
$lang->convert->setRedmine = 'Redmine配置';
|
||||
$lang->convert->checkBugFree = '檢查Bugfree';
|
||||
$lang->convert->checkRedmine = '檢查Redmine';
|
||||
$lang->convert->convertRedmine = '轉換Redmine';
|
||||
$lang->convert->convertBugFree = '轉換BugFree';
|
||||
$lang->convert->checkBugFree = '检查Bugfree';
|
||||
$lang->convert->checkRedmine = '检查Redmine';
|
||||
$lang->convert->convertRedmine = '转换Redmine';
|
||||
$lang->convert->convertBugFree = '转换BugFree';
|
||||
|
||||
$lang->convert->selectSource = '選擇來源系統及版本';
|
||||
$lang->convert->mustSelectSource = "必須選擇一個來源。";
|
||||
$lang->convert->selectSource = '选择来源系统及版本';
|
||||
$lang->convert->mustSelectSource = "必须选择一个来源。";
|
||||
|
||||
$lang->convert->direction = "請選擇{$lang->executionCommon}問題轉換方向";
|
||||
$lang->convert->questionTypeOfRedmine = 'Redmine中問題類型';
|
||||
$lang->convert->aimTypeOfZentao = '轉化為Zentao中的類型';
|
||||
$lang->convert->direction = "请选择{$lang->executionCommon}问题转换方向";
|
||||
$lang->convert->questionTypeOfRedmine = 'Redmine中问题类型';
|
||||
$lang->convert->aimTypeOfZentao = '转化为Zentao中的类型';
|
||||
|
||||
$lang->convert->jiraUserMode = array();
|
||||
$lang->convert->jiraUserMode['account'] = '使用Jira帐号';
|
||||
$lang->convert->jiraUserMode['email'] = '使用Jira邮箱';
|
||||
|
||||
$lang->convert->directionList['bug'] = 'Bug';
|
||||
$lang->convert->directionList['task'] = '任務';
|
||||
$lang->convert->directionList['task'] = '任务';
|
||||
$lang->convert->directionList['story'] = $lang->SRCommon;
|
||||
|
||||
$lang->convert->sourceList['BugFree'] = array('bugfree_1' => '1.x', 'bugfree_2' => '2.x');
|
||||
$lang->convert->sourceList['Redmine'] = array('Redmine_1.1' => '1.1');
|
||||
|
||||
$lang->convert->setting = '設置';
|
||||
$lang->convert->checkConfig = '檢查配置';
|
||||
$lang->convert->setting = '设置';
|
||||
$lang->convert->checkConfig = '检查配置';
|
||||
$lang->convert->add = '新增';
|
||||
$lang->convert->title = '标题';
|
||||
|
||||
$lang->convert->ok = '<span class="text-success"><i class="icon-check-sign"></i> 檢查通過</span>';
|
||||
$lang->convert->fail = '<span class="text-danger"><i class="icon-remove-sign"></i> 檢查失敗</span>';
|
||||
$lang->convert->ok = '<span class="text-success"><i class="icon-check-sign"></i> 检查通过</span>';
|
||||
$lang->convert->fail = '<span class="text-danger"><i class="icon-remove-sign"></i> 检查失败</span>';
|
||||
|
||||
$lang->convert->dbHost = '資料庫伺服器';
|
||||
$lang->convert->dbPort = '伺服器連接埠';
|
||||
$lang->convert->dbUser = '資料庫用戶名';
|
||||
$lang->convert->dbPassword = '資料庫密碼';
|
||||
$lang->convert->dbName = '%s使用的庫';
|
||||
$lang->convert->dbCharset = '%s資料庫編碼';
|
||||
$lang->convert->dbPrefix = '%s表首碼';
|
||||
$lang->convert->installPath = '%s安裝的根目錄';
|
||||
$lang->convert->dbHost = '数据库服务器';
|
||||
$lang->convert->dbPort = '服务器端口';
|
||||
$lang->convert->dbUser = '数据库用户名';
|
||||
$lang->convert->dbPassword = '数据库密码';
|
||||
$lang->convert->dbName = '%s使用的库';
|
||||
$lang->convert->dbCharset = '%s数据库编码';
|
||||
$lang->convert->dbPrefix = '%s表前缀';
|
||||
$lang->convert->installPath = '%s安装的根目录';
|
||||
|
||||
$lang->convert->checkDB = '資料庫';
|
||||
$lang->convert->checkDB = '数据库';
|
||||
$lang->convert->checkTable = '表';
|
||||
$lang->convert->checkPath = '安裝路徑';
|
||||
$lang->convert->checkPath = '安装路径';
|
||||
|
||||
$lang->convert->execute = '執行轉換';
|
||||
$lang->convert->item = '轉換項';
|
||||
$lang->convert->count = '轉換數量';
|
||||
$lang->convert->info = '轉換信息';
|
||||
$lang->convert->execute = '执行转换';
|
||||
$lang->convert->item = '转换项';
|
||||
$lang->convert->count = '转换数量';
|
||||
$lang->convert->info = '转换信息';
|
||||
|
||||
$lang->convert->bugfree = new stdclass();
|
||||
$lang->convert->bugfree->users = '用戶';
|
||||
$lang->convert->bugfree->users = '用户';
|
||||
$lang->convert->bugfree->executions = $lang->executionCommon;
|
||||
$lang->convert->bugfree->modules = '模組';
|
||||
$lang->convert->bugfree->modules = '模块';
|
||||
$lang->convert->bugfree->bugs = 'Bug';
|
||||
$lang->convert->bugfree->cases = '測試用例';
|
||||
$lang->convert->bugfree->results = '測試結果';
|
||||
$lang->convert->bugfree->actions = '歷史記錄';
|
||||
$lang->convert->bugfree->cases = '测试用例';
|
||||
$lang->convert->bugfree->results = '测试结果';
|
||||
$lang->convert->bugfree->actions = '历史记录';
|
||||
$lang->convert->bugfree->files = '附件';
|
||||
|
||||
$lang->convert->redmine = new stdclass();
|
||||
$lang->convert->redmine->users = '用戶';
|
||||
$lang->convert->redmine->groups = '用戶分組';
|
||||
$lang->convert->redmine->users = '用户';
|
||||
$lang->convert->redmine->groups = '用户分组';
|
||||
$lang->convert->redmine->products = $lang->productCommon;
|
||||
$lang->convert->redmine->executions = $lang->executionCommon;
|
||||
$lang->convert->redmine->stories = $lang->SRCommon;
|
||||
$lang->convert->redmine->tasks = '任務';
|
||||
$lang->convert->redmine->tasks = '任务';
|
||||
$lang->convert->redmine->bugs = 'Bug';
|
||||
$lang->convert->redmine->productPlans = $lang->productCommon . '計劃';
|
||||
$lang->convert->redmine->teams = '團隊';
|
||||
$lang->convert->redmine->releases = '發佈';
|
||||
$lang->convert->redmine->productPlans = $lang->productCommon . '计划';
|
||||
$lang->convert->redmine->teams = '团队';
|
||||
$lang->convert->redmine->releases = '发布';
|
||||
$lang->convert->redmine->builds = 'Build';
|
||||
$lang->convert->redmine->docLibs = '文檔庫';
|
||||
$lang->convert->redmine->docs = '文檔';
|
||||
$lang->convert->redmine->docLibs = '文档库';
|
||||
$lang->convert->redmine->docs = '文档';
|
||||
$lang->convert->redmine->files = '附件';
|
||||
|
||||
$lang->convert->errorFileNotExits = '檔案 %s 不存在';
|
||||
$lang->convert->errorUserExists = '用戶 %s 已存在';
|
||||
$lang->convert->errorGroupExists = '分組 %s 已存在';
|
||||
$lang->convert->errorFileNotExits = '文件 %s 不存在';
|
||||
$lang->convert->errorUserExists = '用户 %s 已存在';
|
||||
$lang->convert->errorGroupExists = '分组 %s 已存在';
|
||||
$lang->convert->errorBuildExists = 'Build %s 已存在';
|
||||
$lang->convert->errorReleaseExists = '發佈 %s 已存在';
|
||||
$lang->convert->errorCopyFailed = '檔案 %s 拷貝失敗';
|
||||
$lang->convert->errorReleaseExists = '发布 %s 已存在';
|
||||
$lang->convert->errorCopyFailed = '文件 %s 拷贝失败';
|
||||
|
||||
$lang->convert->setParam = '請設置轉換參數';
|
||||
$lang->convert->setParam = '请设置转换参数';
|
||||
|
||||
$lang->convert->statusType = new stdclass();
|
||||
$lang->convert->priType = new stdclass();
|
||||
|
||||
$lang->convert->aimType = '問題類型轉換';
|
||||
$lang->convert->statusType->bug = '狀態類型轉換(Bug狀態)';
|
||||
$lang->convert->statusType->story = '狀態類型轉換(Story狀態)';
|
||||
$lang->convert->statusType->task = '狀態類型轉換(Task狀態)';
|
||||
$lang->convert->priType->bug = '優先順序類型轉換(Bug狀態)';
|
||||
$lang->convert->priType->story = '優先順序類型轉換(Story狀態)';
|
||||
$lang->convert->priType->task = '優先順序類型轉換(Task狀態)';
|
||||
$lang->convert->aimType = '问题类型转换';
|
||||
$lang->convert->statusType->bug = '状态类型转换(Bug状态)';
|
||||
$lang->convert->statusType->story = '状态类型转换(Story状态)';
|
||||
$lang->convert->statusType->task = '状态类型转换(Task状态)';
|
||||
$lang->convert->priType->bug = '优先级类型转换(Bug状态)';
|
||||
$lang->convert->priType->story = '优先级类型转换(Story状态)';
|
||||
$lang->convert->priType->task = '优先级类型转换(Task状态)';
|
||||
|
||||
$lang->convert->issue = new stdclass();
|
||||
$lang->convert->issue->redmine = 'Redmine';
|
||||
$lang->convert->issue->zentao = '禪道';
|
||||
$lang->convert->issue->goto = '轉換為';
|
||||
$lang->convert->issue->zentao = '禅道';
|
||||
$lang->convert->issue->goto = '转换为';
|
||||
|
||||
$lang->convert->jira = new stdclass();
|
||||
$lang->convert->jira->method = '选择导入方式';
|
||||
$lang->convert->jira->back = '上一步';
|
||||
$lang->convert->jira->next = '下一步';
|
||||
$lang->convert->jira->importFromDB = '从数据库导入';
|
||||
$lang->convert->jira->importFromFile = '从文件导入';
|
||||
$lang->convert->jira->mapJira2Zentao = '设置Jira与禅道数据对应关系';
|
||||
$lang->convert->jira->database = 'Jira数据库';
|
||||
$lang->convert->jira->dbNameNotice = '请输入Jira数据库名字';
|
||||
$lang->convert->jira->importNotice = '注意:导入数据有风险!请务必确保如下操作步骤依次完成,再进行合并。';
|
||||
$lang->convert->jira->accountNotice = '使用邮箱的会将@前面的字符串作为用户名,超过30位的会被截断处理。';
|
||||
$lang->convert->jira->dbDesc = '如果您的Jira使用Mysql数据库, 请选择此方式';
|
||||
$lang->convert->jira->fileDesc = '如果您的Jira使用非Mysql数据库, 请选择此方式';
|
||||
$lang->convert->jira->jiraObject = 'Jira Issues';
|
||||
$lang->convert->jira->zentaoObject = '禅道对象';
|
||||
$lang->convert->jira->jiraLinkType = 'Jira 关联关系';
|
||||
$lang->convert->jira->zentaoLinkType = '禅道关联关系';
|
||||
$lang->convert->jira->jiraResolution = 'Jira 解决方案';
|
||||
$lang->convert->jira->zentaoResolution = '禅道Bug解决方案';
|
||||
$lang->convert->jira->zentaoReason = '禅道需求关闭原因';
|
||||
$lang->convert->jira->jiraStatus = 'Jira Issues 状态';
|
||||
$lang->convert->jira->storyStatus = '禅道需求状态';
|
||||
$lang->convert->jira->storyStage = '禅道需求阶段';
|
||||
$lang->convert->jira->bugStatus = '禅道Bug状态';
|
||||
$lang->convert->jira->taskStatus = '禅道任务状态';
|
||||
$lang->convert->jira->objectField = '对象字段映射';
|
||||
$lang->convert->jira->objectStatus = '对象状态映射';
|
||||
$lang->convert->jira->objectAction = '对象动作映射';
|
||||
$lang->convert->jira->objectResolution = '对象解决方案映射';
|
||||
$lang->convert->jira->jiraField = 'Jira%s字段';
|
||||
$lang->convert->jira->jiraStatus = 'Jira%s状态';
|
||||
$lang->convert->jira->jiraAction = 'Jira%s动作';
|
||||
$lang->convert->jira->jiraResolution = 'Jira%s解决方案';
|
||||
$lang->convert->jira->zentaoField = '禅道%s字段';
|
||||
$lang->convert->jira->zentaoStatus = '禅道%s状态';
|
||||
$lang->convert->jira->zentaoStage = '禅道%s阶段';
|
||||
$lang->convert->jira->zentaoAction = '禅道%s动作';
|
||||
$lang->convert->jira->zentaoReason = '禅道%s关闭原因';
|
||||
$lang->convert->jira->zentaoResolution = '禅道%s解决方案';
|
||||
$lang->convert->jira->initJiraUser = '设置Jira用户';
|
||||
$lang->convert->jira->importJira = '导入Jira';
|
||||
$lang->convert->jira->start = '开始导入';
|
||||
|
||||
$lang->convert->jira->dbNameEmpty = 'Jira数据库名字不能为空!';
|
||||
$lang->convert->jira->invalidDB = '无效的数据库名!';
|
||||
$lang->convert->jira->invalidTable = '本数据库非Jira数据库!';
|
||||
$lang->convert->jira->notReadAndWrite = '权限不足!请修改%s目录读写权限!';
|
||||
$lang->convert->jira->notExistEntities = '%s 文件不存在!';
|
||||
$lang->convert->jira->passwordNotice = '设置Jira用户导入到禅道后的默认密码,用户后续可以在禅道中自行修改密码。';
|
||||
$lang->convert->jira->groupNotice = '设置Jira用户导入到禅道后的默认权限分组。';
|
||||
$lang->convert->jira->passwordDifferent = '两次密码不一致!';
|
||||
$lang->convert->jira->passwordEmpty = '密码不能为空!';
|
||||
$lang->convert->jira->passwordLess = '密码不能少于六位!';
|
||||
$lang->convert->jira->importSuccessfully = 'Jira导入完成!';
|
||||
$lang->convert->jira->importResult = "导入 <strong class='text-danger'>%s</strong> 数据, 已处理 <strong class='%scount'>%s</strong> 条记录;";
|
||||
$lang->convert->jira->importing = '数据导入中,请不要切换其它页面';
|
||||
$lang->convert->jira->importingAB = '数据导入中';
|
||||
$lang->convert->jira->imported = '数据导入完成';
|
||||
$lang->convert->jira->restore = '上次导入信息没有完成,是否从上次流程继续填写?';
|
||||
|
||||
$lang->convert->jira->zentaoObjectList[''] = '';
|
||||
$lang->convert->jira->zentaoObjectList['epic'] = '业务需求';
|
||||
$lang->convert->jira->zentaoObjectList['requirement'] = '用户需求';
|
||||
$lang->convert->jira->zentaoObjectList['story'] = '软件需求';
|
||||
$lang->convert->jira->zentaoObjectList['task'] = '任务';
|
||||
$lang->convert->jira->zentaoObjectList['testcase'] = '用例';
|
||||
$lang->convert->jira->zentaoObjectList['bug'] = 'Bug';
|
||||
|
||||
$lang->convert->jira->zentaoLinkTypeList['subTaskLink'] = '父-子任务';
|
||||
$lang->convert->jira->zentaoLinkTypeList['subStoryLink'] = '父-子需求';
|
||||
$lang->convert->jira->zentaoLinkTypeList['duplicate'] = '重复对象';
|
||||
$lang->convert->jira->zentaoLinkTypeList['relates'] = '互相关联';
|
||||
|
||||
$lang->convert->jira->steps['object'] = '对象映射';
|
||||
$lang->convert->jira->steps['objectData'] = '对象数据映射';
|
||||
$lang->convert->jira->steps['relation'] = '全局关联关系映射';
|
||||
$lang->convert->jira->steps['user'] = '导入Jira用户';
|
||||
$lang->convert->jira->steps['confirme'] = '导入数据确认';
|
||||
|
||||
$lang->convert->jira->importSteps['db'][1] = '备份禅道数据库,备份Jira数据库。';
|
||||
$lang->convert->jira->importSteps['db'][2] = '导入数据时使用禅道会给服务器造成性能压力,请尽量保证导入数据时无人使用禅道。';
|
||||
$lang->convert->jira->importSteps['db'][3] = '将Jira数据库导入到禅道使用的Mysql中,名字和禅道数据库区别开来。';
|
||||
$lang->convert->jira->importSteps['db'][4] = "将Jira附件目录<strong class='text-danger'> attachments</strong> 放到 <strong class='text-danger'>%s</strong> 下,确保禅道服务器磁盘空间足够。";
|
||||
$lang->convert->jira->importSteps['db'][5] = "上述步骤完成后,请输入Jira数据库名字进行下一步。";
|
||||
|
||||
$lang->convert->jira->importSteps['file'][1] = '备份禅道数据库,备份Jira数据库。';
|
||||
$lang->convert->jira->importSteps['file'][2] = '导入数据时使用禅道会给服务器造成性能压力,请尽量保证导入数据时无人使用禅道。';
|
||||
$lang->convert->jira->importSteps['file'][3] = "将Jira的备份文件 <strong class='text-danger'>entities.xml</strong> 放到 <strong class='text-danger'>%s</strong> 下,并给该目录读写权限。";
|
||||
$lang->convert->jira->importSteps['file'][4] = "将Jira附件目录<strong class='text-danger'> attachments</strong> 放到 <strong class='text-danger'>%s</strong> 下,确保禅道服务器磁盘空间足够。";
|
||||
$lang->convert->jira->importSteps['file'][5] = "上述步骤完成后,点击下一步。";
|
||||
|
||||
$lang->convert->jira->objectList['user'] = '用户';
|
||||
$lang->convert->jira->objectList['project'] = '项目';
|
||||
$lang->convert->jira->objectList['issue'] = 'Issue';
|
||||
$lang->convert->jira->objectList['build'] = '构建';
|
||||
$lang->convert->jira->objectList['issuelink'] = '关联关系';
|
||||
$lang->convert->jira->objectList['action'] = '历史记录';
|
||||
$lang->convert->jira->objectList['file'] = '附件';
|
||||
|
||||
+871
-126
File diff suppressed because it is too large
Load Diff
+1785
-583
File diff suppressed because it is too large
Load Diff
@@ -10,27 +10,42 @@ declare(strict_types=1);
|
||||
*/
|
||||
namespace zin;
|
||||
|
||||
include('jiraside.html.php');
|
||||
|
||||
$importUrl = inlink('importJira', "method={$method}&mode=import&type=user&lastID=0&createTable=true");
|
||||
|
||||
panel
|
||||
jsVar('langImporting', $lang->convert->jira->importingAB);
|
||||
|
||||
div
|
||||
(
|
||||
set::title($lang->convert->jira->importJira),
|
||||
h::ul
|
||||
setClass('flex'),
|
||||
panel
|
||||
(
|
||||
setID('importResult'),
|
||||
setClass('mx-4'),
|
||||
setStyle(array('list-style' => 'disc')),
|
||||
li
|
||||
(
|
||||
setClass('text-danger font-bold importing my-1 hidden'),
|
||||
$lang->convert->jira->importing
|
||||
)
|
||||
setClass('w-1/4 mr-4'),
|
||||
$items
|
||||
),
|
||||
button
|
||||
panel
|
||||
(
|
||||
on::click("importJira(event, '{$importUrl}', true)"),
|
||||
setClass('btn primary'),
|
||||
$lang->convert->jira->start
|
||||
setClass('flex-1 p-4 overflow-y-scroll scrollbar-thin scrollbar-hover'),
|
||||
setStyle(array('max-height' => 'calc(100vh - 130px)')),
|
||||
div(setClass('panel-title text-lg'), $lang->convert->jira->steps['confirme']),
|
||||
h::ul
|
||||
(
|
||||
setID('importResult'),
|
||||
setClass('mx-4 my-2'),
|
||||
setStyle(array('list-style' => 'disc')),
|
||||
li
|
||||
(
|
||||
setClass('text-danger font-bold importing my-1 hidden'),
|
||||
$lang->convert->jira->importing
|
||||
)
|
||||
),
|
||||
button
|
||||
(
|
||||
on::click("importJira(event, '{$importUrl}', true)"),
|
||||
setClass('btn primary'),
|
||||
$lang->convert->jira->start
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
+45
-5
@@ -10,7 +10,7 @@ declare(strict_types=1);
|
||||
*/
|
||||
namespace zin;
|
||||
|
||||
$labelWidth = $method == 'db' ? '80px' : '20px';
|
||||
$labelWidth = $method == 'db' ? '80px' : '100px';
|
||||
|
||||
formPanel
|
||||
(
|
||||
@@ -18,7 +18,7 @@ formPanel
|
||||
set::headingClass('justify-start'),
|
||||
set::bodyClass('px-0'),
|
||||
set::submitBtnText($lang->convert->jira->next),
|
||||
set::backUrl(inlink('convertJira')),
|
||||
set::backUrl(inlink('index')),
|
||||
to::heading
|
||||
(
|
||||
span
|
||||
@@ -47,14 +47,14 @@ formPanel
|
||||
setStyle(array('align-items' => 'center')),
|
||||
set::label('3.'),
|
||||
set::labelWidth($labelWidth),
|
||||
$method == 'db' ? $lang->convert->jira->importSteps[$method][3] : html(sprintf($lang->convert->jira->importSteps[$method][3], $app->getTmpRoot() . 'jirafile')),
|
||||
$method == 'db' ? $lang->convert->jira->importSteps[$method][3] : html(sprintf($lang->convert->jira->importSteps[$method][3], $app->getTmpRoot() . 'jirafile'))
|
||||
),
|
||||
formGroup
|
||||
(
|
||||
setStyle(array('align-items' => 'center')),
|
||||
set::label('4.'),
|
||||
set::labelWidth($labelWidth),
|
||||
html(sprintf($lang->convert->jira->importSteps[$method][4], $app->getTmpRoot())),
|
||||
html(sprintf($lang->convert->jira->importSteps[$method][4], $app->getTmpRoot()))
|
||||
),
|
||||
formGroup
|
||||
(
|
||||
@@ -63,6 +63,13 @@ formPanel
|
||||
set::labelWidth($labelWidth),
|
||||
$lang->convert->jira->importSteps[$method][5]
|
||||
),
|
||||
$method == 'file' ? formGroup
|
||||
(
|
||||
setStyle(array('align-items' => 'center')),
|
||||
set::label('6.'),
|
||||
set::labelWidth($labelWidth),
|
||||
$lang->convert->jira->importSteps[$method][6]
|
||||
) : null,
|
||||
$method == 'db' ? formGroup
|
||||
(
|
||||
set::label($lang->convert->jira->database),
|
||||
@@ -74,7 +81,40 @@ formPanel
|
||||
set::name('dbName'),
|
||||
set::placeholder($lang->convert->jira->dbNameNotice)
|
||||
)
|
||||
) : null
|
||||
) : null,
|
||||
$method == 'file' ? formGroup
|
||||
(
|
||||
set::label($lang->convert->jira->domain),
|
||||
set::labelWidth($labelWidth),
|
||||
input
|
||||
(
|
||||
setClass('w-72'),
|
||||
set::name('jiraDomain'),
|
||||
set::value(zget($jiraApi, 'domain', ''))
|
||||
)
|
||||
) : null,
|
||||
$method == 'file' ? formGroup
|
||||
(
|
||||
set::label($lang->convert->jira->admin),
|
||||
set::labelWidth($labelWidth),
|
||||
input
|
||||
(
|
||||
setClass('w-72'),
|
||||
set::name('jiraAdmin'),
|
||||
set::value(zget($jiraApi, 'admin', ''))
|
||||
)
|
||||
) : null,
|
||||
$method == 'file' ? formGroup
|
||||
(
|
||||
set::label($lang->convert->jira->token),
|
||||
set::labelWidth($labelWidth),
|
||||
input
|
||||
(
|
||||
setClass('w-72'),
|
||||
set::name('jiraToken'),
|
||||
set::value(zget($jiraApi, 'token', ''))
|
||||
)
|
||||
) : null,
|
||||
);
|
||||
|
||||
render();
|
||||
@@ -10,16 +10,17 @@ declare(strict_types=1);
|
||||
*/
|
||||
namespace zin;
|
||||
|
||||
div
|
||||
panel
|
||||
(
|
||||
setClass('bg-white'),
|
||||
setID('importJira'),
|
||||
set::title($lang->convert->jira->importJira),
|
||||
div
|
||||
(
|
||||
setClass('flex justify-between panel-form text-center mx-auto size-sm p-8'),
|
||||
div
|
||||
(
|
||||
setClass('border border-hover rounded-md cursor-pointer open-url p-4 w-72 h-28'),
|
||||
set(array('data-url' => createLink('convert', 'importNotice', 'type=db'))),
|
||||
set(array('data-url' => createLink('convert', 'importJiraNotice', 'type=db'))),
|
||||
div
|
||||
(
|
||||
setClass('text-xl font-bold mb-4'),
|
||||
@@ -34,7 +35,7 @@ div
|
||||
div
|
||||
(
|
||||
setClass('border border-hover rounded-md cursor-pointer open-url p-4 w-72 h-28'),
|
||||
set(array('data-url' => createLink('convert', 'importNotice', 'type=file'))),
|
||||
set(array('data-url' => createLink('convert', 'importJiraNotice', 'type=file'))),
|
||||
div
|
||||
(
|
||||
setClass('text-xl font-bold mb-4'),
|
||||
@@ -10,58 +10,96 @@ declare(strict_types=1);
|
||||
*/
|
||||
namespace zin;
|
||||
|
||||
formPanel
|
||||
include('jiraside.html.php');
|
||||
|
||||
div
|
||||
(
|
||||
set::title($lang->convert->jira->initJiraUser),
|
||||
set::submitBtnText($lang->convert->jira->next),
|
||||
set::backUrl(inlink('mapJira2Zentao', "method={$method}&dbName={$this->session->jiraDB}&step=4")),
|
||||
formRow
|
||||
setClass('flex'),
|
||||
panel
|
||||
(
|
||||
formGroup
|
||||
(
|
||||
setClass('w-1/2'),
|
||||
set::label($lang->user->password),
|
||||
set::control('password'),
|
||||
set::name('password1'),
|
||||
set::placeholder($lang->user->placeholder->passwordStrength[0]),
|
||||
set::required(true)
|
||||
),
|
||||
formGroup
|
||||
(
|
||||
setClass('w-1/2'),
|
||||
icon('help self-center text-warning mr-1 pl-2'),
|
||||
span
|
||||
(
|
||||
setClass('self-center text-gray'),
|
||||
$lang->convert->jira->passwordNotice
|
||||
)
|
||||
)
|
||||
setClass('w-1/4 mr-4'),
|
||||
$items
|
||||
),
|
||||
formGroup
|
||||
panel
|
||||
(
|
||||
setClass('grow-0 w-1/2'),
|
||||
set::label($lang->user->password2),
|
||||
set::control('password'),
|
||||
set::name('password2'),
|
||||
set::required(true)
|
||||
),
|
||||
formRow
|
||||
(
|
||||
formGroup
|
||||
setClass('flex-1 m-0 p-0 overflow-y-scroll scrollbar-thin scrollbar-hover'),
|
||||
setStyle(array('max-height' => 'calc(100vh - 130px)')),
|
||||
formPanel
|
||||
(
|
||||
setClass('w-1/2'),
|
||||
set::label($lang->user->group),
|
||||
set::name('group'),
|
||||
set::items($groups)
|
||||
),
|
||||
formGroup
|
||||
(
|
||||
setClass('w-1/2'),
|
||||
icon('help self-center text-warning mr-1 pl-2'),
|
||||
span
|
||||
set::title($lang->convert->jira->steps['user']),
|
||||
set::actionsClass('hidden'),
|
||||
formRow
|
||||
(
|
||||
setClass('self-center text-gray'),
|
||||
$lang->convert->jira->groupNotice
|
||||
formGroup
|
||||
(
|
||||
setClass('w-1/2'),
|
||||
set::label($lang->user->account),
|
||||
set::control(array('control' => 'radioList', 'inline' => true)),
|
||||
set::name('mode'),
|
||||
set::items($lang->convert->jiraUserMode),
|
||||
set::value(!empty($_SESSION['jiraUser']) ? zget($this->session->jiraUser, 'mode', 'account') : 'account')
|
||||
),
|
||||
formGroup
|
||||
(
|
||||
setClass('w-1/2'),
|
||||
span
|
||||
(
|
||||
icon('help self-center text-warning mr-1 pl-2'),
|
||||
setClass('self-center text-gray'),
|
||||
$lang->convert->jira->accountNotice
|
||||
)
|
||||
)
|
||||
),
|
||||
formRow
|
||||
(
|
||||
formGroup
|
||||
(
|
||||
setClass('w-1/2'),
|
||||
set::label($lang->user->password),
|
||||
set::control('password'),
|
||||
set::name('password1'),
|
||||
set::placeholder($lang->user->placeholder->passwordStrength[0]),
|
||||
set::required(true)
|
||||
),
|
||||
formGroup
|
||||
(
|
||||
setClass('w-1/2'),
|
||||
span
|
||||
(
|
||||
icon('help self-center text-warning mr-1 pl-2'),
|
||||
setClass('self-center text-gray'),
|
||||
$lang->convert->jira->passwordNotice
|
||||
)
|
||||
)
|
||||
),
|
||||
formGroup
|
||||
(
|
||||
setClass('grow-0 w-1/2'),
|
||||
set::label($lang->user->password2),
|
||||
set::control('password'),
|
||||
set::name('password2'),
|
||||
set::required(true)
|
||||
),
|
||||
formRow
|
||||
(
|
||||
formGroup
|
||||
(
|
||||
setClass('w-1/2'),
|
||||
set::label($lang->user->group),
|
||||
set::name('group'),
|
||||
set::items($groups),
|
||||
set::value(!empty($_SESSION['jiraUser']) ? zget($this->session->jiraUser, 'group', '') : '')
|
||||
),
|
||||
formGroup
|
||||
(
|
||||
setClass('w-1/2'),
|
||||
span
|
||||
(
|
||||
icon('help self-center text-warning mr-1 pl-2'),
|
||||
setClass('self-center text-gray'),
|
||||
$lang->convert->jira->groupNotice
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
/**
|
||||
* The side view file of convert module of ZenTaoPMS.
|
||||
* @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.zentao.net)
|
||||
* @license ZPL(https://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
|
||||
* @author Gang Liu <liugang@easycorp.ltd>
|
||||
* @package convert
|
||||
* @link https://www.zentao.net
|
||||
*/
|
||||
namespace zin;
|
||||
|
||||
$items = array();
|
||||
foreach($stepList as $currentStep => $stepLabel)
|
||||
{
|
||||
$icon = '';
|
||||
$url = 'javascript:;';
|
||||
if($step == $currentStep)
|
||||
{
|
||||
$icon = icon('ellipsis-v', setClass('secondary rounded-full rotate-90 p-1 mx-2'));
|
||||
}
|
||||
else if(!empty($stepStatus[$currentStep]) && $stepStatus[$currentStep] == 'done')
|
||||
{
|
||||
$icon = icon('check', setClass('success rounded-full p-1 mx-2'));
|
||||
$url = inlink('mapJira2Zentao', "method={$method}&dbName={$dbName}&step={$currentStep}");
|
||||
if($currentStep == 'user') $url = inlink('initJiraUser', "method={$method}&dbName={$dbName}");
|
||||
}
|
||||
else
|
||||
{
|
||||
$icon = icon('ellipsis-v', setClass('gray-200 rounded-full rotate-90 text-white p-1 mx-2'));
|
||||
}
|
||||
|
||||
$items[] = a(set::href($url), div(setClass('h-10 border content-center mb-4'), $icon, span(setClass('text-black'), $stepLabel)));
|
||||
}
|
||||
|
||||
featureBar();
|
||||
toolbar
|
||||
(
|
||||
$backUrl ? item(set(array('text' => $lang->convert->jira->back, 'class' => 'default', 'url' => $backUrl))) : null,
|
||||
$step != 'confirme' ? item(set(array('text' => $lang->convert->jira->next, 'class' => 'primary', 'data-on' => 'click', 'data-call' => 'next', 'data-params' => 'event'))) : null
|
||||
);
|
||||
@@ -10,41 +10,22 @@ declare(strict_types=1);
|
||||
*/
|
||||
namespace zin;
|
||||
|
||||
$items = array();
|
||||
foreach($lang->convert->jira->steps as $key => $label)
|
||||
{
|
||||
$items[] = (object)array('text' => $label, 'active' => $key == $step);
|
||||
}
|
||||
include('jiraside.html.php');
|
||||
|
||||
div
|
||||
(
|
||||
setClass('main-header relative center size-lg mx-auto my-4'),
|
||||
setStyle(array('max-width' => 'var(--zt-panel-form-max-width)')),
|
||||
div
|
||||
(
|
||||
setClass('absolute left-0'),
|
||||
$lang->convert->jira->mapJira2Zentao
|
||||
),
|
||||
navigator
|
||||
(
|
||||
set::items($items)
|
||||
),
|
||||
);
|
||||
|
||||
$buildHeader = function(string $label, int $count = 2): h
|
||||
$buildHeader = function(string $label): h
|
||||
{
|
||||
return div
|
||||
(
|
||||
setClass("flex justify-center text-md font-bold w-1/{$count}"),
|
||||
setClass("flex-1 text-center text-md font-bold"),
|
||||
$label
|
||||
);
|
||||
};
|
||||
|
||||
$buildJira = function(string $name, int $count, string $label, int $value): h
|
||||
$buildJira = function(string $name, string $label, int $value): h
|
||||
{
|
||||
return div
|
||||
(
|
||||
setClass("flex justify-center w-1/{$count}"),
|
||||
setClass("flex-1 text-center"),
|
||||
$label,
|
||||
input
|
||||
(
|
||||
@@ -55,22 +36,35 @@ $buildJira = function(string $name, int $count, string $label, int $value): h
|
||||
);
|
||||
};
|
||||
|
||||
$buildZenTao = function(string $name, int $count, array $items): h
|
||||
$buildZenTao = function(string $name, array $items, string|int $index = '', string $key = '', string $default = '') use($jiraRelation, $defaultValue): h
|
||||
{
|
||||
$default = !empty($defaultValue[$name][$key]) ? $defaultValue[$name][$key] : $default;
|
||||
return div
|
||||
(
|
||||
setClass("ml-4 w-1/{$count}"),
|
||||
setClass("flex-1 mx-2"),
|
||||
picker
|
||||
(
|
||||
set::name("{$name}[]"),
|
||||
set::items($items)
|
||||
set::name("{$name}[$index]"),
|
||||
set::items($items),
|
||||
set::value(!empty($jiraRelation[$name][$index]) ? $jiraRelation[$name][$index] : $default)
|
||||
)
|
||||
);
|
||||
};
|
||||
|
||||
$rows = array();
|
||||
if($step == 1)
|
||||
if($step == 'object')
|
||||
{
|
||||
$rows[] = div
|
||||
(
|
||||
setClass('panel-title'),
|
||||
span(setClass('text-lg'), $lang->convert->jira->steps[$step]),
|
||||
span
|
||||
(
|
||||
icon('help self-center text-warning mr-1 pl-2'),
|
||||
setClass('self-center font-medium text-gray'),
|
||||
$lang->convert->jira->mapObjectNotice
|
||||
)
|
||||
);
|
||||
$rows[] = formRow
|
||||
(
|
||||
$buildHeader($lang->convert->jira->jiraObject),
|
||||
@@ -78,88 +72,190 @@ if($step == 1)
|
||||
);
|
||||
foreach($issueTypeList as $id => $issueType)
|
||||
{
|
||||
$value = $method == 'db' ? $issueType->pname : $issueType['name'];
|
||||
$value = $issueType->pname;
|
||||
|
||||
$rows[] = formRow
|
||||
(
|
||||
$buildJira('jiraObject', 2, $value, $id),
|
||||
$buildZenTao('zentaoObject', 2, $lang->convert->jira->zentaoObjectList)
|
||||
$buildJira('jiraObject', $value, $id),
|
||||
$buildZenTao('zentaoObject', $zentaoObjects, $id, $value)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if($step == 2)
|
||||
if(!empty($jiraRelation['zentaoObject']) && in_array($step, array_keys($jiraRelation['zentaoObject'])))
|
||||
{
|
||||
if(!empty($fieldList))
|
||||
{
|
||||
$rows[] = div
|
||||
(
|
||||
setClass('panel-title'),
|
||||
span(setClass('text-lg'), $lang->convert->jira->objectField),
|
||||
span
|
||||
(
|
||||
icon('help self-center text-warning mr-1 pl-2'),
|
||||
setClass('self-center font-medium text-gray'),
|
||||
$lang->convert->jira->mapFieldNotice
|
||||
)
|
||||
);
|
||||
$rows[] = formRow
|
||||
(
|
||||
$buildHeader(sprintf($lang->convert->jira->jiraField, zget($issueTypeList[$step], 'pname', ''))),
|
||||
$buildHeader(sprintf($lang->convert->jira->zentaoField, zget($zentaoObjects, $jiraRelation['zentaoObject'][$step])))
|
||||
);
|
||||
|
||||
$zentaoFields = $this->convert->getZentaoFields($jiraRelation['zentaoObject'][$step]);
|
||||
foreach($fieldList as $id => $field)
|
||||
{
|
||||
$rows[] = formRow
|
||||
(
|
||||
$buildJira("jiraField$step", $field, $id),
|
||||
$buildZenTao("zentaoField$step", $zentaoFields, $id, $field, 'add_field')
|
||||
);
|
||||
}
|
||||
$rows[] = divider();
|
||||
}
|
||||
if(!empty($statusList))
|
||||
{
|
||||
$zentaoStatusList = $this->convert->getZentaoStatus($jiraRelation['zentaoObject'][$step]);
|
||||
$defaultStatus = $this->convert->convertStatus($jiraRelation['zentaoObject'][$step], '', '');
|
||||
$rows[] = div
|
||||
(
|
||||
setClass('panel-title'),
|
||||
span(setClass('text-lg'), $lang->convert->jira->objectStatus),
|
||||
span
|
||||
(
|
||||
icon('help self-center text-warning mr-1 pl-2'),
|
||||
setClass('self-center font-medium text-gray'),
|
||||
sprintf($lang->convert->jira->mapStatusNotice, zget($zentaoStatusList, $defaultStatus))
|
||||
)
|
||||
);
|
||||
$rows[] = formRow
|
||||
(
|
||||
$buildHeader(sprintf($lang->convert->jira->jiraStatus, zget($issueTypeList[$step], 'pname', ''))),
|
||||
$buildHeader(sprintf($lang->convert->jira->zentaoStatus, zget($zentaoObjects, $jiraRelation['zentaoObject'][$step]))),
|
||||
in_array($jiraRelation['zentaoObject'][$step], array('requirement', 'story', 'epic')) ? $buildHeader(sprintf($lang->convert->jira->zentaoStage, zget($zentaoObjects, $jiraRelation['zentaoObject'][$step]))) : null
|
||||
);
|
||||
|
||||
foreach($statusList as $id => $status)
|
||||
{
|
||||
$rows[] = formRow
|
||||
(
|
||||
$buildJira("jiraStatus$step", $status, $id),
|
||||
$buildZenTao("zentaoStatus$step", $zentaoStatusList, $id, $status),
|
||||
in_array($jiraRelation['zentaoObject'][$step], array('requirement', 'story', 'epic')) ? $buildZenTao("zentaoStage$step", $lang->story->stageList, $id, $status) : null
|
||||
);
|
||||
}
|
||||
}
|
||||
if(!empty($jiraActions))
|
||||
{
|
||||
$rows[] = formRow
|
||||
(
|
||||
setClass('hidden'),
|
||||
$buildHeader(sprintf($lang->convert->jira->jiraAction, zget($issueTypeList[$step], 'pname', ''))),
|
||||
$buildHeader(sprintf($lang->convert->jira->zentaoAction, zget($zentaoObjects, $jiraRelation['zentaoObject'][$step])))
|
||||
);
|
||||
|
||||
$zentaoActions = $this->convert->getZentaoActions($jiraRelation['zentaoObject'][$step]);
|
||||
foreach($jiraActions['actions'] as $id => $action)
|
||||
{
|
||||
$value = $action['name'];
|
||||
$rows[] = formRow
|
||||
(
|
||||
setClass('hidden'),
|
||||
$buildJira("jiraAction$step", $value, $id),
|
||||
$buildZenTao("zentaoAction$step", $zentaoActions, $id, $value, 'add_action')
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if(in_array($jiraRelation['zentaoObject'][$step], array('bug', 'task', 'story', 'requirement', 'epic')))
|
||||
{
|
||||
$rows[] = divider();
|
||||
$rows[] = div
|
||||
(
|
||||
setClass('panel-title'),
|
||||
span(setClass('text-lg'), $lang->convert->jira->objectResolution),
|
||||
span
|
||||
(
|
||||
icon('help self-center text-warning mr-1 pl-2'),
|
||||
setClass('self-center font-medium text-gray'),
|
||||
$lang->convert->jira->mapReasonNotice
|
||||
)
|
||||
);
|
||||
$rows[] = formRow
|
||||
(
|
||||
$buildHeader(sprintf($lang->convert->jira->jiraResolution, zget($issueTypeList[$step], 'pname', ''))),
|
||||
$buildHeader(sprintf($jiraRelation['zentaoObject'][$step] == 'bug' ? $lang->convert->jira->zentaoResolution : $lang->convert->jira->zentaoReason, zget($zentaoObjects, $jiraRelation['zentaoObject'][$step])))
|
||||
);
|
||||
|
||||
foreach($resolutionList as $id => $resolution)
|
||||
{
|
||||
$value = $resolution->pname;
|
||||
$module = $jiraRelation['zentaoObject'][$step];
|
||||
if($module == 'epic' || $module == 'story' || $module == 'requirement') $module = 'story';
|
||||
$reasonList = $module == 'bug' ? $lang->bug->resolutionList + array('add_resolution' => $lang->convert->add) : $lang->{$module}->reasonList + array('add_reason' => $lang->convert->add);
|
||||
if($module == 'epic' || $module == 'story' || $module == 'requirement') unset($reasonList['subdivided']);
|
||||
$rows[] = formRow
|
||||
(
|
||||
$buildJira("jiraResolution$step", $value, $id),
|
||||
$module == 'bug' ? $buildZenTao("zentaoResolution$step", $reasonList, $id, $value) : $buildZenTao("zentaoReason$step", $reasonList, $id, $value)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if($step == 'relation')
|
||||
{
|
||||
$rows[] = div
|
||||
(
|
||||
setClass('panel-title'),
|
||||
span(setClass('text-lg'), $lang->convert->jira->steps[$step]),
|
||||
span
|
||||
(
|
||||
icon('help self-center text-warning mr-1 pl-2'),
|
||||
setClass('self-center font-medium text-gray'),
|
||||
$lang->convert->jira->mapRelationNotice
|
||||
)
|
||||
);
|
||||
$rows[] = formRow
|
||||
(
|
||||
$buildHeader($lang->convert->jira->jiraLinkType),
|
||||
$buildHeader($lang->convert->jira->zentaoLinkType)
|
||||
);
|
||||
$relationList = $this->convert->getZentaoRelationList();
|
||||
foreach($linkTypeList as $id => $linkType)
|
||||
{
|
||||
$value = $method == 'db' ? $linkType->linkname : $linkType['linkname'];
|
||||
$value = $linkType->LINKNAME;
|
||||
|
||||
$rows[] = formRow
|
||||
(
|
||||
$buildJira('jiraLinkType', 2, $value, $id),
|
||||
$buildZenTao('zentaoLinkType', 2, $lang->convert->jira->zentaoLinkTypeList)
|
||||
$buildJira('jiraLinkType', $value, $id),
|
||||
$buildZenTao('zentaoLinkType', $relationList, $id)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if($step == 3)
|
||||
{
|
||||
$rows[] = formRow
|
||||
(
|
||||
$buildHeader($lang->convert->jira->jiraResolution, 3),
|
||||
$buildHeader($lang->convert->jira->zentaoResolution, 3),
|
||||
$buildHeader($lang->convert->jira->zentaoReason, 3)
|
||||
);
|
||||
foreach($resolutionList as $id => $resolution)
|
||||
{
|
||||
$value = $method == 'db' ? $resolution->pname : $resolution['name'];
|
||||
|
||||
$rows[] = formRow
|
||||
(
|
||||
$buildJira('jiraResolution', 3, $value, $id),
|
||||
$buildZenTao('zentaoResolution', 3, $lang->bug->resolutionList),
|
||||
$buildZenTao('zentaoReason', 3, $lang->story->reasonList)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if($step == 4)
|
||||
{
|
||||
$rows[] = formRow
|
||||
(
|
||||
$buildHeader($lang->convert->jira->jiraStatus, 5),
|
||||
$buildHeader($lang->convert->jira->storyStatus, 5),
|
||||
$buildHeader($lang->convert->jira->storyStage, 5),
|
||||
$buildHeader($lang->convert->jira->taskStatus, 5),
|
||||
$buildHeader($lang->convert->jira->bugStatus, 5)
|
||||
);
|
||||
foreach($statusList as $id => $status)
|
||||
{
|
||||
$value = $method == 'db' ? $status->pname : $status['name'];
|
||||
|
||||
$rows[] = formRow
|
||||
(
|
||||
$buildJira('jiraStatus', 5, $value, $id),
|
||||
$buildZenTao('storyStatus', 5, $lang->story->statusList),
|
||||
$buildZenTao('storyStage', 5, $lang->story->stageList),
|
||||
$buildZenTao('taskStatus', 5, $lang->task->statusList),
|
||||
$buildZenTao('bugStatus', 5, $lang->bug->statusList)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
$backUrl = $step == 1 ? inlink('importNotice', "method={$method}") : inlink('mapJira2Zentao', "method={$method}&dbName={$dbName}&step=" . --$step);
|
||||
|
||||
formPanel
|
||||
div
|
||||
(
|
||||
set::submitBtnText($lang->convert->jira->next),
|
||||
set::backUrl($backUrl),
|
||||
$rows
|
||||
setClass('flex'),
|
||||
panel
|
||||
(
|
||||
setClass('w-1/4 mr-4 overflow-y-scroll scrollbar-thin scrollbar-hover'),
|
||||
setStyle(array('max-height' => 'calc(100vh - 130px)')),
|
||||
$items
|
||||
),
|
||||
panel
|
||||
(
|
||||
setClass('flex-1 m-0 p-0 overflow-y-scroll scrollbar-thin scrollbar-hover'),
|
||||
setStyle(array('max-height' => 'calc(100vh - 130px)')),
|
||||
formPanel
|
||||
(
|
||||
on::change('[name^="zentaoField"]', 'changeField'),
|
||||
setClass('p-0'),
|
||||
set::actionsClass('hidden'),
|
||||
$rows
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
render();
|
||||
|
||||
@@ -42,6 +42,7 @@ $config->doc->form->create['execution'] = array('type' => 'int', 'requir
|
||||
$config->doc->form->create['module'] = array('type' => 'string', 'required' => false, 'default' => '');
|
||||
$config->doc->form->create['lib'] = array('type' => 'int', 'required' => false, 'default' => 0);
|
||||
$config->doc->form->create['status'] = array('type' => 'string', 'required' => false, 'default' => 'normal');
|
||||
$config->doc->form->create['parent'] = array('type' => 'int', 'required' => false, 'default' => 0);
|
||||
$config->doc->form->create['type'] = array('type' => 'string', 'required' => false, 'default' => '');
|
||||
$config->doc->form->create['keywords'] = array('type' => 'string', 'required' => false, 'default' => '', 'skipRequired' => true);
|
||||
$config->doc->form->create['acl'] = array('type' => 'string', 'required' => false, 'default' => '');
|
||||
@@ -52,6 +53,8 @@ $config->doc->form->create['editedBy'] = array('type' => 'string', 'requir
|
||||
$config->doc->form->create['editedDate'] = array('type' => 'datetime', 'required' => false, 'default' => $now);
|
||||
$config->doc->form->create['groups'] = array('type' => 'array', 'required' => false, 'default' => '', 'filter' => 'join');
|
||||
$config->doc->form->create['users'] = array('type' => 'array', 'required' => false, 'default' => '', 'filter' => 'join');
|
||||
$config->doc->form->create['readGroups'] = array('type' => 'array', 'required' => false, 'default' => '', 'filter' => 'join');
|
||||
$config->doc->form->create['readUsers'] = array('type' => 'array', 'required' => false, 'default' => '', 'filter' => 'join');
|
||||
$config->doc->form->create['mailto'] = array('type' => 'array', 'required' => false, 'default' => '', 'filter' => 'join');
|
||||
$config->doc->form->create['contentType'] = array('type' => 'string', 'required' => false, 'default' => 'doc');
|
||||
$config->doc->form->create['content'] = array('type' => 'string', 'required' => false, 'default' => '', 'control' => 'editor', 'skipRequired' => true);
|
||||
@@ -69,6 +72,7 @@ $config->doc->form->edit['execution'] = array('type' => 'int', 'required'
|
||||
$config->doc->form->edit['module'] = array('type' => 'string', 'required' => false, 'default' => '');
|
||||
$config->doc->form->edit['lib'] = array('type' => 'int', 'required' => false, 'default' => 0, 'skipRequired' => true);
|
||||
$config->doc->form->edit['status'] = array('type' => 'string', 'required' => false, 'default' => 'normal');
|
||||
$config->doc->form->edit['parent'] = array('type' => 'int', 'required' => false, 'default' => 0);
|
||||
$config->doc->form->edit['type'] = array('type' => 'string', 'required' => false, 'default' => '');
|
||||
$config->doc->form->edit['keywords'] = array('type' => 'string', 'required' => false, 'default' => '', 'skipRequired' => true);
|
||||
$config->doc->form->edit['acl'] = array('type' => 'string', 'required' => false, 'default' => '');
|
||||
@@ -77,6 +81,8 @@ $config->doc->form->edit['content'] = array('type' => 'string', 'required'
|
||||
$config->doc->form->edit['rawContent'] = array('type' => 'string', 'required' => false, 'default' => '', 'skipRequired' => true, 'specialchars' => 'no');
|
||||
$config->doc->form->edit['groups'] = array('type' => 'array', 'required' => false, 'default' => '', 'filter' => 'join');
|
||||
$config->doc->form->edit['users'] = array('type' => 'array', 'required' => false, 'default' => '', 'filter' => 'join');
|
||||
$config->doc->form->edit['readGroups'] = array('type' => 'array', 'required' => false, 'default' => '', 'filter' => 'join');
|
||||
$config->doc->form->edit['readUsers'] = array('type' => 'array', 'required' => false, 'default' => '', 'filter' => 'join');
|
||||
$config->doc->form->edit['mailto'] = array('type' => 'array', 'required' => false, 'default' => '', 'filter' => 'join');
|
||||
$config->doc->form->edit['editedBy'] = array('type' => 'string', 'required' => false, 'default' => '');
|
||||
$config->doc->form->edit['editedDate'] = array('type' => 'datetime', 'required' => false, 'default' => $now);
|
||||
|
||||
+15
-6
@@ -815,14 +815,20 @@ class doc extends control
|
||||
{
|
||||
if(!$doc) return $this->send(array('result' => 'fail', 'message' => $this->lang->doc->errorNotFound));
|
||||
|
||||
|
||||
$isOpen = $doc->acl == 'open';
|
||||
$currentAccount = $this->app->user->account;
|
||||
$isAuthorOrAdmin = $doc->acl == 'private' && ($doc->addedBy == $currentAccount || $this->app->user->admin);
|
||||
$isInEditUsers = strpos(",$doc->users,", ",$currentAccount,") !== false;
|
||||
|
||||
if(!$isOpen && !$isAuthorOrAdmin && !$isInEditUsers) return $this->send(array('result' => 'fail', 'message' => $this->lang->doc->needEditable));
|
||||
|
||||
$changes = $files = array();
|
||||
if($comment == false)
|
||||
{
|
||||
$docData = form::data()
|
||||
->setDefault('editedBy', $this->app->user->account)
|
||||
->setDefault('mailto', $doc->mailto)
|
||||
->setDefault('users', $doc->users)
|
||||
->setDefault('groups', $doc->groups)
|
||||
->setIF(strpos(",$doc->editedList,", ",{$this->app->user->account},") === false, 'editedList', $doc->editedList . ",{$this->app->user->account}")
|
||||
->removeIF($this->post->project === false, 'project')
|
||||
->removeIF($this->post->product === false, 'product')
|
||||
@@ -2052,10 +2058,10 @@ class doc extends control
|
||||
$libs = $this->doc->getLibsOfSpace($type, $spaceID);
|
||||
$libIds = array_keys($libs);
|
||||
|
||||
if($noPicks || strpos($picks, ',space,') !== false) $data['spaces'] = $spaces;
|
||||
if($noPicks || strpos($picks, ',lib,') !== false) $data['libs'] = array_values($libs);
|
||||
if($noPicks || strpos($picks, ',space,') !== false) $data['spaces'] = $spaces;
|
||||
if($noPicks || strpos($picks, ',lib,') !== false) $data['libs'] = array_values($libs);
|
||||
if($noPicks || strpos($picks, ',module,') !== false) $data['modules'] = array_values($this->doc->getModulesOfLibs($libIds));
|
||||
if($noPicks || strpos($picks, ',doc,') !== false) $data['docs'] = array_values($this->doc->getDocsOfLibs($libIds + array($spaceID), $type));
|
||||
if($noPicks || strpos($picks, ',doc,') !== false) $data['docs'] = array_values($this->doc->getDocsOfLibs($libIds + array($spaceID), $type));
|
||||
}
|
||||
|
||||
$this->send($data);
|
||||
@@ -2179,7 +2185,7 @@ class doc extends control
|
||||
* @param string $isDraft
|
||||
* @access public
|
||||
*/
|
||||
public function setDocBasic(string $objectType, int $objectID, int $libID = 0, int $moduleID = 0, int $docID = 0, string $isDraft = 'no')
|
||||
public function setDocBasic(string $objectType, int $objectID, int $libID = 0, int $moduleID = 0, int $docID = 0, string $isDraft = 'no', string $withTitle = 'no')
|
||||
{
|
||||
$lib = $libID ? $this->doc->getLibByID($libID) : '';
|
||||
if(empty($docID))
|
||||
@@ -2218,6 +2224,8 @@ class doc extends control
|
||||
if($isDraft == 'yes') $title = $this->lang->doc->saveDraft;
|
||||
elseif(empty($docID)) $title = $this->lang->doc->release;
|
||||
|
||||
if($withTitle == 'yes') $title = $this->lang->doc->create;
|
||||
|
||||
$this->view->mode = empty($docID) ? 'create' : 'edit';
|
||||
$this->view->users = $this->user->getPairs('nocode|noclosed|nodeleted');
|
||||
$this->view->groups = $this->loadModel('group')->getPairs();
|
||||
@@ -2229,6 +2237,7 @@ class doc extends control
|
||||
$this->view->libs = $libPairs;
|
||||
$this->view->docID = $docID;
|
||||
$this->view->isDraft = $isDraft == 'yes';
|
||||
$this->view->withTitle = $withTitle == 'yes';
|
||||
$this->view->title = $title;
|
||||
$this->display();
|
||||
}
|
||||
|
||||
@@ -250,6 +250,7 @@ window.toggleWhiteList = function(e)
|
||||
{
|
||||
const acl = e.target.value;
|
||||
$('#whiteListBox').toggleClass('hidden', acl == 'open');
|
||||
$('#readListBox').toggleClass('hidden', acl == 'open');
|
||||
}
|
||||
|
||||
$(document).on('mousedown', '.ajaxCollect', function (event)
|
||||
@@ -339,12 +340,12 @@ window.checkObjectPriv = function(e)
|
||||
});
|
||||
}
|
||||
|
||||
window.checkLibPriv = function(e)
|
||||
window.checkLibPriv = function(id, formName)
|
||||
{
|
||||
$whiteListBox = $('#whiteListBox');
|
||||
if($whiteListBox.length == 0 || $whiteListBox.hasClass('hidden')) return;
|
||||
$listBox = $(id);
|
||||
if($listBox.length == 0 || $listBox.hasClass('hidden')) return;
|
||||
|
||||
let $users = $('#whiteListBox [name^=users]');
|
||||
let $users = $listBox.find(`[name^=${formName}]`);
|
||||
let users = $users.val();
|
||||
if(users.length == 0) return;
|
||||
|
||||
|
||||
@@ -168,6 +168,8 @@ $lang->doc->basicInfo = 'Basis Info';
|
||||
$lang->doc->deleted = 'Gelöscht';
|
||||
$lang->doc->fileObject = 'Das Objekt';
|
||||
$lang->doc->whiteList = 'White List';
|
||||
$lang->doc->readonly = 'Readonly';
|
||||
$lang->doc->editable = 'Editable';
|
||||
$lang->doc->contentType = 'Format';
|
||||
$lang->doc->separator = "<i class='icon-angle-right'></i>";
|
||||
$lang->doc->fileTitle = 'Dateiname';
|
||||
@@ -205,6 +207,7 @@ $lang->doc->manage = 'Document Management';
|
||||
$lang->doc->release = 'Release';
|
||||
$lang->doc->story = 'Story';
|
||||
$lang->doc->convertdoc = 'Convert doc';
|
||||
$lang->doc->needEditable = 'This document is not editable.';
|
||||
|
||||
$lang->doc->moduleDoc = 'Nach Modulen';
|
||||
$lang->doc->searchDoc = 'Suche';
|
||||
@@ -324,6 +327,15 @@ $lang->doc->emptyError = 'Not empty';
|
||||
$lang->doc->caselib = 'Case Library';
|
||||
$lang->doc->customSearch = 'Custom Search';
|
||||
|
||||
$lang->doc->addChapter = 'Add chapter';
|
||||
$lang->doc->editChapter = 'Edit chapter';
|
||||
$lang->doc->sortChapter = 'Sort chapter';
|
||||
$lang->doc->deleteChapter = 'Delete chapter';
|
||||
$lang->doc->addSubChapter = 'Add sub chapter';
|
||||
$lang->doc->addSameChapter = 'Add same chapter';
|
||||
$lang->doc->addSubDoc = 'Add sub document';
|
||||
$lang->doc->chapterName = 'Chapter name';
|
||||
|
||||
$lang->doc->tips = new stdclass();
|
||||
$lang->doc->tips->noProduct = 'No product, please create first';
|
||||
$lang->doc->tips->noProject = 'No project, please create first';
|
||||
@@ -587,6 +599,7 @@ $lang->doc->docLang->exportHtml = "Export HTML";
|
||||
$lang->doc->docLang->exportMarkdown = "Export Markdown";
|
||||
$lang->doc->docLang->exportJSON = "Export Backup(.json)";
|
||||
$lang->doc->docLang->importMarkdown = "Import Markdown";
|
||||
$lang->doc->docLang->importConfluence = "Import Confluence Storage";
|
||||
$lang->doc->docLang->importJSON = "Import Backup(.json)";
|
||||
$lang->doc->docLang->importConfirm = "Import will overwrite the current document content. Are you sure you want to import?";
|
||||
$lang->doc->docLang->settings = $lang->settings;
|
||||
@@ -723,6 +736,12 @@ $lang->doc->docLang->switchToOldEditor = 'Switch to old editor';
|
||||
$lang->doc->docLang->zentaoList = $lang->doc->zentaoList;
|
||||
$lang->doc->docLang->list = $lang->doc->list;
|
||||
$lang->doc->docLang->loadingFile = 'Downloading document images...';
|
||||
$lang->doc->docLang->needEditable = $lang->doc->needEditable;
|
||||
$lang->doc->docLang->addChapter = $lang->doc->addChapter;
|
||||
$lang->doc->docLang->addSubChapter = $lang->doc->addSubChapter;
|
||||
$lang->doc->docLang->addSameChapter = $lang->doc->addSameChapter;
|
||||
$lang->doc->docLang->addSubDoc = $lang->doc->addSubDoc;
|
||||
$lang->doc->docLang->chapterName = $lang->doc->chapterName;
|
||||
|
||||
$lang->docTemplate->moduleName = array();
|
||||
$lang->docTemplate->moduleName['plan'] = 'plan';
|
||||
|
||||
@@ -168,6 +168,8 @@ $lang->doc->basicInfo = 'Basic Information';
|
||||
$lang->doc->deleted = 'Deleted';
|
||||
$lang->doc->fileObject = 'Dependent Item';
|
||||
$lang->doc->whiteList = 'Whitelist';
|
||||
$lang->doc->readonly = 'Readonly';
|
||||
$lang->doc->editable = 'Editable';
|
||||
$lang->doc->contentType = 'Format';
|
||||
$lang->doc->separator = "<i class='icon-angle-right'></i>";
|
||||
$lang->doc->fileTitle = 'File Name';
|
||||
@@ -205,6 +207,7 @@ $lang->doc->manage = 'Document Management';
|
||||
$lang->doc->release = 'Release';
|
||||
$lang->doc->story = 'Story';
|
||||
$lang->doc->convertdoc = 'Convert doc';
|
||||
$lang->doc->needEditable = 'This document is not editable.';
|
||||
|
||||
$lang->doc->moduleDoc = 'By Module';
|
||||
$lang->doc->searchDoc = 'Search';
|
||||
@@ -324,6 +327,15 @@ $lang->doc->emptyError = 'Not empty';
|
||||
$lang->doc->caselib = 'Case Library';
|
||||
$lang->doc->customSearch = 'Custom Search';
|
||||
|
||||
$lang->doc->addChapter = 'Add chapter';
|
||||
$lang->doc->editChapter = 'Edit chapter';
|
||||
$lang->doc->sortChapter = 'Sort chapter';
|
||||
$lang->doc->deleteChapter = 'Delete chapter';
|
||||
$lang->doc->addSubChapter = 'Add sub chapter';
|
||||
$lang->doc->addSameChapter = 'Add same chapter';
|
||||
$lang->doc->addSubDoc = 'Add sub document';
|
||||
$lang->doc->chapterName = 'Chapter name';
|
||||
|
||||
$lang->doc->tips = new stdclass();
|
||||
$lang->doc->tips->noProduct = 'No product, please create first';
|
||||
$lang->doc->tips->noProject = 'No project, please create first';
|
||||
@@ -587,6 +599,7 @@ $lang->doc->docLang->exportHtml = "Export HTML";
|
||||
$lang->doc->docLang->exportMarkdown = "Export Markdown";
|
||||
$lang->doc->docLang->exportJSON = "Export Backup(.json)";
|
||||
$lang->doc->docLang->importMarkdown = "Import Markdown";
|
||||
$lang->doc->docLang->importConfluence = "Import Confluence Storage";
|
||||
$lang->doc->docLang->importJSON = "Import Backup(.json)";
|
||||
$lang->doc->docLang->importConfirm = "Import will overwrite the current document content. Are you sure you want to import?";
|
||||
$lang->doc->docLang->settings = $lang->settings;
|
||||
@@ -723,6 +736,12 @@ $lang->doc->docLang->switchToOldEditor = 'Switch to old editor';
|
||||
$lang->doc->docLang->zentaoList = $lang->doc->zentaoList;
|
||||
$lang->doc->docLang->list = $lang->doc->list;
|
||||
$lang->doc->docLang->loadingFile = 'Downloading document images...';
|
||||
$lang->doc->docLang->needEditable = $lang->doc->needEditable;
|
||||
$lang->doc->docLang->addChapter = $lang->doc->addChapter;
|
||||
$lang->doc->docLang->addSubChapter = $lang->doc->addSubChapter;
|
||||
$lang->doc->docLang->addSameChapter = $lang->doc->addSameChapter;
|
||||
$lang->doc->docLang->addSubDoc = $lang->doc->addSubDoc;
|
||||
$lang->doc->docLang->chapterName = $lang->doc->chapterName;
|
||||
|
||||
$lang->docTemplate->moduleName = array();
|
||||
$lang->docTemplate->moduleName['plan'] = 'plan';
|
||||
|
||||
@@ -168,6 +168,8 @@ $lang->doc->basicInfo = 'Infos de Base';
|
||||
$lang->doc->deleted = 'Supprimé';
|
||||
$lang->doc->fileObject = 'Objet Dépendant';
|
||||
$lang->doc->whiteList = 'Liste Blanche';
|
||||
$lang->doc->readonly = 'Readonly';
|
||||
$lang->doc->editable = 'Editable';
|
||||
$lang->doc->contentType = 'Format';
|
||||
$lang->doc->separator = "<i class='icon-angle-right'></i>";
|
||||
$lang->doc->fileTitle = 'Nom du Fichier';
|
||||
@@ -205,6 +207,7 @@ $lang->doc->manage = 'Document Management';
|
||||
$lang->doc->release = 'Release';
|
||||
$lang->doc->story = 'Story';
|
||||
$lang->doc->convertdoc = 'Convert doc';
|
||||
$lang->doc->needEditable = 'This document is not editable.';
|
||||
|
||||
$lang->doc->moduleDoc = 'Par Module';
|
||||
$lang->doc->searchDoc = 'Rechercher';
|
||||
@@ -324,6 +327,15 @@ $lang->doc->emptyError = 'Not empty';
|
||||
$lang->doc->caselib = 'Case Library';
|
||||
$lang->doc->customSearch = 'Custom Search';
|
||||
|
||||
$lang->doc->addChapter = 'Add chapter';
|
||||
$lang->doc->editChapter = 'Edit chapter';
|
||||
$lang->doc->sortChapter = 'Sort chapter';
|
||||
$lang->doc->deleteChapter = 'Delete chapter';
|
||||
$lang->doc->addSubChapter = 'Add sub chapter';
|
||||
$lang->doc->addSameChapter = 'Add same chapter';
|
||||
$lang->doc->addSubDoc = 'Add sub document';
|
||||
$lang->doc->chapterName = 'Chapter name';
|
||||
|
||||
$lang->doc->tips = new stdclass();
|
||||
$lang->doc->tips->noProduct = 'No product, please create first';
|
||||
$lang->doc->tips->noProject = 'No project, please create first';
|
||||
@@ -587,6 +599,7 @@ $lang->doc->docLang->exportHtml = "Export HTML";
|
||||
$lang->doc->docLang->exportMarkdown = "Export Markdown";
|
||||
$lang->doc->docLang->exportJSON = "Export Backup(.json)";
|
||||
$lang->doc->docLang->importMarkdown = "Import Markdown";
|
||||
$lang->doc->docLang->importConfluence = "Import Confluence Storage";
|
||||
$lang->doc->docLang->importJSON = "Import Backup(.json)";
|
||||
$lang->doc->docLang->importConfirm = "Import will overwrite the current document content. Are you sure you want to import?";
|
||||
$lang->doc->docLang->settings = $lang->settings;
|
||||
@@ -723,6 +736,12 @@ $lang->doc->docLang->switchToOldEditor = 'Switch to old editor';
|
||||
$lang->doc->docLang->zentaoList = $lang->doc->zentaoList;
|
||||
$lang->doc->docLang->list = $lang->doc->list;
|
||||
$lang->doc->docLang->loadingFile = 'Downloading document images...';
|
||||
$lang->doc->docLang->needEditable = $lang->doc->needEditable;
|
||||
$lang->doc->docLang->addChapter = $lang->doc->addChapter;
|
||||
$lang->doc->docLang->addSubChapter = $lang->doc->addSubChapter;
|
||||
$lang->doc->docLang->addSameChapter = $lang->doc->addSameChapter;
|
||||
$lang->doc->docLang->addSubDoc = $lang->doc->addSubDoc;
|
||||
$lang->doc->docLang->chapterName = $lang->doc->chapterName;
|
||||
|
||||
$lang->docTemplate->moduleName = array();
|
||||
$lang->docTemplate->moduleName['plan'] = 'plan';
|
||||
|
||||
@@ -143,7 +143,7 @@ $lang->doc->project = "所属{$lang->projectCommon}";
|
||||
$lang->doc->execution = '所属' . $lang->execution->common;
|
||||
$lang->doc->plan = '所属计划';
|
||||
$lang->doc->lib = '所属库';
|
||||
$lang->doc->module = '所属目录';
|
||||
$lang->doc->module = '所属父级';
|
||||
$lang->doc->libAndModule = '所属库&目录';
|
||||
$lang->doc->object = '所属对象';
|
||||
$lang->doc->title = '文档标题';
|
||||
@@ -168,6 +168,8 @@ $lang->doc->basicInfo = '基本信息';
|
||||
$lang->doc->deleted = '已删除';
|
||||
$lang->doc->fileObject = '所属对象';
|
||||
$lang->doc->whiteList = '白名单';
|
||||
$lang->doc->readonly = '只读';
|
||||
$lang->doc->editable = '可编辑';
|
||||
$lang->doc->contentType = '文档格式';
|
||||
$lang->doc->separator = "<i class='icon-angle-right'></i>";
|
||||
$lang->doc->fileTitle = '附件名称';
|
||||
@@ -205,6 +207,7 @@ $lang->doc->manage = '文档管理';
|
||||
$lang->doc->release = '发布';
|
||||
$lang->doc->story = '需求';
|
||||
$lang->doc->convertdoc = '转换为文档';
|
||||
$lang->doc->needEditable = '您没有当前文档的编辑权限。';
|
||||
|
||||
$lang->doc->moduleDoc = '按模块浏览';
|
||||
$lang->doc->searchDoc = '搜索';
|
||||
@@ -324,6 +327,15 @@ $lang->doc->emptyError = '不能为空';
|
||||
$lang->doc->caselib = '用例库';
|
||||
$lang->doc->customSearch = '自定义搜索';
|
||||
|
||||
$lang->doc->addChapter = '添加章节';
|
||||
$lang->doc->editChapter = '编辑章节';
|
||||
$lang->doc->sortChapter = '排序章节';
|
||||
$lang->doc->deleteChapter = '删除章节';
|
||||
$lang->doc->addSubChapter = '添加子章节';
|
||||
$lang->doc->addSameChapter = '添加同级章节';
|
||||
$lang->doc->addSubDoc = '添加子文档';
|
||||
$lang->doc->chapterName = '章节名称';
|
||||
|
||||
$lang->doc->tips = new stdclass();
|
||||
$lang->doc->tips->noProduct = '暂时没有产品,请先创建';
|
||||
$lang->doc->tips->noProject = '暂时没有项目,请先创建';
|
||||
@@ -392,8 +404,8 @@ $lang->doc->statusList[''] = "";
|
||||
$lang->doc->statusList['normal'] = "已发布";
|
||||
$lang->doc->statusList['draft'] = "草稿";
|
||||
|
||||
$lang->doc->aclList['open'] = "公开(有所属库权限即可访问)";
|
||||
$lang->doc->aclList['private'] = "私有(仅创建者和白名单用户可访问)";
|
||||
$lang->doc->aclList['open'] = "公开(所有人都可查看和编辑)";
|
||||
$lang->doc->aclList['private'] = "私有(仅特定人员可查看和编辑)";
|
||||
|
||||
$lang->doc->aclListA['open'] = "公开(所有人均可访问,有编辑文档模板权限可访问并维护)";
|
||||
$lang->doc->aclListA['private'] = "私有(仅创建者和白名单用户可访问,有编辑文档模板权限可访问并管理)";
|
||||
@@ -588,6 +600,7 @@ $lang->doc->docLang->exportMarkdown = "导出 Markdown";
|
||||
$lang->doc->docLang->exportJSON = "导出备份(.json)";
|
||||
$lang->doc->docLang->importMarkdown = "导入 Markdown";
|
||||
$lang->doc->docLang->importJSON = "导入备份(.json)";
|
||||
$lang->doc->docLang->importConfluence = "导入 Confluence 存储格式";
|
||||
$lang->doc->docLang->importConfirm = "导入将覆盖当前文档内容,确定导入吗?";
|
||||
$lang->doc->docLang->settings = $lang->settings;
|
||||
$lang->doc->docLang->save = $lang->save;
|
||||
@@ -723,6 +736,15 @@ $lang->doc->docLang->switchToOldEditor = '切换回旧编辑器';
|
||||
$lang->doc->docLang->zentaoList = $lang->doc->zentaoList;
|
||||
$lang->doc->docLang->list = $lang->doc->list;
|
||||
$lang->doc->docLang->loadingFile = '正在下载图片...';
|
||||
$lang->doc->docLang->needEditable = $lang->doc->needEditable;
|
||||
$lang->doc->docLang->addChapter = $lang->doc->addChapter;
|
||||
$lang->doc->docLang->editChapter = $lang->doc->editChapter;
|
||||
$lang->doc->docLang->sortChapter = $lang->doc->sortChapter;
|
||||
$lang->doc->docLang->deleteChapter = $lang->doc->deleteChapter;
|
||||
$lang->doc->docLang->addSubChapter = $lang->doc->addSubChapter;
|
||||
$lang->doc->docLang->addSameChapter = $lang->doc->addSameChapter;
|
||||
$lang->doc->docLang->addSubDoc = $lang->doc->addSubDoc;
|
||||
$lang->doc->docLang->chapterName = $lang->doc->chapterName;
|
||||
|
||||
$lang->docTemplate->moduleName = array();
|
||||
$lang->docTemplate->moduleName['plan'] = '计划';
|
||||
|
||||
+12
-8
@@ -835,21 +835,25 @@ class docModel extends model
|
||||
{
|
||||
$isOpen = $doc->acl == 'open';
|
||||
$isAuthorOrAdmin = $doc->acl == 'private' && ($doc->addedBy == $currentAccount || ($this->app->user->admin && $spaceType !== 'mine'));
|
||||
$isInUsers = strpos(",$doc->users,", ",$currentAccount,") !== false;
|
||||
if($isOpen || $isAuthorOrAdmin || $isInUsers)
|
||||
$isInReadUsers = strpos(",$doc->readUsers,", ",$currentAccount,") !== false;
|
||||
$isInEditUsers = strpos(",$doc->users,", ",$currentAccount,") !== false;
|
||||
if($isOpen || $isAuthorOrAdmin || $isInReadUsers || $isInEditUsers)
|
||||
{
|
||||
$doc->editable = $isOpen || $isAuthorOrAdmin || $isInEditUsers;
|
||||
$privDocs[] = $doc;
|
||||
}
|
||||
elseif(!empty($doc->groups))
|
||||
elseif(!empty($doc->groups) || !empty($doc->editGroups))
|
||||
{
|
||||
$isInReadGroups = false;
|
||||
$isInEditGroups = false;
|
||||
foreach($userGroups as $groupID)
|
||||
{
|
||||
if(strpos(",$doc->groups,", ",$groupID,") !== false)
|
||||
{
|
||||
$privDocs[] = $doc;
|
||||
break;
|
||||
}
|
||||
if(strpos(",$doc->groups,", ",$groupID,") !== false) $isInReadGroups = true;
|
||||
if(strpos(",$doc->editGroups,", ",$groupID,") !== false) $isInEditGroups = true;
|
||||
}
|
||||
|
||||
$doc->editable = $isInEditGroups;
|
||||
if($isInReadGroups || $isInEditGroups) $privDocs[] = $doc;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -65,6 +65,11 @@ $privs['releases'] = hasPriv('api', 'releases');
|
||||
$privs['struct'] = hasPriv('api', 'struct');
|
||||
$privs['createOffice'] = $privs['create'];
|
||||
|
||||
$privs['addChapter'] = hasPriv('doc', 'addChapter');
|
||||
$privs['editChapter'] = hasPriv('doc', 'editChapter');
|
||||
$privs['deleteChapter'] = hasPriv('doc', 'deleteChapter');
|
||||
$privs['sortChapter'] = hasPriv('doc', 'sortChapter');
|
||||
|
||||
$privs['productStory'] = hasPriv('product', 'browse');
|
||||
$privs['projectStory'] = hasPriv('projectstory', 'story');
|
||||
$privs['executionStory'] = hasPriv('execution', 'story');
|
||||
|
||||
@@ -16,19 +16,37 @@ if($objectType == 'template')
|
||||
return;
|
||||
}
|
||||
|
||||
$submitBtnText = $lang->save;
|
||||
if(!$withTitle)
|
||||
{
|
||||
if($isDraft) $submitBtnText = $lang->doc->saveDraft;
|
||||
if(empty($docID)) $submitBtnText = $lang->doc->release;
|
||||
}
|
||||
|
||||
$showOthers = $withTitle || !$isDraft;
|
||||
|
||||
formPanel
|
||||
(
|
||||
setID('setDocBasicForm'),
|
||||
setData('officeTypes', $this->config->doc->officeTypes),
|
||||
setData('docType', isset($doc) ? $doc->type : 'undefined'),
|
||||
set::title($title),
|
||||
set::submitBtnText($isDraft ? $lang->doc->saveDraft : (empty($docID) ? $lang->doc->release : $lang->save)),
|
||||
set::submitBtnText($submitBtnText),
|
||||
on::change('[name=space],[name=product],[name=execution]')->call('loadObjectModules', jsRaw('event')),
|
||||
on::change('[name=lib]')->call('loadLibModules', jsRaw('event')),
|
||||
on::change('[name=project]')->call('loadExecutions', jsRaw('event')),
|
||||
on::change('[name=lib],[name^=users]', 'checkLibPriv'),
|
||||
on::change('[name=lib],[name^=users]', "checkLibPriv('#whiteListBox', 'users')"),
|
||||
on::change('[name=lib],[name^=readUsers]', "checkLibPriv('#readListBox', 'readUsers')"),
|
||||
set::ajax(array('beforeSubmit' => jsRaw('window.beforeSetDocBasicInfo'))),
|
||||
|
||||
$withTitle ? formGroup
|
||||
(
|
||||
set::width('1/2'),
|
||||
set::label($lang->doc->title),
|
||||
set::name('title'),
|
||||
set::required(true),
|
||||
set::value(isset($doc) ? $doc->title : '')
|
||||
) : null,
|
||||
$objectType == 'project'
|
||||
? formRow(
|
||||
formGroup(
|
||||
@@ -84,7 +102,7 @@ formPanel
|
||||
set::label($lang->doc->module),
|
||||
picker(set::name('module'), set::items($optionMenu), set::value($moduleID), set::required(true))
|
||||
),
|
||||
(!$isDraft && $objectType !== 'mine')
|
||||
($showOthers && $objectType !== 'mine')
|
||||
? formGroup(
|
||||
set::label($lang->doc->mailto),
|
||||
mailto(
|
||||
@@ -99,7 +117,7 @@ formPanel
|
||||
set::label($lang->doc->files),
|
||||
fileSelector()
|
||||
) : null,
|
||||
$isDraft ? null : formGroup
|
||||
$showOthers ? formGroup
|
||||
(
|
||||
set::label($lang->doclib->control),
|
||||
radioList
|
||||
@@ -110,12 +128,45 @@ formPanel
|
||||
set::value(isset($doc) ? $doc->acl : ($objectType == 'mine' ? 'private' : 'open')),
|
||||
$objectType != 'mine' ? on::change('toggleWhiteList') : null
|
||||
)
|
||||
),
|
||||
$isDraft ? null : formGroup
|
||||
) : null,
|
||||
$showOthers ? formGroup
|
||||
(
|
||||
setID('readListBox'),
|
||||
setClass((isset($doc) && $libID == $doc->lib && $objectType != 'mine' && $doc->acl == 'private') ? '' : 'hidden'),
|
||||
set::label($lang->doc->readonly),
|
||||
div
|
||||
(
|
||||
setClass('w-full check-list'),
|
||||
inputGroup
|
||||
(
|
||||
setClass('w-full'),
|
||||
$lang->doc->groups,
|
||||
picker
|
||||
(
|
||||
set::name('readGroups[]'),
|
||||
set::items($groups),
|
||||
set::value(isset($doc) ? $doc->readGroups : null),
|
||||
set::multiple(true)
|
||||
)
|
||||
),
|
||||
div
|
||||
(
|
||||
setClass('w-full'),
|
||||
userPicker
|
||||
(
|
||||
set::label($lang->doc->users),
|
||||
set::name('readUsers[]'),
|
||||
set::items($users),
|
||||
set::value(isset($doc) ? $doc->readUsers : null)
|
||||
)
|
||||
)
|
||||
)
|
||||
) : null,
|
||||
$showOthers ? formGroup
|
||||
(
|
||||
setID('whiteListBox'),
|
||||
setClass((isset($doc) && $libID == $doc->lib && $objectType != 'mine' && $doc->acl == 'private') ? '' : 'hidden'),
|
||||
set::label($lang->doc->whiteList),
|
||||
set::label($lang->doc->editable),
|
||||
div
|
||||
(
|
||||
setClass('w-full check-list'),
|
||||
@@ -142,5 +193,5 @@ formPanel
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
) : null
|
||||
);
|
||||
|
||||
@@ -3696,20 +3696,17 @@ class executionModel extends model
|
||||
$orderBy = str_replace('storyTitle', 'story', $orderBy);
|
||||
$orderBy = implode(',', $orderBy);
|
||||
|
||||
$taskIdList = $sql->where($condition)
|
||||
->andWhere('deleted')->eq(0)
|
||||
->orderBy($orderBy)
|
||||
->page($pager, 't1.id')
|
||||
->fetchAll('id');
|
||||
|
||||
$orderBy = str_replace(array('t1.pri_', 't1.`pri'), array('priOrder_', '`priOrder_'), $orderBy);
|
||||
$tasks = $this->dao->select('t1.*, t2.id AS storyID, t2.title AS storyTitle, t2.product, t2.branch, t2.version AS latestStoryVersion, t2.status AS storyStatus, t3.realname AS assignedToRealName, IF(t1.`pri` = 0, 999, t1.`pri`) as priOrder')
|
||||
$condition = preg_replace('/`(\w+)`/', 't1.`$1`', $condition);
|
||||
$condition = str_replace("AND deleted = '0'", '', $condition);
|
||||
$orderBy = str_replace(array('t1.pri_', 't1.`pri'), array('priOrder_', '`priOrder_'), $orderBy);
|
||||
$tasks = $this->dao->select('t1.*, t2.id AS storyID, t2.title AS storyTitle, t2.product, t2.branch, t2.version AS latestStoryVersion, t2.status AS storyStatus, t3.realname AS assignedToRealName, IF(t1.`pri` = 0, 999, t1.`pri`) as priOrder')
|
||||
->from(TABLE_TASK)->alias('t1')
|
||||
->leftJoin(TABLE_STORY)->alias('t2')->on('t1.story = t2.id')
|
||||
->leftJoin(TABLE_USER)->alias('t3')->on('t1.assignedTo = t3.account')
|
||||
->where('t1.deleted')->eq(0)
|
||||
->andWhere('t1.id')->in(array_keys($taskIdList))
|
||||
->andWhere($condition)
|
||||
->orderBy($orderBy)
|
||||
->page($pager, 't1.id')
|
||||
->fetchAll('id');
|
||||
|
||||
$this->loadModel('common')->saveQueryCondition($this->dao->get(), 'task', true);
|
||||
|
||||
@@ -1541,6 +1541,10 @@ $lang->resource->doc->sortDoc = 'sortDoc';
|
||||
$lang->resource->doc->deleteCatalog = 'deleteCatalog';
|
||||
// $lang->resource->doc->displaySetting = 'displaySetting';
|
||||
$lang->resource->doc->exportFiles = 'exportFiles';
|
||||
$lang->resource->doc->addChapter = 'addChapter';
|
||||
$lang->resource->doc->editChapter = 'editChapter';
|
||||
$lang->resource->doc->sortChapter = 'sortChapter';
|
||||
$lang->resource->doc->deleteChapter = 'deleteChapter';
|
||||
|
||||
$lang->doc->methodOrder[5] = 'index';
|
||||
$lang->doc->methodOrder[10] = 'mySpace';
|
||||
@@ -1570,6 +1574,10 @@ $lang->doc->methodOrder[135] = 'sortDoc';
|
||||
$lang->doc->methodOrder[140] = 'deleteCatalog';
|
||||
// $lang->doc->methodOrder[145] = 'displaySetting';
|
||||
$lang->doc->methodOrder[150] = 'exportFiles';
|
||||
$lang->doc->methodOrder[160] = 'addChapter';
|
||||
$lang->doc->methodOrder[170] = 'editChapter';
|
||||
$lang->doc->methodOrder[180] = 'sortChapter';
|
||||
$lang->doc->methodOrder[190] = 'deleteChapter';
|
||||
|
||||
/* Mail. */
|
||||
$lang->resource->mail = new stdclass();
|
||||
|
||||
@@ -3613,6 +3613,9 @@ $config->group->package->manageDoc->privs['doc-batchMoveDoc'] = array('edition'
|
||||
$config->group->package->manageDoc->privs['doc-sortDoclib'] = array('edition' => 'open,biz,max,ipd', 'vision' => 'rnd,lite,or', 'order' => 10, 'depend' => array('doc-index'), 'recommend' => array());
|
||||
$config->group->package->manageDoc->privs['doc-sortCatalog'] = array('edition' => 'open,biz,max,ipd', 'vision' => 'rnd,lite,or', 'order' => 11, 'depend' => array('doc-index'), 'recommend' => array('doc-addCatalog', 'doc-editCatalog'));
|
||||
$config->group->package->manageDoc->privs['doc-sortDoc'] = array('edition' => 'open,biz,max,ipd', 'vision' => 'rnd,lite,or', 'order' => 12, 'depend' => array('doc-index'), 'recommend' => array('doc-create', 'doc-edit', 'doc-moveDoc'));
|
||||
$config->group->package->manageDoc->privs['doc-addChapter'] = array('edition' => 'open,biz,max,ipd', 'vision' => 'rnd,lite,or', 'order' => 13, 'depend' => array('doc-index'), 'recommend' => array('doc-editChapter', 'doc-sortChapter'));
|
||||
$config->group->package->manageDoc->privs['doc-editChapter'] = array('edition' => 'open,biz,max,ipd', 'vision' => 'rnd,lite,or', 'order' => 14, 'depend' => array('doc-index'), 'recommend' => array('doc-addChapter', 'doc-sortChapter'));
|
||||
$config->group->package->manageDoc->privs['doc-sortChapter'] = array('edition' => 'open,biz,max,ipd', 'vision' => 'rnd,lite,or', 'order' => 15, 'depend' => array('doc-index'), 'recommend' => array('doc-addChapter', 'doc-editChapter'));
|
||||
|
||||
$config->group->package->deleteDoc = new stdclass();
|
||||
$config->group->package->deleteDoc->order = 20;
|
||||
@@ -3623,6 +3626,7 @@ $config->group->package->deleteDoc->privs['doc-deleteLib'] = array('edition'
|
||||
$config->group->package->deleteDoc->privs['doc-delete'] = array('edition' => 'open,biz,max,ipd', 'vision' => 'rnd,lite,or', 'order' => 60, 'depend' => array('doc-index'), 'recommend' => array());
|
||||
$config->group->package->deleteDoc->privs['doc-deleteFile'] = array('edition' => 'open,biz,max,ipd', 'vision' => 'rnd,lite,or', 'order' => 65, 'depend' => array('doc-index', 'doc-showFiles'), 'recommend' => array());
|
||||
$config->group->package->deleteDoc->privs['doc-deleteCatalog'] = array('edition' => 'open,biz,max,ipd', 'vision' => 'rnd,lite,or', 'order' => 110, 'depend' => array('doc-index'), 'recommend' => array());
|
||||
$config->group->package->deleteDoc->privs['doc-deleteChapter'] = array('edition' => 'open,biz,max,ipd', 'vision' => 'rnd,lite,or', 'order' => 110, 'depend' => array('doc-index'), 'recommend' => array('doc-addChapter', 'doc-editChapter'));
|
||||
|
||||
$config->group->package->exportDoc = new stdclass();
|
||||
$config->group->package->exportDoc->order = 25;
|
||||
|
||||
@@ -5,7 +5,7 @@ window.onRenderCell = function(result, {row, col})
|
||||
if(row.data.module == 'review')
|
||||
{
|
||||
result[0].props.items[0]['disabled'] = projectPriv ? false: true;
|
||||
result[0].props.items[0]['url'] = projectReviewLink.replace('{id}', row.data.id);
|
||||
result[0].props.items[0]['url'] = 'javascript:checkReview("' + row.data.id + '")';
|
||||
delete result[0].props.items[0]['data-toggle'];
|
||||
}
|
||||
else if(reviewPrivs[row.data.module])
|
||||
@@ -49,3 +49,18 @@ window.onRenderCell = function(result, {row, col})
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
window.checkReview = function(id)
|
||||
{
|
||||
$.get($.createLink('review', 'ajaxCheckReviewInfo', 'reviewID=' + id), function(data)
|
||||
{
|
||||
if(!data)
|
||||
{
|
||||
zui.Modal.alert({icon: 'icon-exclamation-sign', iconClass: 'warning-pale rounded-full icon-2x', message: hasReviewedTip}).then((res) => {loadCurrentPage()});
|
||||
}
|
||||
else
|
||||
{
|
||||
openPage(projectReviewLink.replace('{id}', id), 'project');
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -41,6 +41,7 @@ jsVar('noFlowAuditModules', $config->my->noFlowAuditModules);
|
||||
jsVar('projectPriv', hasPriv('review', 'assess'));
|
||||
jsVar('projectReviewLink', createLink('review', 'assess', 'reviewID={id}'));
|
||||
jsVar('vision', $config->vision);
|
||||
jsVar('hasReviewedTip', $lang->hasReviewed);
|
||||
|
||||
$rawMethod = $app->rawMethod;
|
||||
if($rawMethod != 'audit' && isset($lang->my->featureBar[$rawMethod]['audit'])) $lang->my->featureBar[$rawMethod] = $lang->my->featureBar[$rawMethod]['audit'];
|
||||
|
||||
@@ -91,7 +91,6 @@ if(isset($setting['actions'])) unset($setting['actions']);
|
||||
foreach($setting as $key => $col)
|
||||
{
|
||||
if($key == 'assignedTo') $setting[$key]['type'] = 'user';
|
||||
|
||||
$setting[$key]['sortType'] = false;
|
||||
if(isset($col['link'])) unset($setting[$key]['link']);
|
||||
if($key == 'pri') $setting[$key]['priList'] = $lang->story->priList;
|
||||
|
||||
@@ -731,7 +731,12 @@ class story extends control
|
||||
}
|
||||
|
||||
$this->commonAction($storyID);
|
||||
$story = $this->view->story;
|
||||
$story = $this->view->story;
|
||||
if(!empty($reviewers[$this->app->user->account]))
|
||||
{
|
||||
return $this->send(array('result' => 'fail', 'callback' => "zui.Modal.alert({icon: 'icon-exclamation-sign', iconClass: 'warning-pale rounded-full icon-2x', message: '{$this->lang->hasReviewed}'}).then((res) => {loadCurrentPage()});"));
|
||||
}
|
||||
|
||||
$reviewers = $this->story->getReviewerPairs($storyID, $story->version);
|
||||
$this->story->getAffectedScope($story);
|
||||
|
||||
@@ -909,18 +914,6 @@ class story extends control
|
||||
$changes = $this->story->close($storyID, $postData);
|
||||
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
|
||||
|
||||
if($changes)
|
||||
{
|
||||
$preStatus = $story->status;
|
||||
$isChanged = !empty($story->changedBy) ? true : false;
|
||||
if($preStatus == 'reviewing') $preStatus = $isChanged ? 'changing' : 'draft';
|
||||
|
||||
$actionID = $this->action->create('story', $storyID, 'Closed', $this->post->comment, ucfirst($this->post->closedReason) . ($this->post->duplicateStory ? ':' . (int)$this->post->duplicateStory : '') . "|$preStatus");
|
||||
$this->action->logHistory($actionID, $changes);
|
||||
}
|
||||
|
||||
$this->dao->update(TABLE_STORY)->set('assignedTo')->eq('closed')->where('id')->eq((int)$storyID)->exec();
|
||||
|
||||
$this->executeHooks($storyID);
|
||||
|
||||
if(isInModal())
|
||||
|
||||
+21
-11
@@ -590,7 +590,7 @@ class storyModel extends model
|
||||
if($this->config->edition != 'open')
|
||||
{
|
||||
$todo = $this->dao->select('type, objectID')->from(TABLE_TODO)->where('id')->eq($todoID)->fetch();
|
||||
if($todo->type == 'feedback' && $todo->objectID) $this->loadModel('feedback')->updateStatus('todo', $todo->objectID, 'done');
|
||||
if($todo->type == 'feedback' && $todo->objectID) $this->loadModel('feedback')->updateStatus('todo', $todo->objectID, 'done', '', $todoID);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -906,7 +906,7 @@ class storyModel extends model
|
||||
}
|
||||
|
||||
unset($oldStory->parent, $story->parent);
|
||||
if($this->config->edition != 'open' && $oldStory->feedback) $this->loadModel('feedback')->updateStatus('story', $oldStory->feedback, $story->status, $oldStory->status);
|
||||
if($this->config->edition != 'open' && $oldStory->feedback) $this->loadModel('feedback')->updateStatus('story', $oldStory->feedback, $story->status, $oldStory->status, $storyID);
|
||||
|
||||
if(!empty($story->reviewer))
|
||||
{
|
||||
@@ -1035,7 +1035,7 @@ class storyModel extends model
|
||||
if($preStatus == 'reviewing') $preStatus = $isChanged ? 'changing' : 'draft';
|
||||
}
|
||||
|
||||
if($this->config->edition != 'open' && $oldParentStory->feedback) $this->loadModel('feedback')->updateStatus('story', $oldParentStory->feedback, $newParentStory->status, $oldParentStory->status);
|
||||
if($this->config->edition != 'open' && $oldParentStory->feedback) $this->loadModel('feedback')->updateStatus('story', $oldParentStory->feedback, $newParentStory->status, $oldParentStory->status, $oldParentStory->id);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1185,7 +1185,7 @@ class storyModel extends model
|
||||
if($this->config->edition != 'open' && $oldStory->feedback && !isset($feedbacks[$oldStory->feedback]))
|
||||
{
|
||||
$feedbacks[$oldStory->feedback] = $oldStory->feedback;
|
||||
$this->loadModel('feedback')->updateStatus('story', $oldStory->feedback, $story->status, $oldStory->status);
|
||||
$this->loadModel('feedback')->updateStatus('story', $oldStory->feedback, $story->status, $oldStory->status, $storyID);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1538,16 +1538,25 @@ class storyModel extends model
|
||||
->exec();
|
||||
if(dao::isError()) return false;
|
||||
|
||||
if(!dao::isError())
|
||||
$changes = common::createChanges($oldStory, $story);
|
||||
if($changes)
|
||||
{
|
||||
if($oldStory->isParent == '1') $this->closeAllChildren($storyID, $story->closedReason);
|
||||
$this->setStage($storyID);
|
||||
$this->loadModel('score')->create('story', 'close', $storyID);
|
||||
$preStatus = $story->status;
|
||||
$isChanged = !empty($story->changedBy) ? true : false;
|
||||
if($preStatus == 'reviewing') $preStatus = $isChanged ? 'changing' : 'draft';
|
||||
|
||||
if($this->config->edition != 'open' && $oldStory->feedback) $this->loadModel('feedback')->updateStatus('story', $oldStory->feedback, $story->status, $oldStory->status);
|
||||
$actionID = $this->loadModel('action')->create('story', $storyID, 'Closed', $this->post->comment, ucfirst($this->post->closedReason) . ($this->post->duplicateStory ? ':' . (int)$this->post->duplicateStory : '') . "|$preStatus");
|
||||
$this->action->logHistory($actionID, $changes);
|
||||
}
|
||||
|
||||
$changes = common::createChanges($oldStory, $story);
|
||||
$this->dao->update(TABLE_STORY)->set('assignedTo')->eq('closed')->where('id')->eq((int)$storyID)->exec();
|
||||
|
||||
if($oldStory->isParent == '1') $this->closeAllChildren($storyID, $story->closedReason);
|
||||
$this->setStage($storyID);
|
||||
$this->loadModel('score')->create('story', 'close', $storyID);
|
||||
|
||||
if($this->config->edition != 'open' && $oldStory->feedback) $this->loadModel('feedback')->updateStatus('story', $oldStory->feedback, $story->status, $oldStory->status, $storyID);
|
||||
|
||||
if(!empty($postData->closeSync))
|
||||
{
|
||||
$this->relieveTwins($oldStory->product, $storyID);
|
||||
@@ -1607,7 +1616,7 @@ class storyModel extends model
|
||||
if($this->config->edition != 'open' && $oldStory->feedback && !isset($feedbacks[$oldStory->feedback]))
|
||||
{
|
||||
$feedbacks[$oldStory->feedback] = $oldStory->feedback;
|
||||
$this->loadModel('feedback')->updateStatus('story', $oldStory->feedback, $story->status, $oldStory->status);
|
||||
$this->loadModel('feedback')->updateStatus('story', $oldStory->feedback, $story->status, $oldStory->status, $storyID);
|
||||
}
|
||||
|
||||
$this->loadModel('score')->create('story', 'close', $storyID);
|
||||
@@ -2198,6 +2207,7 @@ class storyModel extends model
|
||||
|
||||
$changes = common::createChanges($oldStory, $story);
|
||||
if(!empty($oldStory->twins)) $this->syncTwins($storyID, $oldStory->twins, $changes, 'Activated');
|
||||
if($this->config->edition != 'open' && $oldStory->feedback) $this->loadModel('feedback')->updateStatus('story', $oldStory->feedback, $story->status, $oldStory->status, $storyID);
|
||||
|
||||
if($this->config->edition == 'ipd' and $oldStory->demand)
|
||||
{
|
||||
|
||||
@@ -985,7 +985,7 @@ class storyTao extends storyModel
|
||||
if(empty($bugID) or empty($storyID)) return;
|
||||
|
||||
$oldBug = $this->dao->select('*')->from(TABLE_BUG)->where('id')->eq($bugID)->fetch();
|
||||
if($this->config->edition != 'open' && $oldBug->feedback) $this->loadModel('feedback')->updateStatus('bug', $oldBug->feedback, 'closed', $oldBug->status);
|
||||
if($this->config->edition != 'open' && $oldBug->feedback) $this->loadModel('feedback')->updateStatus('bug', $oldBug->feedback, 'closed', $oldBug->status, $bugID);
|
||||
|
||||
$now = helper::now();
|
||||
$bug = new stdclass();
|
||||
@@ -1048,7 +1048,7 @@ class storyTao extends storyModel
|
||||
if($this->config->edition == 'open')return;
|
||||
|
||||
$todo = $this->dao->select('type, objectID')->from(TABLE_TODO)->where('id')->eq($todoID)->fetch();
|
||||
if($todo->type == 'feedback' && $todo->objectID) $this->loadModel('feedback')->updateStatus('todo', $todo->objectID, 'done');
|
||||
if($todo->type == 'feedback' && $todo->objectID) $this->loadModel('feedback')->updateStatus('todo', $todo->objectID, 'done', '', $todoID);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -636,6 +636,9 @@ class task extends control
|
||||
$result = $this->task->afterStart($task, $changes, 0, $output);
|
||||
if(is_array($result)) return $this->send($result);
|
||||
|
||||
if($taskData->status == 'done') $this->loadModel('score')->create('task', 'finish', $task->id);
|
||||
if($this->config->edition != 'open' && $task->feedback) $this->loadModel('feedback')->updateStatus('task', $task->feedback, $taskData->status, $task->status, $task->id);
|
||||
|
||||
/* Get the information returned after a task is started. */
|
||||
$from = zget($output, 'from');
|
||||
$response = $this->taskZen->responseAfterChangeStatus($task, $from);
|
||||
|
||||
@@ -63,6 +63,7 @@ class taskModel extends model
|
||||
|
||||
if($oldTask->parent > 0) $this->updateParentStatus($taskID);
|
||||
if($oldTask->story) $this->loadModel('story')->setStage($oldTask->story);
|
||||
if($this->config->edition != 'open' && $oldTask->feedback) $this->loadModel('feedback')->updateStatus('task', $oldTask->feedback, $task->status, $oldTask->status, $taskID);
|
||||
|
||||
$this->updateKanbanCell($taskID, $drag, $oldTask->execution);
|
||||
|
||||
@@ -171,7 +172,7 @@ class taskModel extends model
|
||||
if($this->config->edition != 'open' && $oldTask->feedback && !isset($feedbacks[$oldTask->feedback]))
|
||||
{
|
||||
$feedbacks[$oldTask->feedback] = $oldTask->feedback;
|
||||
$this->feedback->updateStatus('task', $oldTask->feedback, $task->status, $oldTask->status);
|
||||
$this->feedback->updateStatus('task', $oldTask->feedback, $task->status, $oldTask->status, $taskID);
|
||||
}
|
||||
|
||||
if(!empty($task->story) && !empty($task->isParent) && $this->post->syncChildren) $this->syncStoryToChildren($task);
|
||||
@@ -251,7 +252,7 @@ class taskModel extends model
|
||||
|
||||
/* If the todo comes from a feedback, update the feedback information. */
|
||||
$todo = $this->dao->findByID($todoID)->from(TABLE_TODO)->fetch();
|
||||
if($this->config->edition != 'open' && $todo->type == 'feedback' && $todo->objectID) $this->loadModel('feedback')->updateStatus('todo', $todo->objectID, 'done');
|
||||
if($this->config->edition != 'open' && $todo->type == 'feedback' && $todo->objectID) $this->loadModel('feedback')->updateStatus('todo', $todo->objectID, 'done', '', $todoID);
|
||||
}
|
||||
|
||||
/* If the task comes from a design, update the task information. */
|
||||
@@ -401,7 +402,7 @@ class taskModel extends model
|
||||
if(!empty($changes)) $this->action->logHistory($actionID, $changes);
|
||||
}
|
||||
|
||||
if($this->config->edition != 'open' && $oldTask->feedback) $this->loadModel('feedback')->updateStatus('task', $oldTask->feedback, $task->status, $oldTask->status);
|
||||
if($this->config->edition != 'open' && $oldTask->feedback) $this->loadModel('feedback')->updateStatus('task', $oldTask->feedback, $task->status, $oldTask->status, $oldTask->id);
|
||||
if(!empty($oldTask->mode) && empty($task->mode)) $this->dao->delete()->from(TABLE_TASKTEAM)->where('task')->eq($task->id)->exec();
|
||||
|
||||
if(!empty($task->story) && $this->post->syncChildren) $this->syncStoryToChildren($task);
|
||||
@@ -1262,9 +1263,6 @@ class taskModel extends model
|
||||
if(dao::isError()) return false;
|
||||
|
||||
if($task->consumed != $oldTask->consumed || $task->left != $oldTask->left) $this->loadModel('program')->refreshProjectStats($oldTask->project);
|
||||
|
||||
if($task->status == 'done') $this->loadModel('score')->create('task', 'finish', $oldTask->id);
|
||||
if($this->config->edition != 'open' && $oldTask->feedback) $this->loadModel('feedback')->updateStatus('task', $oldTask->feedback, $task->status, $oldTask->status);
|
||||
return common::createChanges($oldTask, $task);
|
||||
}
|
||||
|
||||
@@ -3416,7 +3414,7 @@ class taskModel extends model
|
||||
|
||||
/* Create action record. */
|
||||
$this->taskTao->createAutoUpdateTaskAction($parentTask, 'child');
|
||||
if($this->config->edition != 'open' && $parentTask->feedback) $this->loadModel('feedback')->updateStatus('task', $parentTask->feedback, $status, $parentTask->status);
|
||||
if($this->config->edition != 'open' && $parentTask->feedback) $this->loadModel('feedback')->updateStatus('task', $parentTask->feedback, $status, $parentTask->status, $parentID);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3460,7 +3458,7 @@ class taskModel extends model
|
||||
|
||||
/* Create action record. */
|
||||
$this->taskTao->createAutoUpdateTaskAction($childTask, 'parent');
|
||||
if($this->config->edition != 'open' && $childTask->feedback) $this->loadModel('feedback')->updateStatus('task', $childTask->feedback, $status, $childTask->status);
|
||||
if($this->config->edition != 'open' && $childTask->feedback) $this->loadModel('feedback')->updateStatus('task', $childTask->feedback, $status, $childTask->status, $childID);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -691,10 +691,10 @@ class testcase extends control
|
||||
*/
|
||||
public function review(int $caseID)
|
||||
{
|
||||
$oldCase = $this->testcase->getByID($caseID);
|
||||
if($_POST)
|
||||
{
|
||||
$oldCase = $this->testcase->getByID($caseID);
|
||||
$case = $this->testcaseZen->prepareReviewData($caseID, $oldCase);
|
||||
$case = $this->testcaseZen->prepareReviewData($caseID, $oldCase);
|
||||
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
|
||||
|
||||
$this->testcase->review($case, $oldCase);
|
||||
@@ -706,6 +706,12 @@ class testcase extends control
|
||||
return $this->send(array('result' => 'success', 'message' => $message, 'closeModal' => true, 'load' => true));
|
||||
}
|
||||
|
||||
if((isset($oldCase->caseStatus) && $oldCase->caseStatus != 'wait') || $oldCase->status != 'wait')
|
||||
{
|
||||
return $this->send(array('result' => 'fail', 'callback' => "zui.Modal.alert({icon: 'icon-exclamation-sign', iconClass: 'warning-pale rounded-full icon-2x', message: '{$this->lang->hasReviewed}'}).then((res) => {loadCurrentPage()});"));
|
||||
}
|
||||
|
||||
|
||||
$this->view->title = $this->lang->testcase->review;
|
||||
$this->view->users = $this->user->getPairs('noletter|noclosed|nodeleted');
|
||||
$this->view->testcaseID = $caseID;
|
||||
|
||||
+19
-7
@@ -71,7 +71,7 @@ class todoModel extends model
|
||||
|
||||
if(!empty($todo->uid)) $this->loadModel('file')->updateObjectID($todo->uid, $todoID, 'todo');
|
||||
if(!empty($oldTodo->cycle)) $this->createByCycle(array($todoID => $todo));
|
||||
if($this->config->edition != 'open' && $todo->type == 'feedback' && $todo->objectID) $this->loadModel('feedback')->updateStatus('todo', $todo->objectID, $todo->status);
|
||||
if($this->config->edition != 'open' && $todo->type == 'feedback' && $todo->objectID) $this->loadModel('feedback')->updateStatus('todo', $todo->objectID, $todo->status, '', $todoID);
|
||||
return common::createChanges($oldTodo, (array)$todo);
|
||||
}
|
||||
|
||||
@@ -88,14 +88,21 @@ class todoModel extends model
|
||||
{
|
||||
if(empty($todos)) return $todos;
|
||||
|
||||
$allChanges = array();
|
||||
$this->loadModel('action');
|
||||
if($this->config->edition != 'open') $this->loadModel('feedback');
|
||||
|
||||
/* Initialize todos from the post data. */
|
||||
$oldTodos = $this->getTodosByIdList($todoIdList);
|
||||
$oldTodos = $this->getTodosByIdList($todoIdList);
|
||||
$allChanges = array();
|
||||
foreach($todos as $todoID => $todo)
|
||||
{
|
||||
$oldTodo = $oldTodos[$todoID];
|
||||
if(in_array($todo->type, $this->config->todo->moduleList)) $oldTodo->name = '';
|
||||
if(in_array($todo->type, $this->config->todo->moduleList))
|
||||
{
|
||||
$table = $this->config->objectTables[$todo->type];
|
||||
$nameField = $this->config->action->objectNameFields[$todo->type];
|
||||
$todo->name = $this->dao->select($nameField)->from($table)->where('id')->eq($todo->objectID)->fetch($nameField);
|
||||
}
|
||||
if(!empty($oldTodo->private) && !isset($todo->private)) $todo->assignedTo = $oldTodo->assignedTo;
|
||||
$this->todoTao->updateRow($todoID, $todo);
|
||||
|
||||
@@ -106,7 +113,7 @@ class todoModel extends model
|
||||
if($this->config->edition != 'open' && $todo->type == 'feedback' && $todo->objectID && !isset($feedbacks[$todo->objectID]))
|
||||
{
|
||||
$feedbacks[$todo->objectID] = $todo->objectID;
|
||||
$this->loadModel('feedback')->updateStatus('todo', $todo->objectID, $todo->status);
|
||||
$this->feedback->updateStatus('todo', $todo->objectID, $todo->status, '', $todoID);
|
||||
}
|
||||
|
||||
/* Create changes of one object. */
|
||||
@@ -162,7 +169,7 @@ class todoModel extends model
|
||||
{
|
||||
$todo = $this->todoTao->fetch($todoID);
|
||||
$feedbackID = $todo->objectID ? $todo->objectID : '' ;
|
||||
if($feedbackID) $this->loadModel('feedback')->updateStatus('todo', $feedbackID, 'done');
|
||||
if($feedbackID) $this->loadModel('feedback')->updateStatus('todo', $feedbackID, 'done', '', $todoID);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -382,7 +389,12 @@ class todoModel extends model
|
||||
*/
|
||||
public function activate(int $todoID): bool
|
||||
{
|
||||
$oldTodo = $this->fetchByID($todoID);
|
||||
$this->dao->update(TABLE_TODO)->set('status')->eq('wait')->where('id')->eq($todoID)->exec();
|
||||
|
||||
$todo = $this->fetchByID($todoID);
|
||||
if($this->config->edition != 'open' && $todo->type == 'feedback' && $todo->objectID) $this->loadModel('feedback')->updateStatus('todo', $todo->objectID, $todo->status, '', $todoID);
|
||||
|
||||
$this->loadModel('action')->create('todo', $todoID, 'activated', '', 'wait');
|
||||
|
||||
return !dao::isError();
|
||||
@@ -408,7 +420,7 @@ class todoModel extends model
|
||||
if($this->config->edition != 'open')
|
||||
{
|
||||
$feedbackID = $this->dao->select('objectID')->from(TABLE_TODO)->where('id')->eq($todoID)->andWhere('type')->eq('feedback')->fetch('objectID');
|
||||
if($feedbackID) $this->loadModel('feedback')->updateStatus('todo', $feedbackID, 'closed');
|
||||
if($feedbackID) $this->loadModel('feedback')->updateStatus('todo', $feedbackID, 'closed', '', $todoID);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ $lang->tree->branch = '平台/分支';
|
||||
$lang->tree->path = '路径';
|
||||
$lang->tree->type = '类型';
|
||||
$lang->tree->parent = '上级模块';
|
||||
$lang->tree->parentCate = '上级目录';
|
||||
$lang->tree->parentCate = '所属父级';
|
||||
$lang->tree->child = '子模块';
|
||||
$lang->tree->parentGroup = '上级分组';
|
||||
$lang->tree->childGroup = '子分组';
|
||||
|
||||
@@ -104,7 +104,7 @@ formPanel
|
||||
$module->type != 'line' ? formGroup
|
||||
(
|
||||
set::className('moduleBox ', $hidden ? 'hidden' : ''),
|
||||
set::label($parentLabel),
|
||||
set::label(($type == 'doc' || $type == 'api') ? $lang->tree->parentCate : $lang->tree->parent),
|
||||
picker
|
||||
(
|
||||
set::disabled($isBuiltinTemplateModule),
|
||||
@@ -133,7 +133,7 @@ formPanel
|
||||
set::items($users)
|
||||
)
|
||||
) : null,
|
||||
$type != 'docTemplate' ? formGroup
|
||||
($type !== 'doc' && $type !== 'api' && $type != 'docTemplate') ? formGroup
|
||||
(
|
||||
set::label($lang->tree->short),
|
||||
inputControl
|
||||
|
||||
Reference in New Issue
Block a user