Problem
- If you are committing to a codebase which you dont know, which has a large number of contributers, you dont always know who should be reviewing your code.
- There are other factors which could contribute to who you would add as a reviewer - availability / recent activity for example.
- If you know the ins and outs of a particular piece of code, you may want to make sure that you are involved in any reviews surrounding that code. This is similar to Watches in Fisheye, though now that Crucible can be used without FE, it has its place.
FedEx Delivery
'Suggest Reviewers' button on the edit details page:

Uses a combination of 3 methods to suggest reviewers:
- Contribution to code, using total lines of code for the files currently in the review
- Availability, using number of reviews outstanding
- Randomness: 2 random users are added to the list to help get fresh eyes on the code, and to spread the load of code reviews
The suggestion displays code contribution and open reviews:
- File which the user has most contributed to, with a percentage of how much of that file is theirs
- Total LoC for all of the files in the review
- Number of open reviews

In this example, Brendan has written all of LicenseDecoder.java, and contributed 804 lines of code in total. Although Matt has 12 more lines of code than Peter, he has 2 reviews open, which drops his rank as a suggestion.
The users in the suggestion box are clickable - they will be added to the reviewers list once clicked. They are not reviewers until the user hits Save.
This is currently just a fairly simple ajax action. There is a button, some javascript, some java code to step through the files and do the logic.
Whats Left TODO To Get This To Ship
Currently there are no user settings. I think some options need to be given:
- Number of users to suggest
- Number of random users to insert
- Weighting of each value (# of open reviews might be irrelevant to some people)
The way it matches Crucible users with committers is really dodgy -> it just matches the usernames.
There is currently no UI feedback while its thinking. This was okay for fedex because I was only using a small repository, with not many files in the review, but it definately needs something there.
Currently it doesnt check if Fisheye exists. In a standalone instance of Crucible, this currently wont work. So, get it to work...
Estimated time: 3 days
Whats Left TODO To Perfect It
Definately needs some more functionality:
- For new files, there is no relevant LoC data, so it should look at the other files in its directory, and continue up the directory structure
- Add a Watches type functionality, similar to Fisheye
- Make a plugin point of it, so users can create their own datapoints for the suggestion algorithm.
User interface could look a bit more snazzy.

1 Comment
Hide/Show CommentsNov 24, 2008
Bob Swift
Nice idea! Especially important to help for newer team members.