* Finsish task #5379,#5385,#5389,#5393,#5403,5409

This commit is contained in:
yfl
2019-04-24 15:59:56 +08:00
parent 49a0969c0e
commit d35eb8dfaf
8 changed files with 27 additions and 4 deletions
+1
View File
@@ -45,3 +45,4 @@
.title-group #severity + .chosen-container > .chosen-single {border-radius: 0!important;}
.title-group #pri + .chosen-container > .chosen-single {border-top-left-radius: 0!important; border-bottom-left-radius: 0!important;}
.title-group .has-icon-right{min-width:700px}
#dataform .chosen[name ^= "os"] + .chosen-container .chosen-drop{min-width: 200px}
-1
View File
@@ -41,7 +41,6 @@ $lang->misc->zentao->support['ask'] = "官方问答";
$lang->misc->zentao->support['video'] = "使用视频";
$lang->misc->zentao->support['qqgroup'] = "官方QQ群";
$lang->misc->zentao->cowin['donate'] = "捐助我们";
$lang->misc->zentao->cowin['reportbug'] = "汇报Bug";
$lang->misc->zentao->cowin['feedback'] = "反馈需求";
$lang->misc->zentao->cowin['recommend'] = "推荐给朋友";
+1 -1
View File
@@ -610,7 +610,7 @@ class projectModel extends model
$tasks = $this->dao->select('id,estStarted,deadline,status')->from(TABLE_TASK)
->where('deadline')->ne('0000-00-00')
->andWhere('status')->in('wait,doing')
->andWhere('project')->eq($project->id)
->andWhere('project')->eq($projectID)
->fetchAll();
foreach($tasks as $task)
{
+5
View File
@@ -5,4 +5,9 @@ $(function()
link = createLink('story', 'create', 'productID=' + productID + "&branch=" + branch + '&moduleID=' + moduleID);
$('#modulemenu ul.nav li.right:first').before("<li class='right'><a href='" + link + "'><i class='icon-story-create icon-plus'></i> " + createStory + "</a></li>");
}
if(isonlybody)
{
$('.main-actions').css('width', '100%')
}
});
+2 -1
View File
@@ -14,6 +14,7 @@
<?php include '../../common/view/kindeditor.html.php';?>
<?php $browseLink = $app->session->storyList != false ? $app->session->storyList : $this->createLink('product', 'browse', "productID=$story->product&branch=$story->branch&moduleID=$story->module");?>
<?php js::set('sysurl', common::getSysUrl());?>
<?php js::set('isonlybody', isonlybody());?>
<div id="mainMenu" class="clearfix">
<div class="btn-toolbar pull-left">
<?php if(!isonlybody()):?>
@@ -105,7 +106,7 @@
echo "<div class='divider'></div>";
common::printIcon('story', 'edit', "storyID=$story->id", $story);
common::printIcon('story', 'create', "productID=$story->product&branch=$story->branch&moduleID=$story->module&storyID=$story->id", $story, 'button', 'copy', '', 'iframe showinonlybody', true, "data-width='1050'");
common::printIcon('story', 'create', "productID=$story->product&branch=$story->branch&moduleID=$story->module&storyID=$story->id", $story, 'button', 'copy', '', '', true, "data-width='1050'");
common::printIcon('story', 'delete', "storyID=$story->id", $story, 'button', 'trash', 'hiddenwin');
?>
<?php endif;?>
+5
View File
@@ -274,3 +274,8 @@ $lang->task->report->tasksPerClosedReason->graph->xAxisName = '关闭原因';
$lang->task->report->finishedTasksPerDay->type = 'bar';
$lang->task->report->finishedTasksPerDay->graph->xAxisName = '日期';
$lang->task->action = new stdclass();
$lang->task->action->batchcreate = array('main' => '$date, 由 <strong>$actor</strong> 创建子任务 。');
$lang->task->action->unlink = array('main' => '$date, 由 <strong>$actor</strong> 取消关联父任务 。');
$lang->task->action->linkto = array('main' => '$date, 由 <strong>$actor</strong> 关联到父任务 。');
+12
View File
@@ -289,6 +289,8 @@ class taskModel extends model
if($task->estimate) $task->estimate = (float)$task->estimate;
}
$childTasks = null;
foreach($data as $i => $task)
{
$this->dao->insert(TABLE_TASK)->data($task)
@@ -300,6 +302,7 @@ class taskModel extends model
if(dao::isError()) die(js::error(dao::getError()));
$taskID = $this->dao->lastInsertID();
$childTasks .= html::a(helper::createLink('task', 'view', 'taskID=' . $taskID), $task->name, '', "title='$task->name' class='text-ellipsis w-p10'") . ',';
if($story) $this->story->setStage($task->story);
$actionID = $this->action->create('task', $taskID, 'Opened', '');
if(!dao::isError()) $this->loadModel('score')->create('task', 'create', $taskID);
@@ -315,6 +318,7 @@ class taskModel extends model
$this->updateParentStatus($taskID);
$this->computeBeginAndEnd($parentID);
$this->dao->update(TABLE_TASK)->set('parent')->eq(-1)->where('id')->eq($parentID)->exec();
$this->action->create('task', $parentID, 'batchCreate', $childTasks);
}
return $mails;
}
@@ -673,6 +677,14 @@ class taskModel extends model
$this->dao->update(TABLE_TASK)->set('project')->eq($task->project)->set('module')->eq($task->module)->where('parent')->eq($taskID)->exec();
}
if(isset($task->parent) and $task->parent != $oldTask->parent)
{
$comment = html::a(helper::createLink('task', 'view', 'taskID=' . $taskID), $task->name);
$this->loadModel('action')->create('task', $task->parent, 'linkTo', $comment);
$this->loadModel('action')->create('task', $oldTask->parent, 'unLink', $comment);
}
$task = $this->loadModel('file')->processImgURL($task, $this->config->task->editor->edit['id'], $this->post->uid);
$teams = array();
+1 -1
View File
@@ -167,7 +167,7 @@
common::printIcon('task', 'edit', "taskID=$task->id", $task, 'button', '', '', 'showinonlybody');
common::printIcon('task', 'create', "productID=0&storyID=0&moduleID=0&taskID=$task->id", $task, 'button', 'copy');
common::printIcon('task', 'delete', "projectID=$task->project&taskID=$task->id", $task, 'button', 'trash', 'hiddenwin');
if($task->parent <= 0) common::printIcon('task', 'batchCreate', "project=$task->project&storyID=$task->story&moduleID=$task->module&taskID=$task->id&ifame=0", $task, 'list', 'treemap-alt', '', '', '', '', $this->lang->task->children);
if($task->parent > 0) echo html::a(helper::createLink('task', 'view', "taskID=$task->parent"), "<i class='icon icon-chevron-double-up'></i>", '', "class='btn btn-link' title='{$lang->task->parent}'");
?>
<?php endif;?>