Configuring preconditions for code review

You can configure preconditions to further refine your review workflow. Also, to ensure that policies are enforced before the change sets are delivered. However, preconditions are not set for your product by default. But you can configure preconditions according to your product requirements. As a part of Code Review, an advisor is available that can be configured for the Modify Code Review operation. You can configure the advisor from Precondition and the follow-up link under the Project Area Administration. Here, you can configure the operation on which the advisor needs to be applied. For Code Review, Modify Code Review operation is available for enabling advisor

Example

Category Operation Precondition Description
Code Review Modify Code Review Require all files to be viewed for Code Review. This advisor restricts the approval of code review in case the files with underlying changes have not been viewed by the reviewer. After all the changes have been viewed, the Code Review can be approved.
Work items Deliver (server) Require code review to be closed. For a code review enabled work item, code review must be closed before you deliver the change sets.
Work items Deliver (server) Require work item approval. For a code review enabled work item, a minimum number of code review approvals must be complete before you deliver the change sets. Code review approvals are considered for the type 'Review' only if the Approvals of type 'Review' must be code review approvals checkbox is selected. If this checkbox is not selected, only work item approvals are considered.