From ada5aaec7152512f59806a2fc5282044734bf7c4 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Tue, 19 Dec 2023 19:38:04 +0800 Subject: [PATCH] * Fix bug #41917. --- module/execution/ui/task.html.php | 4 ++-- module/story/config/dtable.php | 5 +++-- module/story/control.php | 2 ++ module/task/config.php | 27 +++++++++++++++------------ module/task/config/dtable.php | 1 + module/task/zen.php | 8 ++++++-- 6 files changed, 29 insertions(+), 18 deletions(-) diff --git a/module/execution/ui/task.html.php b/module/execution/ui/task.html.php index 955c710506..9a83cd49c3 100644 --- a/module/execution/ui/task.html.php +++ b/module/execution/ui/task.html.php @@ -31,8 +31,8 @@ $importItems = array(); if(common::canModify('execution', $execution)) { $params = isset($moduleID) ? "&storyID=0&moduleID=$moduleID" : ""; - $batchCreateLink = $this->createLink('task', 'batchCreate', "executionID={$execution->id}{$params}"); - $createLink = $this->createLink('task', 'create', "executionID={$execution->id}{$params}"); + $batchCreateLink = $this->createLink('task', 'batchCreate', "executionID={$execution->id}{$params}") . ($app->tab == 'project' ? '#app=project' : ''); + $createLink = $this->createLink('task', 'create', "executionID={$execution->id}{$params}") . ($app->tab == 'project' ? '#app=project' : ''); if(commonModel::isTutorialMode()) { $wizardParams = helper::safe64Encode("executionID={$execution->id}{$params}"); diff --git a/module/story/config/dtable.php b/module/story/config/dtable.php index 6248dbe5b3..25ab8c3a3f 100644 --- a/module/story/config/dtable.php +++ b/module/story/config/dtable.php @@ -278,8 +278,9 @@ $config->story->dtable->fieldList['actions']['actionsMap']['close']['hint'] = $l $config->story->dtable->fieldList['actions']['actionsMap']['activate']['icon'] = 'active'; $config->story->dtable->fieldList['actions']['actionsMap']['activate']['hint'] = $lang->story->operateList['activated']; -$config->story->dtable->fieldList['actions']['actionsMap']['change']['icon'] = 'change'; -$config->story->dtable->fieldList['actions']['actionsMap']['change']['hint'] = $lang->story->operateList['changed']; +$config->story->dtable->fieldList['actions']['actionsMap']['change']['icon'] = 'change'; +$config->story->dtable->fieldList['actions']['actionsMap']['change']['hint'] = $lang->story->operateList['changed']; +$config->story->dtable->fieldList['actions']['actionsMap']['change']['data-app'] = $app->tab; $config->story->dtable->fieldList['actions']['actionsMap']['review']['icon'] = 'search'; $config->story->dtable->fieldList['actions']['actionsMap']['review']['hint'] = $lang->story->operateList['reviewed']; diff --git a/module/story/control.php b/module/story/control.php index c7d0bb120e..6cb464e580 100755 --- a/module/story/control.php +++ b/module/story/control.php @@ -221,11 +221,13 @@ class story extends control { if(empty($projectID)) $projectID = $this->session->project; $this->loadModel('project')->setMenu($projectID); + $this->view->projectID = $projectID; } elseif($this->app->tab == 'execution') { if(empty($projectID)) $projectID = $this->session->execution; $this->loadModel('execution')->setMenu($projectID); + $this->view->executionID = $projectID; } elseif($this->app->tab == 'qa') { diff --git a/module/task/config.php b/module/task/config.php index 77169229c2..c7be8b097d 100644 --- a/module/task/config.php +++ b/module/task/config.php @@ -126,23 +126,26 @@ $config->task->actionList['recordWorkhour']['text'] = $lang->task->record $config->task->actionList['recordWorkhour']['url'] = helper::createLink('task', 'recordWorkhour', 'taskID={id}'); $config->task->actionList['recordWorkhour']['data-toggle'] = 'modal'; -$config->task->actionList['edit']['icon'] = 'edit'; -$config->task->actionList['edit']['hint'] = $lang->task->edit; -$config->task->actionList['edit']['text'] = $lang->task->edit; -$config->task->actionList['edit']['url'] = helper::createLink('task', 'edit', 'taskID={id}'); +$config->task->actionList['edit']['icon'] = 'edit'; +$config->task->actionList['edit']['hint'] = $lang->task->edit; +$config->task->actionList['edit']['text'] = $lang->task->edit; +$config->task->actionList['edit']['url'] = helper::createLink('task', 'edit', 'taskID={id}'); +$config->task->actionList['edit']['data-app'] = $app->tab; if($config->vision != 'lite') { - $config->task->actionList['batchCreate']['icon'] = 'split'; - $config->task->actionList['batchCreate']['hint'] = $lang->task->batchCreate; - $config->task->actionList['batchCreate']['text'] = $lang->task->batchCreate; - $config->task->actionList['batchCreate']['url'] = helper::createLink('task', 'batchCreate', 'execution={execution}&storyID={story}&moduleID={module}&taskID={id}'); + $config->task->actionList['batchCreate']['icon'] = 'split'; + $config->task->actionList['batchCreate']['hint'] = $lang->task->batchCreate; + $config->task->actionList['batchCreate']['text'] = $lang->task->batchCreate; + $config->task->actionList['batchCreate']['url'] = helper::createLink('task', 'batchCreate', 'execution={execution}&storyID={story}&moduleID={module}&taskID={id}'); + $config->task->actionList['batchCreate']['data-app'] = $app->tab; } -$config->task->actionList['create']['icon'] = 'copy'; -$config->task->actionList['create']['hint'] = $lang->task->children; -$config->task->actionList['create']['text'] = $lang->task->children; -$config->task->actionList['create']['url'] = helper::createLink('task', 'create', 'projctID={execution}&storyID=0&moduleID=0&taskID={id}'); +$config->task->actionList['create']['icon'] = 'copy'; +$config->task->actionList['create']['hint'] = $lang->task->children; +$config->task->actionList['create']['text'] = $lang->task->children; +$config->task->actionList['create']['url'] = helper::createLink('task', 'create', 'projctID={execution}&storyID=0&moduleID=0&taskID={id}'); +$config->task->actionList['create']['data-app'] = $app->tab; $config->task->actionList['delete']['icon'] = 'trash'; $config->task->actionList['delete']['hint'] = $lang->task->delete; diff --git a/module/task/config/dtable.php b/module/task/config/dtable.php index 26b6519e73..961ad29a40 100644 --- a/module/task/config/dtable.php +++ b/module/task/config/dtable.php @@ -15,6 +15,7 @@ $config->task->dtable->fieldList['name']['sortType'] = true; $config->task->dtable->fieldList['name']['link'] = array('url' => array('module' => 'task', 'method' => 'view', 'params' => 'taskID={id}'), 'className' => 'text-inherit', 'style' => array('color' => 'var(--color-link)')); $config->task->dtable->fieldList['name']['required'] = true; $config->task->dtable->fieldList['name']['styleMap'] = array('--color-link' => 'color'); +$config->task->dtable->fieldList['name']['data-app'] = $app->tab; $config->task->dtable->fieldList['pri']['title'] = $lang->priAB; $config->task->dtable->fieldList['pri']['type'] = 'pri'; diff --git a/module/task/zen.php b/module/task/zen.php index 4cdc76f827..1966ab1a75 100644 --- a/module/task/zen.php +++ b/module/task/zen.php @@ -876,7 +876,7 @@ class taskZen extends task $this->view->actions = $this->loadModel('action')->getList('task', $taskID); /* Set menu. */ - $this->execution->setMenu($this->view->execution->id); + $this->setMenu($this->view->execution->id); } /** @@ -1868,7 +1868,11 @@ class taskZen extends task /* Set Menu. */ $this->execution->setMenu($executionID); - if($this->app->tab == 'project') $this->project->setMenu($execution->project); + if($this->app->tab == 'project') + { + $this->project->setMenu($execution->project); + $this->view->projectID = $execution->project; + } return $executionID; }