From a19f0d8e5485fc701e1bd256aa5ccfaad807ece2 Mon Sep 17 00:00:00 2001 From: xieqiyu Date: Fri, 13 Sep 2024 14:32:09 +0800 Subject: [PATCH] * [bug#55338] Hide epic in light on tutorial. --- module/common/lang/menu.php | 4 +- module/tutorial/config/productManage.php | 168 +++++++++++++---------- module/tutorial/model.php | 9 +- 3 files changed, 106 insertions(+), 75 deletions(-) diff --git a/module/common/lang/menu.php b/module/common/lang/menu.php index bd897c6809..521b2c364a 100644 --- a/module/common/lang/menu.php +++ b/module/common/lang/menu.php @@ -788,8 +788,8 @@ $lang->navGroup->index = 'index'; $lang->navGroup->misc = 'misc'; $lang->navGroup->upgrade = 'upgrade'; -if(empty($_SESSION['tutorialMode']) && !$config->enableER) unset($lang->product->menu->epic, $lang->product->menuOrder[10]); -if(empty($_SESSION['tutorialMode']) && !$config->URAndSR) unset($lang->product->menu->requirement, $lang->product->menuOrder[15]); +if((empty($_SESSION['tutorialMode']) || $config->systemMode == 'light') && !$config->enableER) unset($lang->product->menu->epic, $lang->product->menuOrder[10]); +if((empty($_SESSION['tutorialMode']) || $config->systemMode == 'light') && !$config->URAndSR) unset($lang->product->menu->requirement, $lang->product->menuOrder[15]); if(!helper::hasFeature('product_roadmap')) unset($lang->product->menu->roadmap, $lang->product->menuOrder[45]); if(empty($_SESSION['tutorialMode']) && !helper::hasFeature('product_track')) { diff --git a/module/tutorial/config/productManage.php b/module/tutorial/config/productManage.php index b00dc33ce1..10fb58917f 100644 --- a/module/tutorial/config/productManage.php +++ b/module/tutorial/config/productManage.php @@ -94,88 +94,116 @@ $productManage->basic->tasks['storyManage']['steps'][] = array( 'desc' => $lang->tutorial->productManage->moduleManage->step1->desc ); -$productManage->basic->tasks['storyManage']['steps'][] = array( - 'type' => 'clickNavbar', - 'target' => 'epic', - 'page' => 'product-browse', - 'url' => array('product', 'browse', 'productID=1'), - 'title' => $lang->tutorial->productManage->storyManage->step1->name, - 'desc' => $lang->tutorial->productManage->storyManage->step1->desc -); +if($config->systemMode == 'light') +{ + $productManage->basic->tasks['storyManage']['steps'][] = array( + 'type' => 'click', + 'target' => '#actionBar a.create-story-btn', + 'page' => 'product-browse', + 'url' => array('product', 'browse', 'productID=1'), + 'title' => $lang->tutorial->starter->createStory->step3->name, + 'desc' => $lang->tutorial->starter->createStory->step3->desc + ); -$productManage->basic->tasks['storyManage']['steps'][] = array( - 'type' => 'click', - 'target' => '#actionBar a.create-story-btn', - 'page' => 'product-browse', - 'url' => array('product', 'browse', 'productID=1&branch=&browseType=all¶m=0&storyType=epic'), - 'title' => $lang->tutorial->productManage->storyManage->step2->name, - 'desc' => $lang->tutorial->productManage->storyManage->step2->desc -); + $productManage->basic->tasks['storyManage']['steps'][] = array( + 'type' => 'form', + 'page' => 'story-create', + 'title' => $lang->tutorial->productManage->storyManage->step3->name + ); -$productManage->basic->tasks['storyManage']['steps'][] = array( - 'type' => 'form', - 'page' => 'story-create', - 'title' => $lang->tutorial->productManage->storyManage->step3->name -); + $productManage->basic->tasks['storyManage']['steps'][] = array( + 'type' => 'saveForm', + 'page' => 'story-create', + 'title' => $lang->tutorial->productManage->storyManage->step4->name, + 'desc' => $lang->tutorial->productManage->storyManage->step4->desc + ); +} -$productManage->basic->tasks['storyManage']['steps'][] = array( - 'type' => 'saveForm', - 'page' => 'story-create', - 'title' => $lang->tutorial->productManage->storyManage->step4->name, - 'desc' => $lang->tutorial->productManage->storyManage->step4->desc -); +if($config->systemMode != 'light') +{ + $productManage->basic->tasks['storyManage']['steps'][] = array( + 'type' => 'clickNavbar', + 'target' => 'epic', + 'page' => 'product-browse', + 'url' => array('product', 'browse', 'productID=1'), + 'title' => $lang->tutorial->productManage->storyManage->step1->name, + 'desc' => $lang->tutorial->productManage->storyManage->step1->desc + ); -$productManage->basic->tasks['storyManage']['steps'][] = array( - 'type' => 'click', - 'target' => 'div.dtable div[data-col="actions"][data-row="1"] a.batchCreateStoryBtn', - 'page' => 'product-browse', - 'url' => array('product', 'browse', 'productID=1&branch=&browseType=all¶m=0&storyType=epic'), - 'title' => $lang->tutorial->productManage->storyManage->step5->name, - 'desc' => $lang->tutorial->productManage->storyManage->step5->desc -); + $productManage->basic->tasks['storyManage']['steps'][] = array( + 'type' => 'click', + 'target' => '#actionBar a.create-story-btn', + 'page' => 'product-browse', + 'url' => array('product', 'browse', 'productID=1&branch=&browseType=all¶m=0&storyType=epic'), + 'title' => $lang->tutorial->productManage->storyManage->step2->name, + 'desc' => $lang->tutorial->productManage->storyManage->step2->desc + ); -$productManage->basic->tasks['storyManage']['steps'][] = array( - 'type' => 'form', - 'target' => 'div.panel-body div.form-batch-container', - 'page' => 'story-batchCreate', - 'title' => $lang->tutorial->productManage->storyManage->step6->name -); + $productManage->basic->tasks['storyManage']['steps'][] = array( + 'type' => 'form', + 'page' => 'story-create', + 'title' => $lang->tutorial->productManage->storyManage->step3->name + ); -$productManage->basic->tasks['storyManage']['steps'][] = array( - 'type' => 'saveForm', - 'page' => 'story-batchCreate', - 'title' => $lang->tutorial->productManage->storyManage->step7->name, - 'desc' => $lang->tutorial->productManage->storyManage->step7->desc -); + $productManage->basic->tasks['storyManage']['steps'][] = array( + 'type' => 'saveForm', + 'page' => 'story-create', + 'title' => $lang->tutorial->productManage->storyManage->step4->name, + 'desc' => $lang->tutorial->productManage->storyManage->step4->desc + ); -$productManage->basic->tasks['storyManage']['steps'][] = array( - 'type' => 'click', - 'target' => 'div.dtable div[data-col="actions"][data-row="2"] a.batchCreateStoryBtn', - 'page' => 'product-browse', - 'url' => array('product', 'browse', 'productID=1&branch=&browseType=all¶m=0&storyType=epic'), - 'title' => $lang->tutorial->productManage->storyManage->step8->name, - 'desc' => $lang->tutorial->productManage->storyManage->step8->desc -); + $productManage->basic->tasks['storyManage']['steps'][] = array( + 'type' => 'click', + 'target' => 'div.dtable div[data-col="actions"][data-row="1"] a.batchCreateStoryBtn', + 'page' => 'product-browse', + 'url' => array('product', 'browse', 'productID=1&branch=&browseType=all¶m=0&storyType=epic'), + 'title' => $lang->tutorial->productManage->storyManage->step5->name, + 'desc' => $lang->tutorial->productManage->storyManage->step5->desc + ); -$productManage->basic->tasks['storyManage']['steps'][] = array( - 'type' => 'form', - 'target' => 'div.panel-body div.form-batch-container', - 'page' => 'story-batchCreate', - 'title' => $lang->tutorial->productManage->storyManage->step9->name -); + $productManage->basic->tasks['storyManage']['steps'][] = array( + 'type' => 'form', + 'target' => 'div.panel-body div.form-batch-container', + 'page' => 'story-batchCreate', + 'title' => $lang->tutorial->productManage->storyManage->step6->name + ); -$productManage->basic->tasks['storyManage']['steps'][] = array( - 'type' => 'saveForm', - 'page' => 'story-batchCreate', - 'title' => $lang->tutorial->productManage->storyManage->step10->name, - 'desc' => $lang->tutorial->productManage->storyManage->step10->desc -); + $productManage->basic->tasks['storyManage']['steps'][] = array( + 'type' => 'saveForm', + 'page' => 'story-batchCreate', + 'title' => $lang->tutorial->productManage->storyManage->step7->name, + 'desc' => $lang->tutorial->productManage->storyManage->step7->desc + ); + + $productManage->basic->tasks['storyManage']['steps'][] = array( + 'type' => 'click', + 'target' => 'div.dtable div[data-col="actions"][data-row="2"] a.batchCreateStoryBtn', + 'page' => 'product-browse', + 'url' => array('product', 'browse', 'productID=1&branch=&browseType=all¶m=0&storyType=epic'), + 'title' => $lang->tutorial->productManage->storyManage->step8->name, + 'desc' => $lang->tutorial->productManage->storyManage->step8->desc + ); + + $productManage->basic->tasks['storyManage']['steps'][] = array( + 'type' => 'form', + 'target' => 'div.panel-body div.form-batch-container', + 'page' => 'story-batchCreate', + 'title' => $lang->tutorial->productManage->storyManage->step9->name + ); + + $productManage->basic->tasks['storyManage']['steps'][] = array( + 'type' => 'saveForm', + 'page' => 'story-batchCreate', + 'title' => $lang->tutorial->productManage->storyManage->step10->name, + 'desc' => $lang->tutorial->productManage->storyManage->step10->desc + ); +} $productManage->basic->tasks['storyManage']['steps'][] = array( 'type' => 'click', 'target' => 'div.dtable div[data-col="actions"][data-row="4"] a.story-review-btn', 'page' => 'product-browse', - 'url' => array('product', 'browse', 'productID=1&branch=&browseType=all¶m=0&storyType=epic'), + 'url' => $config->systemMode == 'light' ? array('product', 'browse', 'productID=1') : array('product', 'browse', 'productID=1&branch=&browseType=all¶m=0&storyType=epic'), 'title' => $lang->tutorial->productManage->storyManage->step11->name, 'desc' => $lang->tutorial->productManage->storyManage->step11->desc ); @@ -279,7 +307,7 @@ $productManage->basic->tasks['planManage']['steps'][] = array( $productManage->basic->tasks['planManage']['steps'][] = array( 'type' => 'selectRow', - 'target' => 'div.dtable div[data-col="id"][data-row="2"]', + 'target' => 'div.dtable div[data-col="id"][data-row="4"]', 'page' => 'productplan-view', 'title' => $lang->tutorial->productManage->planManage->step7->name ); @@ -379,7 +407,7 @@ $productManage->basic->tasks['releaseManage']['steps'][] = array( $productManage->basic->tasks['releaseManage']['steps'][] = array( 'type' => 'selectRow', - 'target' => 'div.dtable div[data-col="id"][data-row="1"]', + 'target' => 'div.dtable div[data-col="id"][data-row="4"]', 'page' => 'release-view', 'title' => $lang->tutorial->productManage->releaseManage->step7->name ); diff --git a/module/tutorial/model.php b/module/tutorial/model.php index f43e487b26..996de1a6fd 100644 --- a/module/tutorial/model.php +++ b/module/tutorial/model.php @@ -507,8 +507,11 @@ class tutorialModel extends model $reviewingStory->path = ',1,2,4,'; $stories = array(); - $stories[1] = $this->getEpic(); - $stories[2] = $this->getRequirement(); + if($this->app->config->systemMode != 'light') + { + $stories[1] = $this->getEpic(); + $stories[2] = $this->getRequirement(); + } if($this->app->config->vision == 'rnd') { $stories[3] = $activeStory; @@ -702,7 +705,7 @@ class tutorialModel extends model public function getExecutionStoryPairs(): array { $stories = $this->getStories(); - $story = $stories[2]; + $story = $stories[3]; return array($story->id => $story->title); }