/** * Return an array of issues that has changes pending * * @return array */ public function getIssuesPendingChanges() { return TBGChangeableItem::getChangedItems('TBGIssue'); }
/** * Save changes made to the issue since last time * * @return boolean */ protected function _preSave($is_new) { parent::_preSave($is_new); if ($is_new) { if (!$this->_issue_no) { $this->_issue_no = TBGIssuesTable::getTable()->getNextIssueNumberForProductID($this->getProject()->getID()); } if (!$this->_posted) { $this->_posted = NOW; } if (!$this->_last_updated) { $this->_last_updated = NOW; } if (!$this->_posted_by) { $this->_posted_by = TBGContext::getUser(); } $step = $this->getProject()->getWorkflowScheme()->getWorkflowForIssuetype($this->getIssueType())->getFirstStep(); $step->applyToIssue($this); return; } $this->_last_updated = NOW; }