[API] unable to see issue comments

Community Edition Version 7.8 (build 26217)

I am working on a script to create JIRA tickets from SQ alerts (I know the SQ teams does not advise this, nevertheless…) and want to check if a previous run of the script already left a comment (e.g. URL) but somehow I do not see any comments in the API call response.

Example:
This is one of the flagged SQ bugs with a comment below from user “lmolenaar”


The deeplink URL looks like this: “https://sonarqube.xxxx/project/issues?id=xxxx&issues=AWtQSGyxvmpNDcmJ7zjn&open=AWtQSGyxvmpNDcmJ7zjn

So I assume the unique issue ID is “AWtQSGyxvmpNDcmJ7zjn”.

When I query for all open BUGS and locate this specific ID, I do not see the added comment listed.
Link: https://pastebin.com/ZVgu1ZRS

According to the documentation it should be there:
/web_api/api/issues

Anybody any ideas what I am doing wrong here?

Lucas,

Take a peek at the additionalFields parameter in the Web API documentation for GET api/issues/search

Best regards,

Colin

1 Like