Get issue list for specific analysis

Hi,

Is it possible to get the list of new issues for a specific project analysis (maybe using analysis id)?

Thanks

Hi @JackieXiao,

Issues are not tied to the specific analysis when they were created, but rather to their creation date/time. So you could search for the date/time period of the analysis that you’re interested in and retrieve all issues at that time. Via the web interface you can use the Creation date search facet. If you prefer the Web API, you can take a look at the full list of parameters for api/issues/search in the onboard documentation: simply follow the Web API link in the footer of any SonarQube page.

Regards,

Cameron.

Thanks Cameron

Get your point.

Originally, we tried to use creation date, but due to “issue backdating”, the creation date may not be accurate.

What we did now is sort issues based on “UPDATE_DATE” and find the issues which “UPDATE_DATE == ANALYSIS_DATE”

Hi @JackieXiao,

Great, so it looks like you’ve got access to the issues you need :smiley:

Cheers,

Cameron.

Thanks @Cameron

Yes, we used above mentioned workaround to get the list of issues “related to” some analysis.

If there are no better alternatives, we will stick with the current approach.

Thanks