It's all about the answers!

Ask a question

Code review process within RTC - feedback requested


T M (8878188143) | asked Nov 25 '11, 7:25 a.m.
Hi,

I have come up with the steps for having a code review process within RTC without using any external code review tool. Is there a better way of doing this? Can someone please give me a feedback?

Thanks!


There are two developers - D1 & D2.

- D1 does the code change for file f in her local workspace and saves it. f appears as unresolved in the pending changes view.

- D1 checks-in f as a new change set and associate to a new WI (say Review WI type). In the new WI the owner is assigned to D2. In the discussion field of the WI, D1 puts the line number and the comment to D2 for the review.

- D1 creates a new approval for the WI and assigns D2 as the approver.

- The approval/Review process will be in the pending state.

- D2 gets intimation of the review task assigned to him through web feed, open assigned to me query, event log, email, dashboard viewlet.

- D2 opens the file on D1's Repository Workspace (Show -> Repository files)and reviews the code and comments in the discussion field of the same WI prefixing with @D1

- D2 changes the approval process (in the Approval tab) to Rejected state.

- D1 gets the review comment (because of @D1 prefix)

- D1 fixes the code and checks in to the same change set and updates the discussion field.

- D2 opens the file on D1's Repository Work Space and reviews the code and comments again in the discussion field.

- D2 changes the approval process to approved state and closes the WI.

- D1 delivers the change set because the WI is in approved state.

3 answers



permanent link
Geoffrey Clemm (30.1k33035) | answered Nov 25 '11, 12:08 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
The details vary depending on whether you are using the Eclipse client
or the Web Browser client for the review.

But a few general comments I'd make:
- There's usually no need to create a new work item for the review ...
just add a "review" approval on the work item that was used to create
the change (i.e. the work item owned by D1).
- There's no need to add a comment to the work item. In particular,
there's no need to specify the line number of the change in a comment,
because the reviewer would just double click on the change set attached
to the work item, and that will show them what lines need to be reviewed.
- There is a standard "my approvals" query, which you can use to see
your outstanding approvals (such as code reviews).

Cheers,
Geoff

On 11/25/2011 7:38 AM, theju wrote:
Hi,

I have come up with the steps for having a code review process within
RTC without using any external code review tool. Is there a better
way of doing this? Can someone please give me a feedback?

Thanks!


There are two developers - D1& D2.

- D1 does the code change for file f in her local workspace and saves
it. f appears as unresolved in the pending changes view.

- D1 checks-in f as a new change set and associate to a new WI (say
Review WI type). In the new WI the owner is assigned to D2. In the
discussion field of the WI, D1 puts the line number and the comment
to D2 for the review.

- D1 creates a new approval for the WI and assigns D2 as the
approver.

- The approval/Review process will be in the pending state.

- D2 gets intimation of the review task assigned to him through web
feed, open assigned to me query, event log, email, dashboard
viewlet.

- D2 opens the file on D1's Repository Workspace (Show -
Repository files)and reviews the code and comments in the discussion
field of the same WI prefixing with @D1

- D2 changes the approval process (in the Approval tab) to Rejected
state.

- D1 gets the review comment (because of @D1 prefix)

- D1 fixes the code and checks in to the same change set and updates
the discussion field.

- D2 opens the file on D1's Repository Work Space and reviews the code
and comments again in the discussion field.

- D2 changes the approval process to approved state and closes the
WI.

- D1 delivers the change set because the WI is in approved state.

permanent link
T M (8878188143) | answered Nov 27 '11, 5:06 a.m.
Thanks for the response. Please see my comments inset.

- There's usually no need to create a new work item for the review ...
just add a "review" approval on the work item that was used to create
the change (i.e. the work item owned by D1).

Theju>> We have come up with a single WI and multiple review approvals on the same WI. The reason is that we will have multiple reviewers for the same file/change-set. For e.g., Line 1 will be reviewed by D2 and line 5 (of the same file) will be reviewed by D3. Or, file 1 will be reviewed by D2 and file 2 (attached to the same change-set) will be reviewed by D3.


