Example #1
0
 protected function _populateRecentIssues($issuetype)
 {
     $issuetype_id = is_object($issuetype) ? $issuetype->getID() : $issuetype;
     if (!array_key_exists($issuetype_id, $this->_recentissues)) {
         $this->_recentissues[$issuetype_id] = array();
         if ($res = tables\Issues::getTable()->getRecentByProjectIDandIssueType($this->getID(), $issuetype_id)) {
             while ($row = $res->getNextRow()) {
                 try {
                     $issue = new \thebuggenie\core\entities\Issue($row->get(tables\Issues::ID), $row);
                     if ($issue->hasAccess()) {
                         $this->_recentissues[$issuetype_id][$issue->getID()] = $issue;
                     }
                 } catch (\Exception $e) {
                 }
             }
         }
     }
 }