It's all about the answers!

Ask a question

Code Review process


Yehiel Glass (25538986) | asked Nov 27 '11, 7:41 a.m.
Hi,
We are planning import to RTC 3.0.1
I saw topics about Code Review but didn't understand RTC way for Code Review process. (we don't have external tools).
RTC built-in features for Code Review (what I know):
- WI Approval
- Deliver CS related to approval WI only
- Accept CS by WI from any stream
- Right click on CS -> 'submit for review' - relate CS to WI, complete CS, create approval field on WI

RTC Code Review process (That's how I understand, But I have some problems and I need your help):
1) There is one Code reviewer for many streams on our system.
2) Developer create CS and 'submit for review' - the CS completed
3) Code Review want fix for the CS so write WI commnt @developer
4) Developer correct the CS (new CS created) 'submit for review' (CS completed)
5) Code Reviewer sign WI approvals. now the developer can 'deliver' the CS.

Problems:
1. How to replay the process for more than one CS (WI contains more than one CS and already signed)
2. Fixed CS is not related to original CS so after approval, one can deliver only the original without the fix.
3. Many Approvals fields (for each 'submit for review')

Can you please explain the Code Review process?
Thanks,
Yehiel

4 answers



permanent link
T M (8876188143) | answered Nov 28 '11, 8:27 a.m.
Below is what I'm planning to recommend to a team that would use RTC.

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.

Comments
Jirong Hu commented Dec 21 '11, 10:03 a.m. | edited Feb 27 '13, 1:51 p.m.

I can't find the "Code Review Process" in the online infoCenter?

Jirong


Millard Ellingsworth commented Feb 27 '13, 1:52 p.m.
FORUM ADMINISTRATOR / JAZZ DEVELOPER

There isn't an "official" code review process documented for RTC (which is why you cannot find anything in the info center). 


permanent link
akiko yamaguchi (6278) | answered Jul 19 '12, 10:24 p.m.
Hi.

I think developer should set the CS completed when submitting for review.
If the CS is active, developer can checks-in to the same CS freely, so, reviewed code and submitted code may be different.
("Submit for review" action automatically changes the CS state from active to completed. This behavior is reasonable.)

Because we can't check-in to the completed CS, developer needs to create a new CS.
( Developer can't do the following step - 'D1 fixes the code in f2 based on D3's review and checks in to the same changeset. ' )

In this case, how can we deal with the problem 2 yehiel-san says ?
Developer needs to deliver 2 CSs( the original and the fix) at the same time. How can we restrict that developer delivers only the original without the fix ?

Thanks.

permanent link
Juan Pablo Bruno (26710) | answered Feb 27 '13, 8:56 a.m.
Hello, I'm planning to migrate, and we did some test beforehand on how to use RTC source code management. The thing is that the alternatives I saw for a code inspection do not sound to me efficient. As an example, If I want to set up a review of ~15 files, I include them in a changeset, how can a reviewer make comments to a particular line in a particular file, and how the same reviewer can make an efficient follow up comment by comment and line by line?

We were using ReviewBoard and the tool worked really well for our process, so I'm trying to see how RTC can help me use the (more or less) same process.

Thanks,

Comments
Millard Ellingsworth commented Feb 27 '13, 2:06 p.m.
FORUM ADMINISTRATOR / JAZZ DEVELOPER

As @tmok mentioned to you in another thread, we don't currently support ReviewBoard, though some enhancement requests have been filed to track the possibility of doing so. I'm not aware of any capability that is currently available that would allow annotation directly in the source without creating a new change set or patch. Finding the ReviewBoard work items, commenting on and socializing them to promote a desire to add ReviewBoard to RTC is likely the best path forward.


Juan Pablo Bruno commented Feb 27 '13, 2:35 p.m.

Do you have some examples of the enhancement requests? Is just to know when are those planned for.

I know there is a way of integrating GIT/Gerrit with RTC... Now, do you know if there is a way of replicating the Gerrit flow with RTC?


permanent link
Millard Ellingsworth (2.5k12431) | answered Feb 27 '13, 3:29 p.m.
FORUM ADMINISTRATOR / JAZZ DEVELOPER
Here are the work items that are tracking a possible ReviewBoard integration. A ReviewBoard contributor discusses their plans to work on an RTC integration in the first one. Both of these items are sitting on the backlog at this time.

https://jazz.net/jazz/resource/itemName/com.ibm.team.workitem.WorkItem/248348

https://jazz.net/jazz/resource/itemName/com.ibm.team.workitem.WorkItem/242139

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.