* [task#126383,doing,1.5h] Add the tutorial of manageBug.

This commit is contained in:
xieqiyu
2024-09-04 17:31:41 +08:00
committed by 王于听
parent 15a804a923
commit 4effc038db
8 changed files with 227 additions and 5 deletions
+4
View File
@@ -151,6 +151,8 @@ class bugModel extends model
*/
public function getByID(int $bugID, bool $setImgSize = false): object|false
{
if(common::isTutorialMode()) return $this->loadModel('tutorial')->getBug();
$bug = $this->bugTao->fetchBugInfo($bugID);
if(!$bug) return false;
@@ -935,6 +937,8 @@ class bugModel extends model
*/
public function getExecutionBugs(int $executionID, int $productID = 0, string|int $branchID = 'all', string|array $builds = '0', string $type = '', int $param = 0, string $orderBy = 'id_desc', string $excludeBugs = '', object $pager = null): array
{
if(common::isTutorialMode()) return $this->loadModel('tutorial')->getBugs();
if(strpos($orderBy, 'pri_') !== false) $orderBy = str_replace('pri_', 'priOrder_', $orderBy);
if(strpos($orderBy, 'severity_') !== false) $orderBy = str_replace('severity_', 'severityOrder_', $orderBy);