Example #1
0
 /**
  * Return an array of issues that has changes pending
  *
  * @return array
  */
 public function getIssuesPendingChanges()
 {
     return \thebuggenie\core\entities\common\Changeable::getChangedItems('\\thebuggenie\\core\\entities\\Issue');
 }
Example #2
0
 /**
  * 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 = tables\Issues::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 = framework\Context::getUser();
         }
         $step = $this->getProject()->getWorkflowScheme()->getWorkflowForIssuetype($this->getIssueType())->getFirstStep();
         $step->applyToIssue($this);
         return;
     }
     $this->_last_updated = NOW;
 }