- There's no need to add a comment to the work item. In particular,
there's no need to specify the line number of the change in a comment,
because the reviewer would just double click on the change set attached
to the work item, and that will show them what lines need to be reviewed.

Theju>> Same reason ... Line 1 will be reviewed by D2 and line 5 (of the same file) will be reviewed by D3. So there can be a possibility that multiple people will review the same file or same change-set.


Few gaps that I see in the process:

1. I can't just right click on the line (in the Eclipse IDE) and add a review approval task. This process will be manual in the RTC process.

2. The discussion around the review process will be cataloged in the same "discussion" field of the WI - because single WI is used.

3. When an approver is added there was no email/feed that got generated to notify the approver. The approver has to run the "Pending approvals for me" query to find out any pending approval.

Thanks!

permanent link
T M (8878188143) | answered Nov 27 '11, 11:54 a.m.
Code review process within RTC (without using any external code review tool):

I have come up with this process. Please let me know if this can improved.

Thanks!


Project configuration:
-------------------------
Precondition set: "Require Work Item Approval" for "Deliver (client)" operation for "Everyone" role. In the "Required approvals", for the

"Review" type, at least one from "Everyone" role (or "Team Member" role) is set.

"User may overrule" may also be checked if not all code delivery may require a review process.


Scenario:
-----------
There are three developers - D1, D2 & D3 - all using RTC Eclipse client.

- D1 does the code change for files f1 & f2 in her local workspace and saves them. f1 and f2 appears as unresolved in the pending changes

view.
- D1 checks-in f1 & f2 into a new change set "CS". Right clicks on "CS" and select "Submit for Review" menu option and associate to a WI

(existing or a new one) and select approvers - D2 as the approver for f1 review (subject field is used to tell what to review) and D3 as

approver for f2 review.
- The approval/Review process will be in the pending state.
- D2 & D3 gets intimation of the review task assigned to them through a query - "Pending approvals for me".
- D2 opens the WI and in the Links section, double clicks on the f1 in the change set and see the diff in the Change Explorer. Does the review. Optionally, adds comment for D1 in the discussion field of the WI. Changes the Review approval state from pending to approved. D3 follows the same process as D2 but rejects because the f3 code change is not acceptable. Changes the Review approval state from pending to rejected.
- D1 gets the review comment via email/feed - because D1 is the owner and the subscriber of the WI.
- D1 fixes the code in f2 based on D3's review and checks in to the same changeset.
- D1 adds D3 again for the new review approval in the same WI.
- D3 gets intimation of the review task assigned to him through a query - "Pending approvals for me".
- D3 opens the WI and in the Links section, double clicks on the f2 in the change set and see the diff in the Change Explorer. Does the review. Optionally, adds comment for D1 in the discussion field of the WI. Changes the Review approval state from pending to approved.
- D1 gets the review comment via email/feed - because D1 is the owner and the subscriber of the WI.
- D1 delivers the changeset (or invokes "Complete" action on the changeset) because all the approvals in the WI are in approved state.
- The complete history of the code review process (rejected ones, approved ones) are in the "Approvals" tab.



Few gaps that I see in the above process:

1. I can't just right click on the line (in the Eclipse IDE) in a file and add a review approval task to an existing WI or a new WI. This process will be manual in the RTC by having multiple review approval created for the same changeset. I understand that RTC deals at the changeset level and not at the file level but I still want a source file to be reviewed by a developer and the corresponding doc to be reviewed by a QA engineer, for example.

2. The discussion around the review process will be cataloged in the same "discussion" field of the WI - because single WI is used.

3. When an approver is added there was no email/feed that got generated to notify the approver. The approver has to run the "Pending approvals for me" query to find out any pending approval (or this query can be put in a viewlet on the dashboard).

4. If I have multiple review approvals attached to a WI then there is no precondition which will stop me from delivering if all the review approvals are not approved. The work around is to have a precondition set for "Save Work Item (server)" that a WI can be saved in "Resolved" state (for example) only if all the review approvals are approved.

Your answer


Register or 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.