Skip to content

Commit

Permalink
Fix comment method not returning multiple comments (#432)
Browse files Browse the repository at this point in the history
  • Loading branch information
MelvinSnijders authored Jun 16, 2022
1 parent e785290 commit fce4fdd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Issue/IssueService.php
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ public function getComment($issueIdOrKey, $id, array $paramArray = [])
* @throws JiraException
* @throws \JsonMapper_Exception
*
* @return Comment Comment class
* @return Comments Comments class
*/
public function getComments($issueIdOrKey, array $paramArray = [])
{
Expand All @@ -328,12 +328,12 @@ public function getComments($issueIdOrKey, array $paramArray = [])
$ret = $this->exec($this->uri.'/'.$issueIdOrKey.'/comment'.$this->toHttpQueryParameter($paramArray), null);

$this->log->debug('get comments result='.var_export($ret, true));
$comment = $this->json_mapper->map(
$comments = $this->json_mapper->map(
json_decode($ret),
new Comment()
new Comments()
);

return $comment;
return $comments;
}

/**
Expand Down

0 comments on commit fce4fdd

Please sign in to comment.