src/Jira/Api.php
public function addComment($issue_key, $params)
	{
		if ( is_string($params) ) {
			// If $params is scalar string value -> wrapping it properly.
			$params = array(
				'body' => $params,
			);
		}

		return $this->api(self::REQUEST_POST, sprintf('/rest/api/2/issue/%s/comment', $issue_key), $params);
	}
public function addComment($issue_key, $params)
	{
		if ( is_string($params) ) {
			// If $params is scalar string value -> wrapping it properly.
			$params = array(
				'body' => $params,
			);
		}

		return $this->api(self::REQUEST_POST, sprintf('/rest/api/2/issue/%s/comment', $issue_key), $params);
	}
public function addComment ( $ issue_key , $ params ) { if ( is_string ( $ params ) ) { // If $params is scalar string value -> wrapping it properly. $ params = array ( 'body' => $ params , ) ; } return $ this -> api ( self :: REQUEST_POST , sprintf ( '/rest/api/2/issue/%s/comment' , $ issue_key ) , $ params ) ; }
Add a comment to a ticket.

@param string       $issue_key Issue key should be "YOURPROJ-221".
@param array|string $params    Params.

@return Result|false
Add a comment to a ticket .