Merge branch '15.0.beta3' of https://gitlab.zcorp.cc/easycorp/zentaopms into 15.0.beta3
This commit is contained in:
@@ -468,12 +468,12 @@ $lang->action->search->objectTypeList[''] = '';
|
||||
$lang->action->search->objectTypeList['product'] = $lang->productCommon;
|
||||
$lang->action->search->objectTypeList['program'] = 'Program';
|
||||
$lang->action->search->objectTypeList['project'] = 'Project';
|
||||
$lang->action->search->objectTypeList['execution'] = $lang->sprintCommon;
|
||||
$lang->action->search->objectTypeList['execution'] = 'Execution';
|
||||
$lang->action->search->objectTypeList['bug'] = 'Bug';
|
||||
$lang->action->search->objectTypeList['case'] = 'Fälle';
|
||||
$lang->action->search->objectTypeList['caseresult'] = 'Fallergebnisse';
|
||||
$lang->action->search->objectTypeList['stepresult'] = 'Fallschritte';
|
||||
$lang->action->search->objectTypeList['story'] = 'Story';
|
||||
$lang->action->search->objectTypeList['story'] = "$lang->SRCommon/$lang->URCommon";
|
||||
$lang->action->search->objectTypeList['task'] = 'Aufgaben';
|
||||
$lang->action->search->objectTypeList['testtask'] = 'Testaufgaben';
|
||||
$lang->action->search->objectTypeList['user'] = 'Benutzer';
|
||||
|
||||
@@ -468,12 +468,12 @@ $lang->action->search->objectTypeList[''] = '';
|
||||
$lang->action->search->objectTypeList['product'] = $lang->productCommon;
|
||||
$lang->action->search->objectTypeList['program'] = 'Program';
|
||||
$lang->action->search->objectTypeList['project'] = 'Project';
|
||||
$lang->action->search->objectTypeList['execution'] = $lang->sprintCommon;
|
||||
$lang->action->search->objectTypeList['execution'] = 'Execution';
|
||||
$lang->action->search->objectTypeList['bug'] = 'Bug';
|
||||
$lang->action->search->objectTypeList['case'] = 'Case';
|
||||
$lang->action->search->objectTypeList['caseresult'] = 'Case Result';
|
||||
$lang->action->search->objectTypeList['stepresult'] = 'Case Steps';
|
||||
$lang->action->search->objectTypeList['story'] = 'UR/SR';
|
||||
$lang->action->search->objectTypeList['story'] = "$lang->SRCommon/$lang->URCommon";
|
||||
$lang->action->search->objectTypeList['task'] = 'Task';
|
||||
$lang->action->search->objectTypeList['testtask'] = 'Request';
|
||||
$lang->action->search->objectTypeList['user'] = 'User';
|
||||
|
||||
@@ -467,12 +467,12 @@ $lang->action->search->objectTypeList[''] = '';
|
||||
$lang->action->search->objectTypeList['product'] = $lang->productCommon;
|
||||
$lang->action->search->objectTypeList['program'] = 'Program';
|
||||
$lang->action->search->objectTypeList['project'] = 'Project';
|
||||
$lang->action->search->objectTypeList['execution'] = $lang->sprintCommon;
|
||||
$lang->action->search->objectTypeList['execution'] = 'Execution';
|
||||
$lang->action->search->objectTypeList['bug'] = 'Bug';
|
||||
$lang->action->search->objectTypeList['case'] = 'CasTest';
|
||||
$lang->action->search->objectTypeList['caseresult'] = 'CasTest Result';
|
||||
$lang->action->search->objectTypeList['stepresult'] = 'CasTest Steps';
|
||||
$lang->action->search->objectTypeList['story'] = 'UR/SR';
|
||||
$lang->action->search->objectTypeList['story'] = "$lang->SRCommon/$lang->URCommon";
|
||||
$lang->action->search->objectTypeList['task'] = 'Tâche';
|
||||
$lang->action->search->objectTypeList['testtask'] = 'Recette';
|
||||
$lang->action->search->objectTypeList['user'] = 'Utilisateur';
|
||||
|
||||
@@ -468,12 +468,12 @@ $lang->action->search->objectTypeList[''] = '';
|
||||
$lang->action->search->objectTypeList['product'] = $lang->productCommon;
|
||||
$lang->action->search->objectTypeList['program'] = 'Program';
|
||||
$lang->action->search->objectTypeList['project'] = 'Project';
|
||||
$lang->action->search->objectTypeList['execution'] = $lang->sprintCommon;
|
||||
$lang->action->search->objectTypeList['execution'] = 'Execution';
|
||||
$lang->action->search->objectTypeList['bug'] = 'Bug';
|
||||
$lang->action->search->objectTypeList['case'] = 'Tình huống';
|
||||
$lang->action->search->objectTypeList['caseresult'] = 'Kết quả tình huống';
|
||||
$lang->action->search->objectTypeList['stepresult'] = 'Các bước tình huống';
|
||||
$lang->action->search->objectTypeList['story'] = 'UR/SR';
|
||||
$lang->action->search->objectTypeList['story'] = "$lang->SRCommon/$lang->URCommon";
|
||||
$lang->action->search->objectTypeList['task'] = 'Nhiệm vụ';
|
||||
$lang->action->search->objectTypeList['testtask'] = 'Yêu cầu';
|
||||
$lang->action->search->objectTypeList['user'] = 'Người dùng';
|
||||
|
||||
@@ -468,12 +468,12 @@ $lang->action->search->objectTypeList[''] = '';
|
||||
$lang->action->search->objectTypeList['product'] = $lang->productCommon;
|
||||
$lang->action->search->objectTypeList['program'] = '项目集';
|
||||
$lang->action->search->objectTypeList['project'] = '项目';
|
||||
$lang->action->search->objectTypeList['execution'] = $lang->sprintCommon;
|
||||
$lang->action->search->objectTypeList['execution'] = '执行';
|
||||
$lang->action->search->objectTypeList['bug'] = 'Bug';
|
||||
$lang->action->search->objectTypeList['case'] = '用例';
|
||||
$lang->action->search->objectTypeList['caseresult'] = '用例结果';
|
||||
$lang->action->search->objectTypeList['stepresult'] = '用例步骤';
|
||||
$lang->action->search->objectTypeList['story'] = '用需/软需';
|
||||
$lang->action->search->objectTypeList['story'] = "$lang->SRCommon/$lang->URCommon";
|
||||
$lang->action->search->objectTypeList['task'] = '任务';
|
||||
$lang->action->search->objectTypeList['testtask'] = '测试单';
|
||||
$lang->action->search->objectTypeList['user'] = '用户';
|
||||
|
||||
@@ -31,7 +31,7 @@ $lang->block->lblBlock = 'InfoBlock';
|
||||
$lang->block->lblNum = 'Nummer';
|
||||
$lang->block->lblHtml = 'HTML';
|
||||
$lang->block->dynamic = 'Verlauf';
|
||||
$lang->block->assignToMe = 'Mir zugewiesen';
|
||||
$lang->block->assignToMe = 'Todo';
|
||||
$lang->block->done = 'Done';
|
||||
$lang->block->lblFlowchart = 'Workflow';
|
||||
$lang->block->welcome = 'Willkommen';
|
||||
@@ -290,7 +290,7 @@ $lang->block->default['full']['my']['6']['block'] = 'recentproject';
|
||||
$lang->block->default['full']['my']['6']['source'] = 'project';
|
||||
$lang->block->default['full']['my']['6']['grid'] = 8;
|
||||
|
||||
$lang->block->default['full']['my']['7']['title'] = 'AssignedToMe';
|
||||
$lang->block->default['full']['my']['7']['title'] = 'Todo';
|
||||
$lang->block->default['full']['my']['7']['block'] = 'assigntome';
|
||||
$lang->block->default['full']['my']['7']['source'] = '';
|
||||
$lang->block->default['full']['my']['7']['grid'] = 8;
|
||||
@@ -320,7 +320,7 @@ $lang->block->type = 'Type';
|
||||
$lang->block->orderBy = 'Order by';
|
||||
|
||||
$lang->block->availableBlocks = new stdclass();
|
||||
$lang->block->availableBlocks->todo = 'Meine Todos';
|
||||
$lang->block->availableBlocks->todo = 'Meine Zeitplan';
|
||||
$lang->block->availableBlocks->task = 'Meine Aufgaben';
|
||||
$lang->block->availableBlocks->bug = 'Meine Bugs';
|
||||
$lang->block->availableBlocks->case = 'Meine Fälle';
|
||||
|
||||
@@ -31,7 +31,7 @@ $lang->block->lblBlock = 'Block';
|
||||
$lang->block->lblNum = 'Number';
|
||||
$lang->block->lblHtml = 'HTML';
|
||||
$lang->block->dynamic = 'Dynamics';
|
||||
$lang->block->assignToMe = 'Assigned To Me';
|
||||
$lang->block->assignToMe = 'Todo';
|
||||
$lang->block->done = 'Done';
|
||||
$lang->block->lblFlowchart = 'Flowchart';
|
||||
$lang->block->welcome = 'Welcome';
|
||||
@@ -290,7 +290,7 @@ $lang->block->default['full']['my']['6']['block'] = 'recentproject';
|
||||
$lang->block->default['full']['my']['6']['source'] = 'project';
|
||||
$lang->block->default['full']['my']['6']['grid'] = 8;
|
||||
|
||||
$lang->block->default['full']['my']['7']['title'] = 'Assigned To Me';
|
||||
$lang->block->default['full']['my']['7']['title'] = 'Todo';
|
||||
$lang->block->default['full']['my']['7']['block'] = 'assigntome';
|
||||
$lang->block->default['full']['my']['7']['source'] = '';
|
||||
$lang->block->default['full']['my']['7']['grid'] = 8;
|
||||
@@ -320,7 +320,7 @@ $lang->block->type = 'Type';
|
||||
$lang->block->orderBy = 'Order by';
|
||||
|
||||
$lang->block->availableBlocks = new stdclass();
|
||||
$lang->block->availableBlocks->todo = 'My Todos';
|
||||
$lang->block->availableBlocks->todo = 'My schedule';
|
||||
$lang->block->availableBlocks->task = 'My Tasks';
|
||||
$lang->block->availableBlocks->bug = 'My Bugs';
|
||||
$lang->block->availableBlocks->case = 'My Cases';
|
||||
|
||||
@@ -31,7 +31,7 @@ $lang->block->lblBlock = 'Bloc';
|
||||
$lang->block->lblNum = 'Numéro';
|
||||
$lang->block->lblHtml = 'HTML';
|
||||
$lang->block->dynamic = 'Historique';
|
||||
$lang->block->assignToMe = 'Assigné à moi';
|
||||
$lang->block->assignToMe = 'Todo';
|
||||
$lang->block->done = 'Done';
|
||||
$lang->block->lblFlowchart = 'Organigramme';
|
||||
$lang->block->welcome = 'Bienvenue';
|
||||
@@ -290,7 +290,7 @@ $lang->block->default['full']['my']['6']['block'] = 'recentproject';
|
||||
$lang->block->default['full']['my']['6']['source'] = 'project';
|
||||
$lang->block->default['full']['my']['6']['grid'] = 8;
|
||||
|
||||
$lang->block->default['full']['my']['7']['title'] = 'AssignedToMe';
|
||||
$lang->block->default['full']['my']['7']['title'] = 'Todo';
|
||||
$lang->block->default['full']['my']['7']['block'] = 'assigntome';
|
||||
$lang->block->default['full']['my']['7']['source'] = '';
|
||||
$lang->block->default['full']['my']['7']['grid'] = 8;
|
||||
@@ -320,7 +320,7 @@ $lang->block->type = 'Type';
|
||||
$lang->block->orderBy = 'Trié par';
|
||||
|
||||
$lang->block->availableBlocks = new stdclass();
|
||||
$lang->block->availableBlocks->todo = 'Ma Todo List';
|
||||
$lang->block->availableBlocks->todo = 'Mon emploi du temps';
|
||||
$lang->block->availableBlocks->task = 'Mes Tâches';
|
||||
$lang->block->availableBlocks->bug = 'Mes Bugs';
|
||||
$lang->block->availableBlocks->case = 'Mes CasTests';
|
||||
|
||||
@@ -31,7 +31,7 @@ $lang->block->lblBlock = 'Block';
|
||||
$lang->block->lblNum = 'Số';
|
||||
$lang->block->lblHtml = 'HTML';
|
||||
$lang->block->dynamic = 'Lịch sử';
|
||||
$lang->block->assignToMe = 'Giao cho bạn';
|
||||
$lang->block->assignToMe = 'Todo';
|
||||
$lang->block->done = 'Done';
|
||||
$lang->block->lblFlowchart = 'Biểu đồ';
|
||||
$lang->block->welcome = 'Welcome';
|
||||
@@ -290,7 +290,7 @@ $lang->block->default['full']['my']['6']['block'] = 'recentproject';
|
||||
$lang->block->default['full']['my']['6']['source'] = 'project';
|
||||
$lang->block->default['full']['my']['6']['grid'] = 8;
|
||||
|
||||
$lang->block->default['full']['my']['7']['title'] = 'AssignedToMe';
|
||||
$lang->block->default['full']['my']['7']['title'] = 'Todo';
|
||||
$lang->block->default['full']['my']['7']['block'] = 'assigntome';
|
||||
$lang->block->default['full']['my']['7']['source'] = '';
|
||||
$lang->block->default['full']['my']['7']['grid'] = 8;
|
||||
@@ -320,7 +320,7 @@ $lang->block->type = 'Loại';
|
||||
$lang->block->orderBy = 'Order by';
|
||||
|
||||
$lang->block->availableBlocks = new stdclass();
|
||||
$lang->block->availableBlocks->todo = 'Việc của bạn';
|
||||
$lang->block->availableBlocks->todo = 'Lịch của tôi';
|
||||
$lang->block->availableBlocks->task = 'Nhiệm vụ';
|
||||
$lang->block->availableBlocks->bug = 'Bugs của bạn';
|
||||
$lang->block->availableBlocks->case = 'Tình huống của bạn';
|
||||
|
||||
@@ -31,7 +31,7 @@ $lang->block->lblBlock = '区块';
|
||||
$lang->block->lblNum = '条数';
|
||||
$lang->block->lblHtml = 'HTML内容';
|
||||
$lang->block->dynamic = '最新动态';
|
||||
$lang->block->assignToMe = '指派给我';
|
||||
$lang->block->assignToMe = '待处理';
|
||||
$lang->block->done = '已完成';
|
||||
$lang->block->lblFlowchart = '流程图';
|
||||
$lang->block->welcome = '欢迎总览';
|
||||
@@ -290,7 +290,7 @@ $lang->block->default['full']['my']['6']['block'] = 'recentproject';
|
||||
$lang->block->default['full']['my']['6']['source'] = 'project';
|
||||
$lang->block->default['full']['my']['6']['grid'] = 8;
|
||||
|
||||
$lang->block->default['full']['my']['7']['title'] = '指派给我';
|
||||
$lang->block->default['full']['my']['7']['title'] = '待处理';
|
||||
$lang->block->default['full']['my']['7']['block'] = 'assigntome';
|
||||
$lang->block->default['full']['my']['7']['source'] = '';
|
||||
$lang->block->default['full']['my']['7']['grid'] = 8;
|
||||
@@ -320,7 +320,7 @@ $lang->block->type = '类型';
|
||||
$lang->block->orderBy = '排序';
|
||||
|
||||
$lang->block->availableBlocks = new stdclass();
|
||||
$lang->block->availableBlocks->todo = '我的待办';
|
||||
$lang->block->availableBlocks->todo = '我的日程';
|
||||
$lang->block->availableBlocks->task = '我的任务';
|
||||
$lang->block->availableBlocks->bug = '我的Bug';
|
||||
$lang->block->availableBlocks->case = '我的用例';
|
||||
|
||||
@@ -31,7 +31,7 @@ $lang->block->lblBlock = '區塊';
|
||||
$lang->block->lblNum = '條數';
|
||||
$lang->block->lblHtml = 'HTML內容';
|
||||
$lang->block->dynamic = '最新動態';
|
||||
$lang->block->assignToMe = '指派給我';
|
||||
$lang->block->assignToMe = '待處理';
|
||||
$lang->block->done = '已完成';
|
||||
$lang->block->lblFlowchart = '流程圖';
|
||||
$lang->block->welcome = '歡迎總覽';
|
||||
@@ -290,7 +290,7 @@ $lang->block->default['full']['my']['6']['block'] = 'recentproject';
|
||||
$lang->block->default['full']['my']['6']['source'] = 'project';
|
||||
$lang->block->default['full']['my']['6']['grid'] = 8;
|
||||
|
||||
$lang->block->default['full']['my']['7']['title'] = '指派給我';
|
||||
$lang->block->default['full']['my']['7']['title'] = '待處理';
|
||||
$lang->block->default['full']['my']['7']['block'] = 'assigntome';
|
||||
$lang->block->default['full']['my']['7']['source'] = '';
|
||||
$lang->block->default['full']['my']['7']['grid'] = 8;
|
||||
@@ -320,7 +320,7 @@ $lang->block->type = '類型';
|
||||
$lang->block->orderBy = '排序';
|
||||
|
||||
$lang->block->availableBlocks = new stdclass();
|
||||
$lang->block->availableBlocks->todo = '我的待辦';
|
||||
$lang->block->availableBlocks->todo = '我的日程';
|
||||
$lang->block->availableBlocks->task = '我的任務';
|
||||
$lang->block->availableBlocks->bug = '我的Bug';
|
||||
$lang->block->availableBlocks->case = '我的用例';
|
||||
|
||||
@@ -476,12 +476,20 @@ class bug extends control
|
||||
$moduleOptionMenu = $this->tree->getOptionMenu($productID, $viewType = 'bug', $startModuleID = 0, $branch);
|
||||
if(empty($moduleOptionMenu)) die(js::locate(helper::createLink('tree', 'browse', "productID=$productID&view=story")));
|
||||
|
||||
/* Get products and projects. */
|
||||
$products = $this->products;
|
||||
if($projectID)
|
||||
{
|
||||
$products = array();
|
||||
$productList = $this->product->getOrderedProducts('all', 40, $projectID);
|
||||
foreach($productList as $product) $products[$product->id] = $product->name;
|
||||
|
||||
$project = $this->loadModel('project')->getByID($projectID);
|
||||
$projects = array($projectID => $project->name);
|
||||
}
|
||||
else
|
||||
{
|
||||
$projects = $this->product->getProjectPairsByProduct($productID, $branch);
|
||||
}
|
||||
|
||||
/* Set custom. */
|
||||
@@ -498,9 +506,11 @@ class bug extends control
|
||||
$this->view->productName = $this->products[$productID];
|
||||
$this->view->moduleOptionMenu = $moduleOptionMenu;
|
||||
$this->view->stories = $stories;
|
||||
$this->view->projects = $projects;
|
||||
$this->view->executions = $this->product->getExecutionPairsByProduct($productID, $branch ? "0,$branch" : 0, 'id_desc', $projectID);
|
||||
$this->view->builds = $builds;
|
||||
$this->view->moduleID = (int)$moduleID;
|
||||
$this->view->projectID = $projectID;
|
||||
$this->view->executionID = $executionID;
|
||||
$this->view->taskID = $taskID;
|
||||
$this->view->storyID = $storyID;
|
||||
|
||||
+28
-5
@@ -55,7 +55,7 @@ function loadAll(productID)
|
||||
$('#task').chosen();
|
||||
loadProductBranches(productID)
|
||||
loadProductModules(productID);
|
||||
loadProductExecutions(productID);
|
||||
loadProductProjects(productID);
|
||||
loadProductBuilds(productID);
|
||||
loadProductplans(productID);
|
||||
loadProductStories(productID);
|
||||
@@ -75,7 +75,7 @@ function loadBranch()
|
||||
$('#task').chosen();
|
||||
productID = $('#product').val();
|
||||
loadProductModules(productID);
|
||||
loadProductExecutions(productID);
|
||||
loadProductProjects(productID);
|
||||
loadProductBuilds(productID);
|
||||
loadProductplans(productID);
|
||||
loadProductStories(productID);
|
||||
@@ -232,19 +232,42 @@ function loadProductStories(productID)
|
||||
}
|
||||
|
||||
/**
|
||||
* Load executions of product.
|
||||
* Load projects of product.
|
||||
*
|
||||
* @param int $productID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function loadProductExecutions(productID)
|
||||
function loadProductProjects(productID)
|
||||
{
|
||||
branch = $('#branch').val();
|
||||
if(typeof(branch) == 'undefined') branch = 0;
|
||||
|
||||
link = createLink('product', 'ajaxGetProjects', 'productID=' + productID + '&branch=' + branch + '&projectID=' + oldProjectID);
|
||||
$('#projectBox').load(link, function()
|
||||
{
|
||||
$(this).find('select').chosen();
|
||||
var projectID = $('#project').find("option:selected").val();
|
||||
loadProductExecutions(productID, projectID);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Load executions of product.
|
||||
*
|
||||
* @param int $productID
|
||||
* @param int $projectID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function loadProductExecutions(productID, projectID = 0)
|
||||
{
|
||||
if(!projectID) projectID = $('#project').find("option:selected").val();
|
||||
required = $('#execution_chosen').hasClass('required');
|
||||
branch = $('#branch').val();
|
||||
if(typeof(branch) == 'undefined') branch = 0;
|
||||
|
||||
link = createLink('product', 'ajaxGetExecutions', 'productID=' + productID + '&executionID=' + oldExecutionID + '&branch=' + branch);
|
||||
link = createLink('product', 'ajaxGetExecutions', 'productID=' + productID + '&projectID=' + projectID + '&branch=' + branch);
|
||||
$('#executionIdBox').load(link, function()
|
||||
{
|
||||
$(this).find('select').chosen();
|
||||
|
||||
@@ -92,7 +92,7 @@ $(function()
|
||||
var assignedto = $('#assignedTo').val();
|
||||
changeProductConfirmed = true;
|
||||
oldStoryID = $('#story').val() || 0;
|
||||
oldExecutionID = 0;
|
||||
oldExecutionID = 0;
|
||||
oldOpenedBuild = '';
|
||||
oldTaskID = $('#oldTaskID').val() || 0;
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@ $lang->bug->branch = 'Branch/Platform';
|
||||
$lang->bug->productplan = 'Plan';
|
||||
$lang->bug->module = 'Modul';
|
||||
$lang->bug->moduleAB = 'Modul';
|
||||
$lang->bug->project = 'Project';
|
||||
$lang->bug->execution = $lang->executionCommon;
|
||||
$lang->bug->story = 'Story';
|
||||
$lang->bug->storyVersion = 'Story Version';
|
||||
|
||||
@@ -17,6 +17,7 @@ $lang->bug->branch = 'Branch/Platform';
|
||||
$lang->bug->productplan = 'Plan';
|
||||
$lang->bug->module = 'Module';
|
||||
$lang->bug->moduleAB = 'Module';
|
||||
$lang->bug->project = 'Project';
|
||||
$lang->bug->execution = $lang->executionCommon;
|
||||
$lang->bug->story = 'Story';
|
||||
$lang->bug->storyVersion = 'Story Version';
|
||||
|
||||
@@ -17,6 +17,7 @@ $lang->bug->branch = 'Branche/Plateforme';
|
||||
$lang->bug->productplan = 'Plan';
|
||||
$lang->bug->module = 'Module';
|
||||
$lang->bug->moduleAB = 'Module';
|
||||
$lang->bug->project = 'Project';
|
||||
$lang->bug->execution = $lang->executionCommon;
|
||||
$lang->bug->story = 'Story';
|
||||
$lang->bug->storyVersion = 'Version Story';
|
||||
|
||||
@@ -17,6 +17,7 @@ $lang->bug->branch = 'Branch/Platform';
|
||||
$lang->bug->productplan = 'Kế hoạch';
|
||||
$lang->bug->module = 'Module';
|
||||
$lang->bug->moduleAB = 'Module';
|
||||
$lang->bug->project = 'Project';
|
||||
$lang->bug->execution = $lang->executionCommon;
|
||||
$lang->bug->story = 'Câu chuyện';
|
||||
$lang->bug->storyVersion = 'Phiên bản câu chuyện';
|
||||
|
||||
@@ -17,6 +17,7 @@ $lang->bug->branch = '分支/平台';
|
||||
$lang->bug->productplan = '所属' . '计划';
|
||||
$lang->bug->module = '所属模块';
|
||||
$lang->bug->moduleAB = '模块';
|
||||
$lang->bug->project = '所属项目';
|
||||
$lang->bug->execution = '所属' . $lang->executionCommon;
|
||||
$lang->bug->story = "相关{$lang->SRCommon}";
|
||||
$lang->bug->storyVersion = "{$lang->SRCommon}版本";
|
||||
|
||||
@@ -23,6 +23,7 @@ js::set('flow', $config->global->flow);
|
||||
js::set('stepsRequired', $stepsRequired);
|
||||
js::set('stepsNotEmpty', $lang->bug->stepsNotEmpty);
|
||||
js::set('isStepsTemplate', $isStepsTemplate);
|
||||
js::set('oldProjectID', $projectID);
|
||||
?>
|
||||
<div id="mainContent" class="main-content fade">
|
||||
<div class="center-block">
|
||||
@@ -91,7 +92,15 @@ js::set('isStepsTemplate', $isStepsTemplate);
|
||||
</td>
|
||||
<?php endif;?>
|
||||
<?php if($showExecution):?>
|
||||
<td><span id='executionIdBox'><?php echo html::select('execution', $executions, $executionID, "class='form-control chosen' onchange='loadExecutionRelated(this.value)'");?></span></td>
|
||||
<td>
|
||||
<div class='table-row'>
|
||||
<div class='table-col' id='projectBox'>
|
||||
<?php echo html::select('project', $projects, $projectID, "class='form-control chosen'");?>
|
||||
</div>
|
||||
<div class='table-col' id='executionIdBox'>
|
||||
<?php echo html::select('execution', $executions, $executionID, "class='form-control chosen' onchange='loadExecutionRelated(this.value)'");?>
|
||||
</div>
|
||||
</td>
|
||||
<?php endif;?>
|
||||
<td>
|
||||
<div class='input-group' id='buildBox'>
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
<?php if(!$bug->deleted):?>
|
||||
<div class='divider'></div>
|
||||
<?php
|
||||
common::printIcon('bug', 'confirmBug', $params, $bug, 'button', 'search', '', 'iframe', true);
|
||||
common::printIcon('bug', 'confirmBug', $params, $bug, 'button', 'ok', '', 'iframe', true);
|
||||
common::printIcon('bug', 'assignTo', $params, $bug, 'button', '', '', 'iframe', true);
|
||||
common::printIcon('bug', 'resolve', $params, $bug, 'button', 'checked', '', 'iframe showinonlybody', true);
|
||||
common::printIcon('bug', 'close', $params, $bug, 'button', '', '', 'text-danger iframe showinonlybody', true);
|
||||
|
||||
@@ -114,8 +114,6 @@ $lang->future = 'Warte';
|
||||
$lang->year = 'Jahr';
|
||||
$lang->workingHour = 'Stunde';
|
||||
|
||||
$lang->sprintCommon = $lang->iterationCommon . '/Phase';
|
||||
|
||||
$lang->idAB = 'ID';
|
||||
$lang->priAB = 'P';
|
||||
$lang->statusAB = 'Status';
|
||||
|
||||
@@ -114,8 +114,6 @@ $lang->future = 'Waiting';
|
||||
$lang->year = 'Year';
|
||||
$lang->workingHour = 'Hours';
|
||||
|
||||
$lang->sprintCommon = $lang->iterationCommon . '/Phase';
|
||||
|
||||
$lang->idAB = 'ID';
|
||||
$lang->priAB = 'P';
|
||||
$lang->statusAB = 'Status';
|
||||
|
||||
@@ -114,8 +114,6 @@ $lang->future = 'En Attente';
|
||||
$lang->year = 'Année';
|
||||
$lang->workingHour = 'Heures';
|
||||
|
||||
$lang->sprintCommon = $lang->iterationCommon . '/Phase';
|
||||
|
||||
$lang->idAB = 'ID';
|
||||
$lang->priAB = 'P';
|
||||
$lang->statusAB = 'Statut';
|
||||
|
||||
@@ -114,8 +114,6 @@ $lang->future = 'Đang đợi';
|
||||
$lang->year = 'Năm';
|
||||
$lang->workingHour = 'giờ';
|
||||
|
||||
$lang->sprintCommon = $lang->iterationCommon . '/Phase';
|
||||
|
||||
$lang->idAB = 'ID';
|
||||
$lang->priAB = 'P';
|
||||
$lang->statusAB = 'Tình trạng';
|
||||
|
||||
@@ -114,8 +114,6 @@ $lang->future = '未来';
|
||||
$lang->year = '年';
|
||||
$lang->workingHour = '工时';
|
||||
|
||||
$lang->sprintCommon = $lang->iterationCommon . '/阶段';
|
||||
|
||||
$lang->idAB = 'ID';
|
||||
$lang->priAB = 'P';
|
||||
$lang->statusAB = '状态';
|
||||
|
||||
@@ -221,7 +221,7 @@ $lang->custom->CRExecution[0] = 'Change Forbidden';
|
||||
|
||||
$lang->custom->moduleName['product'] = $lang->productCommon;
|
||||
$lang->custom->moduleName['productplan'] = 'Plan';
|
||||
$lang->custom->moduleName['execution'] = $lang->sprintCommon;
|
||||
$lang->custom->moduleName['execution'] = 'Execution';
|
||||
|
||||
$lang->custom->conceptQuestions['overview'] = "1. Which combination of management fits your company?";
|
||||
$lang->custom->conceptQuestions['URAndSR'] = "2. Do you want to use the concept of {$lang->URCommon} and {$lang->SRCommon} in ZenTao?";
|
||||
|
||||
@@ -2213,14 +2213,10 @@ class executionModel extends model
|
||||
{
|
||||
if(defined('TUTORIAL')) return $this->loadModel('tutorial')->getTeamMembers();
|
||||
|
||||
$execution = $this->getByID($executionID);
|
||||
$type = $this->config->systemMode == 'new' ? $execution->type : 'execution';
|
||||
if(empty($execution)) return array();
|
||||
|
||||
return $this->dao->select("t1.*, t1.hours * t1.days AS totalHours, t2.id as userID, if(t2.deleted='0', t2.realname, t1.account) as realname")->from(TABLE_TEAM)->alias('t1')
|
||||
->leftJoin(TABLE_USER)->alias('t2')->on('t1.account = t2.account')
|
||||
->where('t1.root')->eq((int)$executionID)
|
||||
->andWhere('t1.type')->eq($type)
|
||||
->andWhere('t1.type')->eq('execution')
|
||||
->andWhere('t2.deleted')->eq('0')
|
||||
->fetchAll('account');
|
||||
}
|
||||
@@ -2239,14 +2235,11 @@ class executionModel extends model
|
||||
if(defined('TUTORIAL')) return $this->loadModel('tutorial')->getTeamMembersPairs();
|
||||
$this->app->loadConfig('user');
|
||||
|
||||
$execution = $this->getByID($executionID);
|
||||
if(empty($execution)) return array();
|
||||
|
||||
$keyField = strpos($params, 'useid') !== false ? 'id' : 'account';
|
||||
$users = $this->dao->select("t2.id, t2.account, t2.realname")->from(TABLE_TEAM)->alias('t1')
|
||||
->leftJoin(TABLE_USER)->alias('t2')->on('t1.account = t2.account')
|
||||
->where('t1.root')->eq((int)$executionID)
|
||||
->andWhere('t1.type')->eq($execution->type)
|
||||
->andWhere('t1.type')->eq('execution')
|
||||
->beginIF($params == 'nodeleted' or empty($this->config->user->showDeleted))
|
||||
->andWhere('t2.deleted')->eq(0)
|
||||
->fi()
|
||||
@@ -2344,7 +2337,7 @@ class executionModel extends model
|
||||
$data = (array)fixer::input('post')->get();
|
||||
|
||||
extract($data);
|
||||
$executionType = $execution->type;
|
||||
$executionType = strpos('sprint|stage', $execution->type) !== false ? 'execution' : $execution->type;
|
||||
$accounts = array_unique($accounts);
|
||||
$limited = array_values($limited);
|
||||
$oldJoin = $this->dao->select('`account`, `join`')->from(TABLE_TEAM)->where('root')->eq((int)$executionID)->andWhere('type')->eq($executionType)->fetchPairs();
|
||||
|
||||
@@ -116,7 +116,7 @@
|
||||
}
|
||||
if(moduleName === 'user')
|
||||
{
|
||||
if(['todo', 'task', 'story', 'bug', 'testtask', 'testcase', 'execution', 'dynamic', 'profile'].includes(methodLowerCase)) return 'system';
|
||||
if(['todo', 'task', 'story', 'bug', 'testtask', 'testcase', 'execution', 'dynamic', 'profile', 'view'].includes(methodLowerCase)) return 'system';
|
||||
}
|
||||
if(moduleName === 'my')
|
||||
{
|
||||
|
||||
@@ -96,7 +96,7 @@ js::set('defaultOpen', $open);
|
||||
</div>
|
||||
<?php else:?>
|
||||
<div class='version-content'>
|
||||
<?php foreach($latestVersionList as $version):?>
|
||||
<?php foreach($latestVersionList as $versionNumber => $version):?>
|
||||
<div class="version-list">
|
||||
<div>
|
||||
<i class='version-upgrade icon-version'></i>
|
||||
@@ -104,7 +104,7 @@ js::set('defaultOpen', $open);
|
||||
</div>
|
||||
<div class="version-detail"><?php echo $version->explain;?></div>
|
||||
<div class="version-footer">
|
||||
<a href="<?php echo inLink('changeLog', 'version=' . $version->name);?>" class="btn btn-link iframe" data-width="800"><?php echo $lang->index->log;?></strong></a>
|
||||
<a href="<?php echo inLink('changeLog', 'version=' . $versionNumber);?>" class="btn btn-link iframe" data-width="800"><?php echo $lang->index->log;?></strong></a>
|
||||
<a href='<?php echo $version->link?>' class='btn btn-primary upgrade-now' style='color: white;' target='_blank'><?php echo $lang->index->upgrade;?></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -35,10 +35,11 @@
|
||||
<?php else:?>
|
||||
<form id='myBugForm' class="main-table table-bug" data-ride="table" method="post" action='<?php echo $this->createLink('bug', 'batchEdit', "productID=0");?>'>
|
||||
<?php
|
||||
$canBatchEdit = (common::hasPriv('bug', 'batchEdit') and $type == 'assignedTo');
|
||||
$canBatchConfirm = common::hasPriv('bug', 'batchConfirm');
|
||||
$canBatchClose = (common::hasPriv('bug', 'batchClose') and strtolower($type) != 'closedby');
|
||||
$canBatchAssignTo = common::hasPriv('bug', 'batchAssignTo');
|
||||
$canBatchAction = ($canBatchConfirm or $canBatchClose or $canBatchAssignTo);
|
||||
$canBatchAction = ($canBatchEdit or $canBatchConfirm or $canBatchClose or $canBatchAssignTo);
|
||||
?>
|
||||
<table class="table has-sort-head table-fixed" id='bugList'>
|
||||
<?php $vars = "mode=$mode&type=$type&orderBy=%s&recTotal=$recTotal&recPerPage=$recPerPage&pageID=$pageID"; ?>
|
||||
@@ -138,6 +139,12 @@
|
||||
<?php endif;?>
|
||||
<div class="table-actions btn-toolbar">
|
||||
<?php
|
||||
if($canBatchEdit)
|
||||
{
|
||||
$actionLink = $this->createLink('bug', 'batchEdit');
|
||||
$misc = "data-form-action='$actionLink'";
|
||||
echo html::commonButton($lang->edit, $misc);
|
||||
}
|
||||
if($canBatchConfirm)
|
||||
{
|
||||
$actionLink = $this->createLink('bug', 'batchConfirm', '', '', '', $bug->project);
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
</div>
|
||||
<?php else:?>
|
||||
<form id='myTaskForm' class="main-table table-task" method="post">
|
||||
<?php $canBatchEdit = common::hasPriv('task', 'batchEdit');?>
|
||||
<?php $canBatchEdit = (common::hasPriv('task', 'batchEdit') and $type == 'assignedTo');?>
|
||||
<?php $canBatchClose = (common::hasPriv('task', 'batchClose') and $type != 'closedBy');?>
|
||||
<table class="table has-sort-head table-fixed" id='taskTable'>
|
||||
<?php $vars = "mode=$mode&type=$type&orderBy=%s&recTotal=$recTotal&recPerPage=$recPerPage&pageID=$pageID"; ?>
|
||||
@@ -199,11 +199,18 @@
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="table-footer">
|
||||
<?php if($canBatchClose):?>
|
||||
<?php if($canBatchClose or $canBatchEdit):?>
|
||||
<div class="checkbox-primary check-all"><label><?php echo $lang->selectAll?></label></div>
|
||||
<?php endif;?>
|
||||
<div class="table-actions btn-toolbar">
|
||||
<?php
|
||||
if($canBatchEdit)
|
||||
{
|
||||
$actionLink = $this->createLink('task', 'batchEdit');
|
||||
$misc = "data-form-action='$actionLink'";
|
||||
echo html::commonButton($lang->edit, $misc);
|
||||
}
|
||||
|
||||
if($canBatchClose)
|
||||
{
|
||||
$actionLink = $this->createLink('task', 'batchClose', null, '', '', $task->project);
|
||||
|
||||
@@ -837,6 +837,23 @@ class product extends control
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* AJAX: get projects of a product in html select.
|
||||
*
|
||||
* @param int $productID
|
||||
* @param int $branch
|
||||
* @param int $projectID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function ajaxGetProjects($productID, $branch = 0, $projectID = 0)
|
||||
{
|
||||
$projects = $this->product->getProjectPairsByProduct($productID, $branch ? "0,$branch" : $branch);
|
||||
if($this->app->getViewType() == 'json') die(json_encode($peojects));
|
||||
|
||||
die(html::select('project', $projects, $projectID, "class='form-control' onchange='loadProductExecutions({$productID})'"));
|
||||
}
|
||||
|
||||
/**
|
||||
* AJAX: get executions of a product in html select.
|
||||
*
|
||||
|
||||
@@ -51,7 +51,7 @@ $lang->product->build = 'Build';
|
||||
$lang->product->moreProduct = "More Product";
|
||||
$lang->product->projectInfo = "Projects that are linked to this {$lang->productCommon} are listed below.";
|
||||
|
||||
$lang->product->currentExecution = "Aktuelle {$lang->sprintCommon}";
|
||||
$lang->product->currentExecution = "Aktuelle Execution";
|
||||
$lang->product->activeStories = 'Aktivierte [S]';
|
||||
$lang->product->activeStoriesTitle = 'Active Stories';
|
||||
$lang->product->changedStories = 'Geänderte [S]';
|
||||
|
||||
@@ -51,7 +51,7 @@ $lang->product->build = 'Build List';
|
||||
$lang->product->moreProduct = "More Product";
|
||||
$lang->product->projectInfo = "Projects that are linked to this {$lang->productCommon} are listed below.";
|
||||
|
||||
$lang->product->currentExecution = "Current {$lang->sprintCommon}";
|
||||
$lang->product->currentExecution = "Current Execution";
|
||||
$lang->product->activeStories = 'Active [S]';
|
||||
$lang->product->activeStoriesTitle = 'Active Stories';
|
||||
$lang->product->changedStories = 'Changed [S]';
|
||||
|
||||
@@ -51,7 +51,7 @@ $lang->product->build = 'Liste Builds';
|
||||
$lang->product->moreProduct = "More Product";
|
||||
$lang->product->projectInfo = "Les Projects qui sont associés à ce {$lang->productCommon} sont listés ci-dessous.";
|
||||
|
||||
$lang->product->currentExecution = "Current {$lang->sprintCommon}";
|
||||
$lang->product->currentExecution = "Current Execution";
|
||||
$lang->product->activeStories = 'Actives [S]';
|
||||
$lang->product->activeStoriesTitle = 'Stories Actives';
|
||||
$lang->product->changedStories = 'Changées [S]';
|
||||
|
||||
@@ -51,7 +51,7 @@ $lang->product->build = 'Danh sách bản dựng';
|
||||
$lang->product->moreProduct = "More Product";
|
||||
$lang->product->projectInfo = "Projects đã liên kết tới {$lang->productCommon} này được liệt kê bên dưới.";
|
||||
|
||||
$lang->product->currentExecution = "Hiện {$lang->sprintCommon}";
|
||||
$lang->product->currentExecution = "Hiện Execution";
|
||||
$lang->product->activeStories = 'Kích hoạt [S]';
|
||||
$lang->product->activeStoriesTitle = 'Kích hoạt câu chuyện';
|
||||
$lang->product->changedStories = 'Đã thay đổi [S]';
|
||||
|
||||
@@ -51,7 +51,7 @@ $lang->product->build = '版本列表';
|
||||
$lang->product->moreProduct = "更多产品";
|
||||
$lang->product->projectInfo = "所有与此产品关联的项目";
|
||||
|
||||
$lang->product->currentExecution = "当前{$lang->sprintCommon}";
|
||||
$lang->product->currentExecution = "当前执行";
|
||||
$lang->product->activeStories = "激活{$lang->SRCommon}";
|
||||
$lang->product->activeStoriesTitle = "激活{$lang->SRCommon}";
|
||||
$lang->product->changedStories = "已变更{$lang->SRCommon}";
|
||||
|
||||
@@ -121,8 +121,8 @@
|
||||
#programTableList > tr.drop-not-allowed {opacity: 0.1!important}
|
||||
#programList .c-actions {overflow: visible;}
|
||||
#programTableList > tr:last-child .c-actions .dropdown-menu {top: auto; bottom: 100%; margin-bottom: -5px;}
|
||||
#programTableList .icon-project:before, #programTableList .no-nest .icon-program:before, #programTableList .is-nest-child .icon-program:before {content: '\e99c'; width: 22px; height: 22px; background: none; color: #16a8f8; top: 0; line-height: 22px; margin-right: 2px; font-size: 14px}
|
||||
#programTableList .no-nest .icon-program:before, #programTableList .is-nest-child .icon-program:before {content: '\e944'; color: #ffe066; font-size: 16px;}
|
||||
#programTableList .icon-project:before {content: '\e99c'; width: 22px; height: 22px; background: none; color: #16a8f8; top: 0; line-height: 22px; margin-right: 2px; font-size: 14px}
|
||||
#programTableList .no-nest .icon-program:before, #programTableList .is-nest-child .icon-program:before {width: 10px; min-width: 10px; height: 10px; top: 1px}
|
||||
</style>
|
||||
<?php js::set('originOrders', $originOrders);?>
|
||||
<script>
|
||||
|
||||
@@ -46,8 +46,8 @@ $lang->report->workload = '员工负载表';
|
||||
$lang->report->workloadAB = '工作负载';
|
||||
$lang->report->bugOpenedDate = 'Bug创建时间';
|
||||
$lang->report->beginAndEnd = '起止时间';
|
||||
$lang->report->begin = '起始时间';
|
||||
$lang->report->end = '结束时间';
|
||||
$lang->report->begin = '起始日期';
|
||||
$lang->report->end = '结束日期';
|
||||
$lang->report->dept = '部门';
|
||||
$lang->report->deviationChart = '执行偏差曲线';
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<div class='side-col col-lg' id='sidebar'>
|
||||
<?php include 'blockreportlist.html.php';?>
|
||||
</div>
|
||||
<div class='main-col'>
|
||||
<div class='main-col w-800px'>
|
||||
<?php if(empty($assigns)):?>
|
||||
<div class="cell">
|
||||
<div class="table-empty-tip">
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<div class='side-col col-lg' id='sidebar'>
|
||||
<?php include 'blockreportlist.html.php';?>
|
||||
</div>
|
||||
<div class='main-col'>
|
||||
<div class='main-col w-800px'>
|
||||
<div class='cell'>
|
||||
<div class="row" id='conditions'>
|
||||
<div class='col-sm-4'>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<div class='side-col col-lg' id='sidebar'>
|
||||
<?php include 'blockreportlist.html.php';?>
|
||||
</div>
|
||||
<div class='main-col'>
|
||||
<div class='main-col w-800px'>
|
||||
<?php if(empty($products)):?>
|
||||
<div class="cell">
|
||||
<div class="table-empty-tip">
|
||||
@@ -97,7 +97,7 @@
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
</table>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<div class='side-col col-lg' id='sidebar'>
|
||||
<?php include 'blockreportlist.html.php';?>
|
||||
</div>
|
||||
<div class='main-col'>
|
||||
<div class='main-col w-800px'>
|
||||
<div class='cell'>
|
||||
<form method='post'>
|
||||
<div class="row" id='conditions'>
|
||||
|
||||
@@ -41,6 +41,7 @@ $formId = 'searchForm-' . uniqid('');
|
||||
#queryBox .chosen-container-single .chosen-single > span {margin-right:5px;}
|
||||
|
||||
#queryBox .form-actions .btn {margin-right: 5px;}
|
||||
@media screen and (max-width: 1366px) { #userQueries {width: 130px!important;} }
|
||||
#userQueries {border-left: 1px solid #eee; vertical-align: top;}
|
||||
#userQueries > h4 {margin: 0 0 6px;}
|
||||
#userQueries ul {list-style: none; padding-left: 0; margin: 0; max-height:75px; overflow:auto;}
|
||||
|
||||
@@ -460,9 +460,10 @@ class task extends control
|
||||
/* The tasks of my. */
|
||||
else
|
||||
{
|
||||
$this->lang->task->menu = $this->lang->my->menu;
|
||||
$this->lang->set('menugroup.task', 'my');
|
||||
$this->lang->navGroup->task = 'my';
|
||||
$this->lang->task->menu = $this->lang->my->menu;
|
||||
$this->lang->task->menuOrder = $this->lang->my->menuOrder;
|
||||
$this->lang->set('menugroup.task', 'my');
|
||||
$this->loadModel('my')->setMenu();
|
||||
$this->view->position[] = html::a($this->createLink('my', 'task'), $this->lang->my->task);
|
||||
$this->view->title = $this->lang->task->batchEdit;
|
||||
@@ -476,7 +477,7 @@ class task extends control
|
||||
/* Get execution teams. */
|
||||
$executionIDList = array();
|
||||
foreach($tasks as $task) if(!in_array($task->execution, $executionIDList)) $executionIDList[] = $task->execution;
|
||||
$executionTeams = $this->dao->select('*')->from(TABLE_TEAM)->where('root')->in($executionIDList)->andWhere('type')->in('sprint,stage')->fetchGroup('root', 'account');
|
||||
$executionTeams = $this->dao->select('*')->from(TABLE_TEAM)->where('root')->in($executionIDList)->andWhere('type')->eq('execution')->fetchGroup('root', 'account');
|
||||
|
||||
/* Judge whether the editedTasks is too large and set session. */
|
||||
$countInputVars = count($tasks) * (count(explode(',', $this->config->task->custom->batchEditFields)) + 3);
|
||||
|
||||
+60
-33
@@ -630,7 +630,7 @@ class testcaseModel extends model
|
||||
->get();
|
||||
|
||||
$requiredFields = $this->config->testcase->edit->requiredFields;
|
||||
if($case->lib != 0)
|
||||
if($oldCase->lib != 0)
|
||||
{
|
||||
/* Remove the require field named story when the case is a lib case.*/
|
||||
$requiredFieldsArr = explode(',', $requiredFields);
|
||||
@@ -645,38 +645,7 @@ class testcaseModel extends model
|
||||
$titleChanged = ($case->title != $oldCase->title);
|
||||
if($isLibCase and $titleChanged) $this->dao->update(TABLE_CASE)->set('`title`')->eq($case->title)->where('`fromCaseID`')->eq($caseID)->exec();
|
||||
|
||||
/* The case is linked the project. */
|
||||
if($oldCase->project != 0)
|
||||
{
|
||||
$productChanged = ($oldCase->product != $case->product);
|
||||
$storyChanged = ($oldCase->story != $case->story);
|
||||
|
||||
if($productChanged)
|
||||
{
|
||||
$this->dao->update(TABLE_PROJECTCASE)
|
||||
->set('product')->eq($case->product)
|
||||
->set('version')->eq($case->version)
|
||||
->where('project')->eq($oldCase->project)
|
||||
->andWhere('`case`')->eq($oldCase->id)
|
||||
->exec();
|
||||
}
|
||||
|
||||
/* If the related story is changed and the new related story isn't linked the project, unlink the case. */
|
||||
if($storyChanged)
|
||||
{
|
||||
$projectStory = $this->dao->select('*')->from(TABLE_PROJECTSTORY)
|
||||
->where('project')->eq($oldCase->project)
|
||||
->andWhere('story')->eq($case->story)
|
||||
->fetchAll();
|
||||
if(!$projectStory)
|
||||
{
|
||||
$this->dao->delete()->from(TABLE_PROJECTCASE)
|
||||
->where('project')->eq($oldCase->project)
|
||||
->andWhere('`case`')->eq($oldCase->id)
|
||||
->exec();
|
||||
}
|
||||
}
|
||||
}
|
||||
$this->updateCase2Project($oldCase, $case, $caseID);
|
||||
|
||||
if($stepChanged)
|
||||
{
|
||||
@@ -901,6 +870,8 @@ class testcaseModel extends model
|
||||
$titleChanged = ($case->title != $oldCase->title);
|
||||
if($isLibCase and $titleChanged) $this->dao->update(TABLE_CASE)->set('`title`')->eq($case->title)->where('`fromCaseID`')->eq($caseID)->exec();
|
||||
|
||||
$this->updateCase2Project($oldCase, $case, $caseID);
|
||||
|
||||
$this->executeHooks($caseID);
|
||||
|
||||
unset($oldCase->steps);
|
||||
@@ -1708,6 +1679,62 @@ class testcaseModel extends model
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Deal with the relationship between the case and project when edit the case.
|
||||
*
|
||||
* @param object $oldCase
|
||||
* @param object $case
|
||||
* @param int $caseID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function updateCase2Project($oldCase, $case, $caseID)
|
||||
{
|
||||
$productChanged = ($oldCase->product != $case->product);
|
||||
$storyChanged = ($oldCase->story != $case->story);
|
||||
|
||||
if($productChanged)
|
||||
{
|
||||
$this->dao->update(TABLE_PROJECTCASE)
|
||||
->set('product')->eq($case->product)
|
||||
->set('version')->eq($case->version)
|
||||
->where('`case`')->eq($oldCase->id)
|
||||
->exec();
|
||||
}
|
||||
|
||||
/* The related story is changed. */
|
||||
if($storyChanged)
|
||||
{
|
||||
/* If the new related story isn't linked the project, unlink the case. */
|
||||
$this->dao->delete()->from(TABLE_PROJECTCASE)
|
||||
->where('project')->eq($oldCase->project)
|
||||
->andWhere('`case`')->eq($oldCase->id)
|
||||
->exec();
|
||||
|
||||
/* If the new related story is not null, make the case link the project which link the new related story. */
|
||||
if(!empty($case->story))
|
||||
{
|
||||
$projects = $this->dao->select('*')->from(TABLE_PROJECTSTORY)->where('story')->eq($case->story)->fetchAll('project');
|
||||
if($projects)
|
||||
{
|
||||
$projects = array_keys($projects);
|
||||
foreach($projects as $projectID)
|
||||
{
|
||||
$lastOrder = (int)$this->dao->select('*')->from(TABLE_PROJECTCASE)->where('project')->eq($projectID)->orderBy('order_desc')->limit(1)->fetch('order');
|
||||
$data = new stdclass();
|
||||
$data->project = $projectID;
|
||||
$data->product = $case->product;
|
||||
$data->case = $caseID;
|
||||
$data->version = $oldCase->version;
|
||||
$data->order = ++ $lastOrder;
|
||||
$this->dao->replace(TABLE_PROJECTCASE)->data($data)->exec();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get status for different method.
|
||||
*
|
||||
|
||||
@@ -35,7 +35,7 @@ $lang->todo->cycle = "周期";
|
||||
$lang->todo->cycleConfig = "周期设置";
|
||||
$lang->todo->project = "所属项目";
|
||||
$lang->todo->product = "所属产品";
|
||||
$lang->todo->execution = "所属" . $lang->sprintCommon;
|
||||
$lang->todo->execution = "所属执行";
|
||||
|
||||
$lang->todo->reasonList['story'] = "转{$lang->SRCommon}";
|
||||
$lang->todo->reasonList['task'] = "转任务";
|
||||
|
||||
@@ -76,8 +76,8 @@ $firstDate = date('Y-m-d', strtotime($firstAction->originalDate) + 24 * 3600);
|
||||
$lastDate = substr($action->originalDate, 0, 10);
|
||||
$hasPre = $this->action->hasPreOrNext($firstDate, 'pre');
|
||||
$hasNext = $this->action->hasPreOrNext($lastDate, 'next');
|
||||
$preLink = $hasPre ? inlink('dynamic', "type=$type&userID={$user->id}&recTotal={$pager->recTotal}&date=" . strtotime($firstDate) . '&direction=pre') : 'javascript:;';
|
||||
$nextLink = $hasNext ? inlink('dynamic', "type=$type&userID={$user->id}&recTotal={$pager->recTotal}&date=" . strtotime($lastDate) . '&direction=next') : 'javascript:;';
|
||||
$preLink = $hasPre ? inlink('dynamic', "userID={$user->id}&type=$type&recTotal={$pager->recTotal}&date=" . strtotime($firstDate) . '&direction=pre') : 'javascript:;';
|
||||
$nextLink = $hasNext ? inlink('dynamic', "userID={$user->id}&type=$type&recTotal={$pager->recTotal}&date=" . strtotime($lastDate) . '&direction=next') : 'javascript:;';
|
||||
?>
|
||||
<?php if($hasPre or $hasNext):?>
|
||||
<div id="mainActions" class='main-actions'>
|
||||
|
||||
Reference in New Issue
Block a user