diff --git a/trunk/module/bug/config.php b/trunk/module/bug/config.php new file mode 100644 index 0000000000..8c1da840e2 --- /dev/null +++ b/trunk/module/bug/config.php @@ -0,0 +1,13 @@ +bug->search['module'] = 'bug'; +$config->bug->search['fields']['id'] = $lang->bug->id; +$config->bug->search['fields']['title'] = $lang->bug->title; +$config->bug->search['fields']['status'] = $lang->bug->status; +$config->bug->search['fields']['openedBy'] = $lang->bug->openedBy; +$config->bug->search['fields']['resolution'] = $lang->bug->resolution; +$config->bug->search['groupItems'] = 3; +$config->bug->search['params']['title'] = array('operator' => 'include', 'control' => 'input', 'values' => ''); +$config->bug->search['params']['status'] = array('operator' => '=', 'control' => 'select', 'values' => $lang->bug->statusList); +$config->bug->search['params']['openedBy'] = array('operator' => '=', 'control' => 'select', 'values' => 'users'); +$config->bug->search['params']['resolution'] = array('operator' => '=', 'control' => 'select', 'values' => $lang->bug->resolutionList); diff --git a/trunk/module/bug/control.php b/trunk/module/bug/control.php index bb2257e5f9..98a34d5297 100644 --- a/trunk/module/bug/control.php +++ b/trunk/module/bug/control.php @@ -49,6 +49,9 @@ class bug extends control /* 浏览一个产品下面的bug。*/ public function browse($productID = 0, $type = 'byModule', $param = 0, $orderBy = 'id|desc', $recTotal = 0, $recPerPage = 20, $pageID = 1) { + $this->config->bug->search['actionURL'] = $this->createLink('bug', 'browse', "productID=$productID&type=byQuery"); + $this->assign('searchForm', $this->fetch('search', 'buildForm', $this->config->bug->search)); + $type = strtolower($type); $this->session->set('bugList', $this->app->getURI(true)); @@ -97,6 +100,11 @@ class bug extends control { $bugs = $this->dao->findByResolution('postponed')->from(TABLE_BUG)->orderBy($orderBy)->page($pager)->fetchAll(); } + elseif($type == 'byquery') + { + if($this->session->bugQuery == false) $this->session->set('bugQuery', ' 1 = 1'); + $bugs = $this->dao->select('*')->from(TABLE_BUG)->where($this->session->bugQuery)->orderBy($orderBy)->page($pager)->fetchAll(); + } $users = $this->user->getPairs($this->app->company->id, 'noletter'); diff --git a/trunk/module/bug/view/browse.html.php b/trunk/module/bug/view/browse.html.php index 110a13bbf8..f1a2bb3dac 100644 --- a/trunk/module/bug/view/browse.html.php +++ b/trunk/module/bug/view/browse.html.php @@ -51,6 +51,7 @@ function selectProduct(productID)