diff --git a/module/bug/control.php b/module/bug/control.php index b26f0d792a..9b89aeb762 100644 --- a/module/bug/control.php +++ b/module/bug/control.php @@ -435,11 +435,6 @@ class bug extends control if($runID and $resultID) extract($this->bug->getBugInfoFromResult($resultID, 0, 0, isset($stepIdList) ? $stepIdList : ''));// If set runID and resultID, get the result info by resultID as template. if(!$runID and $caseID) extract($this->bug->getBugInfoFromResult($resultID, $caseID, $version, isset($stepIdList) ? $stepIdList : ''));// If not set runID but set caseID, get the result info by resultID and case info. - if($testtask) - { - $testtask = $this->loadModel('testtask')->getById($testtask); - $buildID = $testtask->build; - } /* If bugID setted, use this bug as template. */ if(isset($bugID)) @@ -456,7 +451,15 @@ class bug extends control $assignedTo = $bug->assignedTo; $deadline = $bug->deadline; $color = $bug->color; + $testtask = $bug->testtask; } + + if($testtask) + { + $testtask = $this->loadModel('testtask')->getById($testtask); + $buildID = $testtask->build; + } + if(isset($todoID)) { $todo = $this->loadModel('todo')->getById($todoID); @@ -687,6 +690,7 @@ class bug extends control if(!$bug) die(js::error($this->lang->notFound) . js::locate('back')); if($bug->project) $this->session->project = $bug->project; $this->view->products = $this->products = $this->product->getProductPairsByProject($this->session->project); + $this->session->set('storyList', '', 'product'); $this->bug->checkBugExecutionPriv($bug); diff --git a/module/bug/view/create.html.php b/module/bug/view/create.html.php index 385f57a88a..23c9d36510 100644 --- a/module/bug/view/create.html.php +++ b/module/bug/view/create.html.php @@ -317,7 +317,7 @@ js::set('blockID', $blockID); - + id);?> diff --git a/module/story/view/zerocase.html.php b/module/story/view/zerocase.html.php index 89ab3104f6..7711ca80cd 100644 --- a/module/story/view/zerocase.html.php +++ b/module/story/view/zerocase.html.php @@ -45,6 +45,7 @@ $story):?> app->openApp == 'project') $param = $this->session->project; if($this->app->openApp == 'execution') $param = $this->session->execution; $viewLink = $this->createLink('story', 'view', "storyID=$story->id&version=0¶m=$param");