/** * Extends ADiffableObject by loading the root object. * @inheritdoc * @param $name * @param $arguments */ function __call($name, $arguments) { if (strpos($name, 'get') === 0) { if ($this->genericJiraObjectRoot != null) { $this->genericJiraObjectRoot->loadData(); } } return parent::__call($name, $arguments); }
/** * Adds a comment that is added if the transition is executed. * * @param $commentMessage * @return bool */ public function addTransitionComment($commentMessage) { if (empty($commentMessage)) { return false; } $this->addDiffableObject('update'); $this->update->addUntrackedArray('comment'); if (!is_array($this->update->comment)) { return false; } if (empty($this->update->comment)) { $comment = new DiffableObject(); $comment->addDiffableObject('add'); $comment->add->setBody($commentMessage); $this->update->comment[] = $comment; } else { $this->update->comment[0]->add->setBody($commentMessage); } return true; }