- edited description
get issue comments returns all the comment which don't have content.raw
I am trying to get all the comments in an issue, in API 1.0 I can get all the comments which have the comment content, after API 2.0 the api call returns all the comments includes attachment activities, issue comment status activity. For example one of my issue have actual 5 comments, remaining 8 comments are attachment, edited description, Changed title. but on the API return these kind of activities are not returned it just content.raw objects are empty, so I am not able to show only comments
$page = new \Bitbucket\API\Http\Response\Pager($this->issue->getClient(), $this->issue->comments()->all($this->accountname, $this->repo_slug,$issue_id,['q' => ' content.raw != "null" ']));
Comments (4)
-
reporter -
reporter any help on this @Alexandru Guzinschi ?
-
- changed status to invalid
If you need only the comments, without attachment activities, you can just ignore any item from the response which has
content.raw
and/orcontent.html
empty.content.raw
contains the text as it was typed by a user, so in case of attachment activities for example, this will be empty, as the user didn’t typed anything.This has nothing to do with the client, as the client will return the response that it gets from the API server. If you think that the API server response is broken or that it should be changed, please fill an issue on Bitbucket issue tracker.
-
reporter @Alexandru Guzinschi it makes sense, but if we ignore any item from the response which has content.raw, we might have the issue with the pagination as the size of response may not match. However I will fill an issue.
- Log in to comment