From 178ea59c4eef53523fb79bb2744e84718705daaf Mon Sep 17 00:00:00 2001 From: zhouxudong Date: Wed, 20 Jul 2022 02:30:19 +0000 Subject: [PATCH 1/5] * Finish task #61441. --- module/task/config.php | 2 +- module/task/control.php | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/module/task/config.php b/module/task/config.php index 7b488a6f5b..5b5d8f08cf 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, fromBug, story, 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..69e134dd5c 100755 --- a/module/task/control.php +++ b/module/task/control.php @@ -2203,6 +2203,9 @@ class task extends control /* fill some field with useful value. */ $task->story = isset($relatedStories[$task->story]) ? $relatedStories[$task->story] . "(#$task->story)" : ''; + $bug = $this->loadModel('bug')->getByID($task->fromBug); + $task->fromBug = empty($task->fromBug) ? '0' : "#$task->fromBug " . $bug->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]; From 8e46671c2005f49721ac6770cada5ca86a20ccc3 Mon Sep 17 00:00:00 2001 From: zhouxudong Date: Wed, 20 Jul 2022 03:07:38 +0000 Subject: [PATCH 2/5] * Finish task #61441. --- module/task/config.php | 2 +- module/task/control.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/module/task/config.php b/module/task/config.php index 5b5d8f08cf..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, fromBug, 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 69e134dd5c..7baf3989a6 100755 --- a/module/task/control.php +++ b/module/task/control.php @@ -2204,7 +2204,7 @@ class task extends control $task->story = isset($relatedStories[$task->story]) ? $relatedStories[$task->story] . "(#$task->story)" : ''; $bug = $this->loadModel('bug')->getByID($task->fromBug); - $task->fromBug = empty($task->fromBug) ? '0' : "#$task->fromBug " . $bug->title; + $task->fromBug = empty($task->fromBug) ? '' : "#$task->fromBug " . $bug->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]; From c637a40725908f0cde7e9dd429f154be342c06ef Mon Sep 17 00:00:00 2001 From: zhouxudong Date: Wed, 20 Jul 2022 06:56:14 +0000 Subject: [PATCH 3/5] * Finish task #61441. --- module/task/control.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/module/task/control.php b/module/task/control.php index 7baf3989a6..5bb8603d7d 100755 --- a/module/task/control.php +++ b/module/task/control.php @@ -2190,6 +2190,8 @@ class task extends control } } + foreach($tasks as $task) $relatedBugIdList[$task->fromBug] = $task->fromBug; + $bugs = $this->loadModel('bug')->getByList($relatedBugIdList); foreach($tasks as $task) { if($this->post->fileType == 'csv') @@ -2203,8 +2205,7 @@ class task extends control /* fill some field with useful value. */ $task->story = isset($relatedStories[$task->story]) ? $relatedStories[$task->story] . "(#$task->story)" : ''; - $bug = $this->loadModel('bug')->getByID($task->fromBug); - $task->fromBug = empty($task->fromBug) ? '' : "#$task->fromBug " . $bug->title; + $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]; From 1c4c282aee3f6bf58be0ec9951c497a1fe06aaf2 Mon Sep 17 00:00:00 2001 From: zhouxudong Date: Thu, 21 Jul 2022 01:29:57 +0000 Subject: [PATCH 4/5] * Finish task #61441. --- module/execution/js/importbug.js | 4 ++++ module/execution/view/taskkanban.html.php | 2 +- module/task/control.php | 6 +++++- 3 files changed, 10 insertions(+), 2 deletions(-) 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/control.php b/module/task/control.php index 5bb8603d7d..a932d42d11 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) From 9d5f8914194dc7877c6313871555b6e45916d1fb Mon Sep 17 00:00:00 2001 From: zhouxudong Date: Thu, 21 Jul 2022 01:40:43 +0000 Subject: [PATCH 5/5] * Finish task #61441. --- module/task/control.php | 1 - 1 file changed, 1 deletion(-) diff --git a/module/task/control.php b/module/task/control.php index a932d42d11..0e533ec3bc 100755 --- a/module/task/control.php +++ b/module/task/control.php @@ -2194,7 +2194,6 @@ class task extends control } } - foreach($tasks as $task) $relatedBugIdList[$task->fromBug] = $task->fromBug; $bugs = $this->loadModel('bug')->getByList($relatedBugIdList); foreach($tasks as $task) {