{$lang->execution->importBug}", '', "class='btn btn-link btn-active-text'");?>
@@ -61,7 +61,7 @@ var browseType = '';
pri;?>' title='bug->priList, $bug->pri, $bug->pri)?>'>bug->priList, $bug->pri, $bug->pri)?>
id", $bug->title, '', "class='preview'", true, true);?>
processStatus('bug', $bug);?>
- id]", $lang->task->priList, zget($lang->task->priList, $bug->pri ? $bug->pri : 3, 3), "class='form-control chosen'");?>
+ id]", $lang->task->priList, zget($lang->task->priList, $bug->pri ? $bug->pri : 3, 3), "class='form-control chosen'");?>
id]", $users, zget($users, $bug->assignedTo, '', $bug->assignedTo), "class='form-control chosen'");?>
id]", '', 'size=4 class="form-control"');?>
deadline > helper::today() and $bug->deadline > $execution->begin) ? $bug->deadline : '0000-00-00';?>
diff --git a/module/testcase/control.php b/module/testcase/control.php
index 1ef355c321..5710c60b0d 100644
--- a/module/testcase/control.php
+++ b/module/testcase/control.php
@@ -1238,7 +1238,10 @@ class testcase extends control
/* Build the search form. */
$actionURL = $this->createLink('testcase', 'linkCases', "caseID=$caseID&browseType=bySearch&queryID=myQueryID", '', true);
- $this->testcase->buildSearchForm($case->product, $this->products, $queryID, $actionURL);
+ $objectID = 0;
+ if($this->app->tab == 'project') $objectID = $case->project;
+ if($this->app->tab == 'execution') $objectID = $case->execution;
+ $this->testcase->buildSearchForm($case->product, $this->products, $queryID, $actionURL, $objectID);
/* Get cases to link. */
$cases2Link = $this->testcase->getCases2Link($caseID, $browseType, $queryID);
diff --git a/module/testcase/model.php b/module/testcase/model.php
index 720de4e798..d622bca03d 100644
--- a/module/testcase/model.php
+++ b/module/testcase/model.php
@@ -1450,7 +1450,7 @@ class testcaseModel extends model
* @access public
* @return void
*/
- public function buildSearchForm($productID, $products, $queryID, $actionURL, $projectID)
+ public function buildSearchForm($productID, $products, $queryID, $actionURL, $projectID = 0)
{
$product = ($this->app->tab == 'project' and empty($productID)) ? $products : array($productID => $products[$productID]) + array('all' => $this->lang->testcase->allProduct);
$this->config->testcase->search['params']['product']['values'] = $product;