From 0d0764dc5a517a697c99659947a5e90321dac370 Mon Sep 17 00:00:00 2001 From: chenfeiCF Date: Tue, 21 Mar 2017 14:32:50 +0800 Subject: [PATCH] * fix bug when create bug from case. --- module/bug/control.php | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/module/bug/control.php b/module/bug/control.php index 8e8b3d285a..d9e945822b 100644 --- a/module/bug/control.php +++ b/module/bug/control.php @@ -260,15 +260,8 @@ class bug extends control $extras = str_replace(array(',', ' '), array('&', ''), $extras); parse_str($extras); - /* If set runID, get the result info by resultID as the template. Else get the result info by resultID and case info. */ - if($runID) - { - extract($this->bug->getBugInfoFromResult($resultID)); - } - else - { - extract($this->bug->getBugInfoFromResult($resultID, $caseID, $version)); - } + if($runID and $resultID) extract($this->bug->getBugInfoFromResult($resultID));// If set runID and resultID, get the result info by resultID as template. + if(!$runID and $caseID) extract($this->bug->getBugInfoFromResult($resultID, $caseID, $version));// If not set runID but set caseID, get the result info by resultID and case info. /* If bugID setted, use this bug as template. */ if(isset($bugID))