From 9e3ffc4fd0376643a7ac3becd99e2d24fccf92bf Mon Sep 17 00:00:00 2001 From: tianshujie Date: Thu, 18 Apr 2024 09:19:56 +0800 Subject: [PATCH] * Add injection and identify field for the create, view, export bug. --- lib/zin/wg/bugbasicinfo/v1.php | 6 ++++++ module/bug/model.php | 7 +++++++ module/bug/ui/create.html.php | 2 +- module/bug/zen.php | 1 + 4 files changed, 15 insertions(+), 1 deletion(-) diff --git a/lib/zin/wg/bugbasicinfo/v1.php b/lib/zin/wg/bugbasicinfo/v1.php index 0f7619be6a..966a90005c 100644 --- a/lib/zin/wg/bugbasicinfo/v1.php +++ b/lib/zin/wg/bugbasicinfo/v1.php @@ -154,6 +154,12 @@ class bugBasicInfo extends wg foreach($browserList as $browser) $browserText .= zget($lang->bug->browserList, $browser) . ' '; $items[$lang->bug->browser] = trim($browserText); + if($config->edition == 'max') + { + $items[$lang->bug->injection] = $bug->injectionTitle; + $items[$lang->bug->identify] = $bug->identifyTitle; + } + $items[$lang->bug->keywords] = $bug->keywords; $mailtoList = explode(',', $bug->mailto); diff --git a/module/bug/model.php b/module/bug/model.php index 5b3695fb6b..443f48385e 100644 --- a/module/bug/model.php +++ b/module/bug/model.php @@ -164,6 +164,13 @@ class bugModel extends model if($bug->toTask) $bug->toTaskTitle = $this->bugTao->getNameFromTable($bug->toTask, TABLE_TASK, 'name'); if($bug->relatedBug) $bug->relatedBugTitles = $this->bugTao->getBugPairsByList($bug->relatedBug); + if($this->config->edition == 'max') + { + $identifyList = ($bug->injection || $bug->identify) ? $this->loadModel('review')->getPairs($bug->project, $bug->product, true) : array(); + $bug->injectionTitle = zget($identifyList, $bug->injection, ''); + $bug->identifyTitle = zget($identifyList, $bug->identify, ''); + } + $bug->linkMRTitles = $this->loadModel('mr')->getLinkedMRPairs($bugID, 'bug'); $bug->toCases = $this->bugTao->getCasesFromBug($bugID); $bug->files = $this->file->getByObject('bug', $bugID); diff --git a/module/bug/ui/create.html.php b/module/bug/ui/create.html.php index 10bad539f3..1f8188dd3c 100644 --- a/module/bug/ui/create.html.php +++ b/module/bug/ui/create.html.php @@ -19,7 +19,7 @@ if(!empty($executionType) && $executionType == 'kanban') $fields->merge('bug.kan $fields->autoLoad('product') ->autoLoad('branch', 'module,openedBuild,execution,project,story,task,assignedTo') ->autoLoad('module', 'assignedTo,story') - ->autoLoad('project', 'project,openedBuild,execution,story,task,assignedTo') + ->autoLoad('project', 'project,openedBuild,execution,story,task,assignedTo,injection,identify') ->autoLoad('execution', 'execution,openedBuild,story,task,assignedTo') ->autoLoad('allBuilds', 'openedBuild') ->autoLoad('allUsers', 'assignedTo') diff --git a/module/bug/zen.php b/module/bug/zen.php index be19254e24..4fc58a71b5 100644 --- a/module/bug/zen.php +++ b/module/bug/zen.php @@ -1054,6 +1054,7 @@ class bugZen extends bug $bug = $this->getBuildsForCreate($bug); $bug = $this->getStoriesForCreate($bug); $bug = $this->gettasksForCreate($bug); + if($this->config->edition == 'max') $this->view->injectionList = $this->view->identifyList = $this->loadModel('review')->getPairs($bug->projectID, $bug->productID, true); $this->view->title = isset($this->products[$bug->productID]) ? $this->products[$bug->productID] . $this->lang->colon . $this->lang->bug->create : $this->lang->bug->create; $this->view->productMembers = $this->getProductMembersForCreate($bug);