コード例 #1
0
 /**
  * Handle on add comment event
  *
  * @param Comment $comment
  * @return null
  */
 function onAddComment(Comment $comment)
 {
     try {
         $this->setUpdated('comment');
         $this->save();
         $change = new ProjectTicketChange();
         $change->setTicketId($this->getId());
         $change->setType('comment');
         $change->setToData('#' . $this->countAllComments());
         $change->save();
         Notifier::newTicketComment($comment);
     } catch (Exception $e) {
         // nothing here, just suppress error...
     }
     // try
 }