It's all about the answers!

Ask a question

scm code review export when only Change set linked to Workitem


vinitha dsouza (61634) | asked Nov 09 '17, 9:11 a.m.
edited Jan 11, 3:49 p.m. by David Lafreniere (3.7k7)

Hello Team,
i am using scm code review export functionality part of SCM Tools for getting Code issues findings,approval status and others.

1. i have associated a Change set to Workitem (Using Submitting for Review window) without selecting the "Target Stream".
2. Ran scm export code-review for above said workitem.

Response:
- JSON response doesnt contain Change Set information at all.

My query is below,
1. Why JSON Response doesnt show Change set information.
2. Once i set Target Stream and run the scm command then JSON Response shows Change set information.
why is this behaviour?

Thanks


Accepted answer


permanent link
Shashikant Padur (3.6k27) | answered Nov 12 '17, 10:15 p.m.
JAZZ DEVELOPER
edited Nov 12 '17, 10:15 p.m.

Exporting code review only makes sense when the target stream is set because you are reviewing the changes against that of the stream. The right thing to do is to show a message indicating that the code review has not been initiated or probably inform that the target stream is not set.

vinitha dsouza selected this answer as the correct answer

Comments
David Lafreniere commented Jan 11, 3:47 p.m.
FORUM MODERATOR / JAZZ DEVELOPER
In terms of implementation, the ICodeReview object is only created and associated to the work item once the Target Stream is set. The 'export code-review' command will try to find the associated ICodeReview objects of the workitem, and then dump JSON/XML data related to that (which includes the list of change sets the code review currently knows about). So that is why the output does not contain anything useful (because there is no Code Review yet). The Web UI indicates the requirements to start a code review:
-change sets associated to the work item
-closed/completed change sets
-setting a target stream

Your answer


Register or to post your answer.