diff --git a/module/execution/js/importbug.js b/module/execution/js/importbug.js index 0c1643303f..9464587e8b 100644 --- a/module/execution/js/importbug.js +++ b/module/execution/js/importbug.js @@ -23,5 +23,9 @@ function goback(executionID) kanbanData = $.parseJSON(data); parent.updateKanban(kanbanData); } + else + { + parent.location.reload(); + } }); } diff --git a/module/execution/view/taskkanban.html.php b/module/execution/view/taskkanban.html.php index fffb0e79c6..a753841850 100644 --- a/module/execution/view/taskkanban.html.php +++ b/module/execution/view/taskkanban.html.php @@ -113,7 +113,7 @@ echo $batchCreateBugLink; }?> ';?> - ' . html::a(helper::createLink('execution', 'importBug', "execution=$execution->id", '', true), $lang->execution->importBug, '', "class='iframe'") . '';?> + ' . html::a(helper::createLink('execution', 'importBug', "execution=$execution->id", '', true), $lang->execution->importBug, '', "class='iframe' data-width='90%'") . '';?> ' . html::a(helper::createLink('task', 'create', "execution=$execution->id", '', true), $lang->task->create, '', "class='iframe'") . '';?> ' . html::a(helper::createLink('task', 'batchCreate', "execution=$execution->id", '', true), $lang->execution->batchCreateTask, '', "class='iframe' data-width=90%") . '';?> diff --git a/module/task/config.php b/module/task/config.php index 7b488a6f5b..611a34e32c 100644 --- a/module/task/config.php +++ b/module/task/config.php @@ -28,7 +28,7 @@ $config->task->editor->pause = array('id' => 'comment', 'tools' => 'simpleToo $config->task->removeFields = 'objectTypeList,productList,executionList,gitlabID,gitlabProjectID,product'; $config->task->exportFields = ' - id, execution, module, story, + id, execution, module, story, fromBug, name, desc, type, pri,estStarted, realStarted, deadline, status,estimate, consumed, left, mailto, progress, mode, diff --git a/module/task/control.php b/module/task/control.php index 8bd42239c2..0e533ec3bc 100755 --- a/module/task/control.php +++ b/module/task/control.php @@ -2083,7 +2083,11 @@ class task extends control /* Get related objects id lists. */ $relatedStoryIdList = array(); - foreach($tasks as $task) $relatedStoryIdList[$task->story] = $task->story; + foreach($tasks as $task) + { + $relatedStoryIdList[$task->story] = $task->story; + $relatedBugIdList[$task->fromBug] = $task->fromBug; + } /* Get team for multiple task. */ $taskTeam = $this->dao->select('*')->from(TABLE_TEAM) @@ -2190,6 +2194,7 @@ class task extends control } } + $bugs = $this->loadModel('bug')->getByList($relatedBugIdList); foreach($tasks as $task) { if($this->post->fileType == 'csv') @@ -2203,6 +2208,8 @@ class task extends control /* fill some field with useful value. */ $task->story = isset($relatedStories[$task->story]) ? $relatedStories[$task->story] . "(#$task->story)" : ''; + $task->fromBug = empty($task->fromBug) ? '' : "#$task->fromBug " . $bugs[$task->fromBug]->title; + if(isset($executions[$task->execution])) $task->execution = $executions[$task->execution] . "(#$task->execution)"; if(isset($taskLang->typeList[$task->type])) $task->type = $taskLang->typeList[$task->type]; if(isset($taskLang->priList[$task->pri])) $task->pri = $taskLang->priList[$task->pri];