public function setPredefinedVariables($type) { $i18n = TBGContext::getI18n(); switch ($type) { case TBGContext::PREDEFINED_SEARCH_PROJECT_OPEN_ISSUES: $this->_searchtitle = TBGContext::isProjectContext() ? $i18n->__('Open issues for %project_name', array('%project_name' => TBGContext::getCurrentProject()->getName())) : $i18n->__('All open issues'); $this->_groupby = 'issuetype'; break; case TBGContext::PREDEFINED_SEARCH_PROJECT_OPEN_ISSUES_INCLUDING_SUBPROJECTS: $this->_searchtitle = $i18n->__('Open issues for %project_name (including subprojects)', array('%project_name' => TBGContext::getCurrentProject()->getName())); $this->_groupby = 'issuetype'; break; case TBGContext::PREDEFINED_SEARCH_PROJECT_CLOSED_ISSUES: $this->_searchtitle = TBGContext::isProjectContext() ? $i18n->__('Closed issues for %project_name', array('%project_name' => TBGContext::getCurrentProject()->getName())) : $i18n->__('All closed issues'); $this->_groupby = 'issuetype'; break; case TBGContext::PREDEFINED_SEARCH_PROJECT_CLOSED_ISSUES_INCLUDING_SUBPROJECTS: $this->_searchtitle = $i18n->__('Closed issues for %project_name (including subprojects)', array('%project_name' => TBGContext::getCurrentProject()->getName())); $this->_groupby = 'issuetype'; break; case TBGContext::PREDEFINED_SEARCH_PROJECT_WISHLIST: $this->_searchtitle = $i18n->__('%project_name wishlist', array('%project_name' => TBGContext::getCurrentProject()->getName())); $this->_groupby = 'issuetype'; break; case TBGContext::PREDEFINED_SEARCH_PROJECT_MILESTONE_TODO: $this->_searchtitle = $i18n->__('Milestone todo-list for %project_name', array('%project_name' => TBGContext::getCurrentProject()->getName())); $this->_templatename = 'results_todo'; $this->_groupby = 'milestone'; break; case TBGContext::PREDEFINED_SEARCH_PROJECT_MOST_VOTED: $this->_searchtitle = TBGContext::isProjectContext() ? $i18n->__('Most voted issues for %project_name', array('%project_name' => TBGContext::getCurrentProject()->getName())) : $i18n->__('Most voted issues'); $this->_templatename = 'results_votes'; $this->_groupby = 'votes'; $this->_grouporder = 'desc'; $this->_issues_per_page = 100; break; case TBGContext::PREDEFINED_SEARCH_MY_REPORTED_ISSUES: $this->_searchtitle = $i18n->__('Issues reported by me'); $this->_groupby = 'issuetype'; break; case TBGContext::PREDEFINED_SEARCH_MY_ASSIGNED_OPEN_ISSUES: $this->_searchtitle = $i18n->__('Open issues assigned to me'); $this->_groupby = 'issuetype'; break; case TBGContext::PREDEFINED_SEARCH_TEAM_ASSIGNED_OPEN_ISSUES: $this->_searchtitle = $i18n->__('Open issues assigned to my teams'); $this->_groupby = 'issuetype'; break; case TBGContext::PREDEFINED_SEARCH_MY_OWNED_OPEN_ISSUES: $this->_searchtitle = $i18n->__('Open issues owned by me'); $this->_groupby = 'issuetype'; break; } $this->_filters = TBGSearchFilter::getPredefinedFilters($type, $this); }