* finish task #70199.

This commit is contained in:
wangyidong
2022-09-26 17:28:15 +08:00
parent 70c347f3af
commit 6e6ecb4f6a
4 changed files with 12 additions and 5 deletions
+2
View File
@@ -111,6 +111,7 @@ class baseHTML
if(strlen(trim($title)) == 0) $title = $href;
$newline = $newline ? "\n" : '';
/* Make sure href is opened in the same tab. */
if(strpos($misc, 'data-app=') === false)
{
global $app, $lang;
@@ -509,6 +510,7 @@ class baseHTML
$gobackList = isset($_COOKIE['goback']) ? json_decode($_COOKIE['goback'], true) : array();
$gobackLink = isset($gobackList[$tab]) ? $gobackList[$tab] : '';
/* Make sure href is opened in the same tab. */
if(strpos($misc, 'data-app=') === false)
{
$module = $app->rawModule;
+9 -2
View File
@@ -299,7 +299,6 @@ class executionModel extends model
*/
public function create($copyExecutionID = '')
{
$type = 'sprint';
$this->lang->execution->team = $this->lang->execution->teamname;
if(empty($_POST['project']))
@@ -4949,9 +4948,10 @@ class executionModel extends model
public function createDefaultSprint($projectID)
{
$project = $this->dao->select('*')->from(TABLE_PROJECT)->where('id')->eq($projectID)->fetch();
$post = $_POST;
$_POST = array();
$_POST['project'] = $projectID;
$_POST['parent'] = $projectID;
$_POST['name'] = $project->name;
$_POST['code'] = $project->code;
$_POST['begin'] = $project->begin;
@@ -4969,6 +4969,13 @@ class executionModel extends model
$_POST['noSprint'] = 1;
$executionID = $this->create();
if($project->model == 'kanban')
{
$execution = $this->getById($executionID);
$this->loadModel('kanban')->createRDKanban($execution);
}
$_POST = $post;
return $executionID;
}
-2
View File
@@ -58,13 +58,11 @@
</div>
<form class='form-indicator main-form form-ajax' method='post' target='hiddenwin' id='dataform'>
<table class='table table-form'>
<?php if($config->systemMode == 'new'):?>
<tr>
<th class='w-120px'><?php echo $lang->execution->projectName;?></th>
<td class="col-main"><?php echo html::select("project", $allProjects, $projectID, "class='form-control chosen' required onchange='refreshPage(this.value)'");?></td>
<td colspan='2'></td>
</tr>
<?php endif;?>
<tr>
<th class='w-120px'><?php echo $showExecutionExec ? $lang->execution->execName : $lang->execution->name;?></th>
<td class="col-main"><?php echo html::input('name', $name, "class='form-control' required");?></td>
+1 -1
View File
@@ -509,7 +509,6 @@ class task extends control
/* Set menu. */
$this->execution->setMenu($this->view->execution->id);
if($this->app->tab == 'project') $this->loadModel('project')->setMenu($this->session->project);
$this->view->position[] = html::a($this->createLink('execution', 'browse', "execution={$this->view->task->execution}"), $this->view->execution->name);
}
@@ -920,6 +919,7 @@ class task extends control
$this->session->set('executionList', $this->app->getURI(true), 'execution');
$this->commonAction($taskID);
if($this->app->tab == 'project') $this->loadModel('project')->setMenu($this->session->project);
$taskID = (int)$taskID;
$task = $this->task->getById($taskID, true);