To query work items based on the state of code review or reviewers, you must create two
custom attributes. The custom attributes are created solely for supporting work item queries and
therefore must be hidden. This is an optional setting that you can configure if your project area
members require work item query support.
The permissions that are assigned for these custom attributes are based on the role of the
user who works in code review. Based on your process configuration, some roles might not have
permission to update the custom attributes. To avoid this restriction, you must review your process
configuration or allow the role ‘everyone’ at the project area level to modify these two attributes.
However, users are not allowed to modify the attributes directly as they are hidden
attributes.
- To create the list of statuses by using the Enumeration tab for the Code Review Status
attribute:
- On the Application Administration page of the web client, click
the Project Areas tab.
- On the Active Project Areas page, click the project area that you
want to configure and then, click Work Items.
- In the Work Items tab, click
Enumerations and then, click Add.
- In the Add Enumeration dialog box, enter the required fields, and
then, click OK.
- In the Literals section, click
Add.
- In the Add Literal dialog box, add the following code review
statuses one by one. If you want the code review text in English, then the names must match exactly
as follows:
- Pending
- Submitted
- In Review
- In Revision
- Approved
- Closed
- Unknown
- In the Details section of the Enumeration
tab, select the value for the Default Literal as Submitted and then, click
Save.

- Optional: If you want to use other languages for code review statuses, you
must change the IDs of the literals by using the Eclipse client.
- Right-click the project area in an editor and click Open. Select the
Process Configuration Source tab.
- Search for the ‘codereview.reviewStatusEnum” enumeration and change the ID for each literal to
the following values:
- com.ibm.team.filesystem.codeReviewState.pending
- com.ibm.team.filesystem.codeReviewState.submitted
- com.ibm.team.filesystem.codeReviewState.inReview
- com.ibm.team.filesystem.codeReviewState.inRevision
- com.ibm.team.filesystem.codeReviewState.approved
- com.ibm.team.filesystem.codeReviewState.closed
- com.ibm.team.filesystem.codeReviewState.unknown
Example literal definition when French is used (for In Review):
<literal
icon =””
id= “com.ibm.team.filesystem.codeReviewState.inReview”
name=”En Revue”/>
- On the Application Administration page of the web client, click the
Project Areas tab.
- On the Active Project Areas page, click the project area that you
want to configure and then, click Work Items.
- In the Work Items tab, click Types and
Attributes.
- In the Types and Attributes subtab, on the
Attributes section heading, click
Add.
The
Add Attribute dialog box is
displayed.

- Create the custom attribute Code Review Status. Enter the details
as follows and click OK:
- Name: Code Review Status
- ID: codereview.reviewStatus (IMPORTANT: you must use this exact ID)
- Type: Enumeration list that you created in step 1-f to add enumeration for Code Review Status
attribute Ex: “Code Review Status Enum (Enumeration List)”
- In the Types and Attributes subtab, on the
Attributes section heading, click Add.
- Create the custom attribute Code Reviewers. Enter the details as
follows and click OK:
- Name: Code Reviewers
- ID: codereview.reviewers (IMPORTANT: you must use this exact ID)
- Type: Contributor list (Default list already present in work items)
- Click Save to save the newly added custom attributes to the work
item.
Note: Ensure that these custom attributes are added to all work item types that follow the code
review process.
- Optional: To reuse the custom attributes for other work item types:
- In the Add Attribute dialog box (refer step 5), select
Reuse Existing Attribute.
- Select the required attribute that you created earlier. Only one attribute can be
added at a time.