From c02d5ad506ddf8d7d71df6eb338e19daa208d65f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=8B=E8=BE=B0=E8=BD=A9?= Date: Mon, 27 Jun 2022 14:16:45 +0800 Subject: [PATCH] * Add case to bug. --- api/v1/entries/bugs.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/api/v1/entries/bugs.php b/api/v1/entries/bugs.php index e07502a219..ee608e220d 100644 --- a/api/v1/entries/bugs.php +++ b/api/v1/entries/bugs.php @@ -86,6 +86,14 @@ class bugsEntry extends entry $fields = 'title,project,execution,openedBuild,assignedTo,pri,module,severity,type,story,task,mailto,keywords,steps,uid'; $this->batchSetPost($fields); + $caseID = $this->request('case', 0); + if($caseID) $case = $this->loadModel('testcase')->getById($caseID); + if($case) + { + $this->setPost('case', $case->id); + $this->setPost('caseVersion', $case->version); + } + $this->setPost('product', $productID); $this->setPost('notifyEmail', implode(',', $this->request('notifyEmail', array())));