diff --git a/module/bug/model.php b/module/bug/model.php index d5150d882d..7f724d9aa6 100644 --- a/module/bug/model.php +++ b/module/bug/model.php @@ -125,6 +125,8 @@ class bugModel extends model */ public function getPlanBugs(int $planID, string $status = 'all', string $orderBy = 'id_desc', object $pager = null): array { + if(common::isTutorialMode()) return array(); + if(strpos($orderBy, 'pri_') !== false) $orderBy = str_replace('pri_', 'priOrder_', $orderBy); $bugs = $this->dao->select("*, IF(`pri` = 0, {$this->config->maxPriValue}, `pri`) AS priOrder")->from(TABLE_BUG) @@ -214,6 +216,8 @@ class bugModel extends model */ public function getActiveBugs(array|int $products, int|string $branch, string $executions, array $excludeBugs, object $pager = null, string $orderBy = 'id desc'): array { + if(common::isTutorialMode()) return $this->loadModel('tutorial')->getBugs(); + return $this->dao->select('*')->from(TABLE_BUG) ->where('status')->eq('active') ->andWhere('toStory')->eq(0) diff --git a/module/release/ui/view.html.php b/module/release/ui/view.html.php index 78afeb28df..07606e63dc 100644 --- a/module/release/ui/view.html.php +++ b/module/release/ui/view.html.php @@ -167,7 +167,7 @@ if($canBeChanged) set::icon('link'), set::type('primary'), set::className('linkStory-btn'), - bind::click("window.showLink('story')") + bind::click('window.showLink', array('params' => array('story'))) ); } @@ -179,7 +179,7 @@ if($canBeChanged) set::icon('bug'), set::type('primary'), set::className('linkBug-btn'), - bind::click("window.showLink('bug')") + bind::click('window.showLink', array('params' => array('bug'))) ); $linkLeftBtn = btn @@ -188,7 +188,7 @@ if($canBeChanged) set::icon('bug'), set::type('primary'), set::className('leftBug-btn'), - bind::click("window.showLink('leftBug')") + bind::click('window.showLink', array('params' => array('leftBug'))) ); } } diff --git a/module/story/model.php b/module/story/model.php index d48e776f8a..9e5d5fbc54 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -419,6 +419,8 @@ class storyModel extends model */ public function getPlanStories(int $planID, string $status = 'all', string $orderBy = 'id_desc', object|null $pager = null): array { + if(common::isTutorialMode()) return array(); + if(strpos($orderBy, 'module') !== false) { $orderBy = (strpos($orderBy, 'module_asc') !== false) ? 't3.path asc' : 't3.path desc'; diff --git a/module/tutorial/config/productManage.php b/module/tutorial/config/productManage.php index 74501cc612..017268b798 100644 --- a/module/tutorial/config/productManage.php +++ b/module/tutorial/config/productManage.php @@ -284,7 +284,7 @@ $productManage->tasks['planManage']['steps'][] = array( $productManage->tasks['planManage']['steps'][] = array( 'type' => 'click', - 'target' => '#stories button.linkBug-btn', + 'target' => '#bugs button.linkBug-btn', 'page' => 'productplan-view', 'url' => array('productplan', 'view', 'planID=1&type=bug'), 'title' => $lang->tutorial->productManage->planManage->step10->name, @@ -295,7 +295,6 @@ $productManage->tasks['planManage']['steps'][] = array( 'type' => 'selectRow', 'target' => 'div.dtable div[data-col="id"][data-row="1"]', 'page' => 'productplan-view', - 'url' => array('productplan', 'view', 'planID=1&type=bug'), 'title' => $lang->tutorial->productManage->planManage->step11->name ); @@ -303,7 +302,6 @@ $productManage->tasks['planManage']['steps'][] = array( 'type' => 'click', 'target' => 'div.dtable-footer button.linkObjectBtn', 'page' => 'productplan-view', - 'url' => array('productplan', 'view', 'planID=1&type=bug'), 'title' => $lang->tutorial->productManage->planManage->step12->name, 'desc' => $lang->tutorial->productManage->planManage->step12->desc ); @@ -378,9 +376,8 @@ $productManage->tasks['releaseManage']['steps'][] = array( $productManage->tasks['releaseManage']['steps'][] = array( 'type' => 'click', - 'target' => 'div[data-key="resolvedBug"] a', + 'target' => 'li[data-key="resolvedBug"] a', 'page' => 'release-view', - 'url' => array('release', 'view', 'releaseID=1&type=bug'), 'title' => $lang->tutorial->productManage->releaseManage->step9->name, 'desc' => $lang->tutorial->productManage->releaseManage->step9->desc ); @@ -389,7 +386,6 @@ $productManage->tasks['releaseManage']['steps'][] = array( 'type' => 'click', 'target' => '#resolvedBug button.linkBug-btn', 'page' => 'release-view', - 'url' => array('release', 'view', 'releaseID=1&type=bug'), 'title' => $lang->tutorial->productManage->releaseManage->step10->name, 'desc' => $lang->tutorial->productManage->releaseManage->step10->desc ); @@ -398,7 +394,6 @@ $productManage->tasks['releaseManage']['steps'][] = array( 'type' => 'selectRow', 'target' => 'div.dtable div[data-col="id"][data-row="1"]', 'page' => 'release-view', - 'url' => array('release', 'view', 'releaseID=1&type=bug'), 'title' => $lang->tutorial->productManage->releaseManage->step11->name ); @@ -406,16 +401,14 @@ $productManage->tasks['releaseManage']['steps'][] = array( 'type' => 'click', 'target' => 'div.dtable-footer button.linkObjectBtn', 'page' => 'release-view', - 'url' => array('release', 'view', 'releaseID=1&type=bug'), 'title' => $lang->tutorial->productManage->releaseManage->step12->name, 'desc' => $lang->tutorial->productManage->releaseManage->step12->desc ); $productManage->tasks['releaseManage']['steps'][] = array( 'type' => 'click', - 'target' => 'div[data-key="leftBug"] a', + 'target' => 'li[data-key="leftBug"] a', 'page' => 'release-view', - 'url' => array('release', 'view', 'releaseID=1&type=leftBug'), 'title' => $lang->tutorial->productManage->releaseManage->step13->name, 'desc' => $lang->tutorial->productManage->releaseManage->step13->desc ); @@ -424,7 +417,6 @@ $productManage->tasks['releaseManage']['steps'][] = array( 'type' => 'click', 'target' => '#leftBug button.leftBug-btn', 'page' => 'release-view', - 'url' => array('release', 'view', 'releaseID=1&type=leftBug'), 'title' => $lang->tutorial->productManage->releaseManage->step14->name, 'desc' => $lang->tutorial->productManage->releaseManage->step14->desc ); @@ -433,7 +425,6 @@ $productManage->tasks['releaseManage']['steps'][] = array( 'type' => 'selectRow', 'target' => 'div.dtable div[data-col="id"][data-row="1"]', 'page' => 'release-view', - 'url' => array('release', 'view', 'releaseID=1&type=leftBug'), 'title' => $lang->tutorial->productManage->releaseManage->step15->name ); @@ -441,7 +432,6 @@ $productManage->tasks['releaseManage']['steps'][] = array( 'type' => 'click', 'target' => 'div.dtable-footer button.linkObjectBtn', 'page' => 'release-view', - 'url' => array('release', 'view', 'releaseID=1&type=leftBug'), 'title' => $lang->tutorial->productManage->releaseManage->step16->name, 'desc' => $lang->tutorial->productManage->releaseManage->step16->desc ); @@ -450,7 +440,6 @@ $productManage->tasks['releaseManage']['steps'][] = array( 'type' => 'click', 'target' => 'div.detail-header a.publish-btn', 'page' => 'release-view', - 'url' => array('release', 'view', 'releaseID=1&type=leftBug'), 'title' => $lang->tutorial->productManage->releaseManage->step17->name, 'desc' => $lang->tutorial->productManage->releaseManage->step17->desc ); diff --git a/module/tutorial/model.php b/module/tutorial/model.php index ee0c6ee6d3..f87ccf9194 100644 --- a/module/tutorial/model.php +++ b/module/tutorial/model.php @@ -1614,7 +1614,7 @@ class tutorialModel extends model $plan = new stdClass(); $plan->id = 1; $plan->product = 1; - $plan->branch = 0; + $plan->branch = '0'; $plan->parent = 0; $plan->title = 'Test plan'; $plan->status = 'wait';