Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Is there a specific API that can call up Code Review Summary Data?

Is there a specific API that can call up Code review summary data? I am particularly interested in the issue summary data that defines how many total issues there are and the the state in which the issue reside such as Total Must Fix Issues and Total Other issues as well as their resolution status?



0 votes


Accepted answer

Permanent link
1)
We have a SCM command-line (CLI) option for outputting a code review report: 'scm export code-review'.
You would need a work item query that is designed to query for only the work items you care about.

2)
There is also a REST based service you could call. It's not official API, but probably could still be used (but subject to change). See:
IFilesystemWorkItemRestService.getCodeReviewReport(ParmsGetCodeReviewReport parms)
If you can't manage to call it using Java, because it's REST based you could get the JSON response back from calling:

https://<YOUR_SEVER_NAME>9443/jazz/service/com.ibm.team.filesystem.common.workitems.internal.rest.IFilesystemWorkItemRestService/CodeReviewReport?queryId=_d1jTkD9-EemgIuIeu-3rqA&includeCsDeliveryInfo=true&includeFileNameInfo=true


Then you can write a script to parse it and get the data you need. This is similar to the CLI though where you need an existing work item query to get the list of work items you want code review data for.

3)
We have official API in ICodeReviewService. You can use API such as ICodeReviewService.findReviewByWorkItem to get back an ICodeReview. From there you can get a bunch of data related to a code review, such as their issues (along with the fill event history of each issue).
Jay Penerian selected this answer as the correct answer

0 votes

Comments
Sorry, I forgot to mention some other official API that we do have.. this can be used to retrieve all the data you want. I revised the original post to include this,
but the relevant information is:

We have official API in ICodeReviewService. You can use API such as ICodeReviewService.findReviewByWorkItem to get back an ICodeReview. From there you can get a bunch of data related to a code review, such as their issues (along with the fill event history of each issue).

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,937

Question asked: Jun 11 '19, 4:31 p.m.

Question was seen: 1,393 times

Last updated: Jun 13 '19, 9:02 a.m.

Confirmation Cancel Confirm