/** * Returns HTML code to display the artifact history * * @param Codendi_Request $request The data from the user * * @return String The valid followup comment format */ public function validateCommentFormat($request, $comment_format_field_name) { $comment_format = $request->get($comment_format_field_name); return Tracker_Artifact_Changeset_Comment::checkCommentFormat($comment_format); }
private function storeComment(Tracker_Artifact $artifact, $comment, PFUser $submitter, $submitted_on, $comment_format, $changeset_id) { $comment_format = Tracker_Artifact_Changeset_Comment::checkCommentFormat($comment_format); $comment_added = $this->changeset_comment_dao->createNewVersion($changeset_id, $comment, $submitter->getId(), $submitted_on, 0, $comment_format); if (!$comment_added) { return false; } $this->reference_manager->extractCrossRef($comment, $artifact->getId(), Tracker_Artifact::REFERENCE_NATURE, $artifact->getTracker()->getGroupID(), $submitter->getId(), $artifact->getTracker()->getItemName()); return true; }