Displaying the contents of a referenced record

Your ClearQuest® record type might contain a field that is a reference to another record type. You might want to display the contents of the referenced record in a work item even if there is no corresponding Rational Team Concert™ item type.

About this task

You can create a custom attribute in the work item type, and map the contents of the referenced record type to that attribute so that they can be displayed. For example, assume the Defect record type contains a field that is a reference to a Customer record type. The Customer record type contains Name, Company, and E-mail fields.

To enable the display of the contents of a referenced record in a work item even if there is no corresponding Rational Team Concert item type:

Procedure

  1. Create a synchronization rule for the referenced record type (for example, Customer). In the Team Artifacts view, right-click the repository connection and select Administer > Synchronization Rules. In the Synchronization Rules view, right-click the project area and select New > Synchronization Rule.
  2. In the Synchronization Rule editor, enter a unique name for the rule in the Name property. In the Type Mapping section, select the External repository. In the External type field, select the record type (for example, Customer). In the Property Mappings section, click Add to add external properties for the fields in the referenced record type that you want to display (for example, Name, Company, and E-mail). Do not specify corresponding item properties. In the Mapping Details section, in the Synchronization field, select None. Click Save to save the synchronization rule.
  3. Create a custom attribute that corresponds to the referenced record type. In the Team Artifacts view, double-click the project area to open it in the Project Area editor. Click the Process Configuration tab. Expand Project Configuration, then Configuration Data, and then Work Items. Click Types. On the Project Configuration page, expand Project Configuration, then Configuration Data, and then Work Items. Click Types. Select the work item type category. In the Custom Attributes area, click Add. Enter a name for the attribute (for example, Customer), and select a string type. Click OK. Click Save to save your changes to the work item type.
  4. Open the synchronization rule for the parent record type (in this example, Defect). In the Property Mappings section, click Add. In the Item Property cell, enter the name of the custom attribute (for example, Customer). In the External Property cell, select the name of the reference field in the parent record type (for example, Customer). In the Synchronization field, select In. In the Reference synchronization rule field, select the synchronization rule for the referenced record type (for example, the synchronization rule for the Customer record type). In the Value transformer field, select Display Referenced Record Fields in Custom Attribute Transformer. Click Save to save your changes to the synchronization rule. Because this transformer is for display purposes, it supports only incoming synchronization.

Feedback

Did this help? You can provide feedback at Jazz.net (registration required): Comment in the forums or submit a bug