It's all about the answers!

Ask a question

Code review with RTC 2.0: reviewer annotations?


Frederic Mora (13811518) | asked Jan 21 '10, 8:01 p.m.
retagged Oct 06 '17, 3:45 p.m. by Ken Tessier (84117)

I have a few questions regarding code reviews with RTC. Peter Wrampe advised me that I should create separate posts rather than asking all questions on the same post. So forgive me for spamming the forum.

Suppose that I have a work item that refers to source files. I send the WI for review.. The reviewer wants to annotate the code in order to draw my attention to problems. Currently, the only choices we have are unpleasant:


  • The reviewer can add comments to the work items, "file foo.java, line 123, this and that are wrong"
  • The reviewer can add comments in the code, e.g. TODOs

Neither of these are satisfactory. An annotation system, such as the comment metadata in word processors, would be much better.

Is there a recommended way for a reviewer to annotate code he's examining?

Thank you.

Accepted answer


permanent link
David Lafreniere (4.8k7) | answered Oct 04 '17, 1:39 p.m.
FORUM MODERATOR / JAZZ DEVELOPER
edited Oct 04 '17, 1:46 p.m.

In Rational Team Concert 6.0.1 we have introduced a new Code Review feature. Code review is integrated with RTC work items and Jazz SCM to provide developers with a seamless, low overhead work flow that is simple to use and is a natural extension to their daily activities. There isn’t a separate server installation, additional licensing fees or other costs associated with using RTC code review. Enabling code review for your projects is simple and takes only a few minutes to set up.

Reviewers can annotate specific lines of code, which helps developers quickly see and fix issues. Issues (or findings) can be marked as must-fix and the reviewer can accept or reject the changes. When preconditions are enabled, a code review cannot be approved if must-fix issues have not been resolved to everyone’s satisfaction.

Developers don’t have to worry about the intricacies of issue management because this is handled for them. Each issue has its own discussion thread and events are logged as the review progresses. Whenever an issue is updated, a new issue raised, or new code changes are added to the review, the events are logged so that you have a complete history of the review life-cycle. Because code reviews are iterative and can include code changes during the review cycle, any annotations on lines of code (issue markers) are automatically re-positioned and visual cues are provided to the reviewer so that they can easily see what has changed since they last looked at the code or since they last reviewed issues.

Team collaboration is accelerated through real-time notification of pending reviews, issues, and fixes. This is becoming more and more important as the number of globally distributed development teams increase. In fact, with the RTC SCM development team spread across three different time zones, it is common for them to have code changes that were written in one time zone reviewed by team members in another time zone.

Code review enables auditing for compliance. Issue status at delivery, approval information, the event logs, and other information captured during the review can be used for a variety of metrics and reporting requirements.

Since the introduction of code review in 6.0.1 more features have been added. Reviewers can inspect intermediate before and after file states which is useful in advanced SCM workflows encountered when multiple developers are working on a common code base. We have added the ability to filter issues on the navigator pane on the left, and various usability enhancements have been added.

The ability to extract work items is useful when an issue needs to be addressed but shouldn’t prevent delivery of the current code changes. The extracted work item captures the required work and will have its own code review cycle.

A SCM CLI command is also available to export code review data such as issues raised, issue activity, reviewer information, code delivery status, and other metrics in JSON or XML format. This enables customers to use their existing reporting tools or custom scripts for auditability and other reporting requirements

Additional Information:
Article: Rational Team Concert Code Review
Video: Introduction to Code Review (Part 1)
Video: Configuring Code Review (Part 2)
Video: Performing a Code Review (Part 3)
Knowledge Center: Working With the Code Review Tool

Michael Valenta selected this answer as the correct answer

4 other answers



permanent link
Jean-Michel Lemieux (2.5k11) | answered Jan 21 '10, 9:51 p.m.
JAZZ DEVELOPER
We are tracking this enhancement request in

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

In the meantime, we are looking at allowing integrations into different code review tools but we don't have an ETA on this.

Cheers,
Jean-Michel

permanent link
David Olsen (5237) | answered Jan 22 '10, 2:53 a.m.
JAZZ DEVELOPER
fredericmora wrote:
Suppose that I have a work item that refers to source files. I send
the WI for review.. The reviewer wants to annotate the code in order
to draw my attention to problems. Currently, the only choices we have
are unpleasant:

* The reviewer can add comments to the work items,
"file foo.java, line 123, this and that are wrong"
* The reviewer can add comments in the code, e.g. TODOs

On my team, the reviewer just adds comments to the work item. It works
well enough for us. (But maybe I just don't know any better, having
never used a more sophisticated code review tool. But compared to how
we used to do code reviews when working in CVS, RTC is a dream come true.)

(How can the review add comments in the code? I thought you weren't
allowed to change someone else's change set. And creating a new change
set seems wrong.)

Comments
Frederic Mora commented Jan 22 '10, 11:58 a.m. | edited Oct 04 '17, 10:02 a.m.

(How can the review add comments in the code? I thought you weren't
allowed to change someone else's change set. And creating a new change
set seems wrong.)



Yes, that's why I'd prefer to see the code left untouched and the comments gathered somewhere else.

As you said, adding comments in the work item is possible, but it is rather cumbersome.

What I'd like to see is reveiwer comments stored as metadata, maybe linked to the work items to be reviewed. When displayed, this metadata shows up as an overlay on the top of the reviewed code. For instance, we could have a window split in two.

On the left pane, we see the comments attached to the work item
On the right, we see the current source code file and line that the comments refer to..


permanent link
Jean-Michel Lemieux (2.5k11) | answered Jan 22 '10, 12:49 p.m.
JAZZ DEVELOPER
One option we've considered is to let you more easily swipe/comment on code changes as you are reviewing them and have those added to the work item in a rich text mode, so that you can talk about each of them. The main problem is to balance being able to discuss areas of the code without having to click around too much or add too much process overhead.
Cheers,
Jean-Michel

permanent link
Umang Shah (16) | answered Feb 05 '10, 12:19 p.m.
Does RTC have any integrations to code review tools like CodeStriker?

Comments
Gregg Sporar commented Feb 07 '10, 7:22 p.m. | edited Oct 04 '17, 10:12 a.m.

AFAIK, RTC does not have an integration to CodeStriker.

At Smart Bear, we have just begun development on an integration between our code review tool (http://codecollaborator.com) and RTC. We're hoping to have a technology preview available later this month.

HTH,
Gregg Sporar
Senior Product Manager
Smart Bear Software
http://blog.smartbear.com


Glenn Poston commented Sep 17 '10, 10:52 a.m. | edited Oct 04 '17, 10:28 a.m.

We use this with some success.

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.