Using the QC connector to link a story to a test case in Rally
The goal of this setup is to make sure that when a test is copied from QC to Rally, it is linked to a pre-existing user story in Rally by following the steps below. On Rally side the linking happens via a WorkProduct field of TestCase object.
Create a user field in QC for Test artifact to hold Rally Formatted ID. The field must be of type String.b) Add this mapping to the <FieldMapping> section of the config file for tests/test cases:
<Field><Rally>WorkProduct</Rally><Other>TS_USER_02</Other></Field>
Add <RallyReferenceFieldHandler> to the <RallyFieldHandlers> section of the same config:
<RallyReferenceFieldHandler>
<FieldName>WorkProduct</FieldName>
<ReferencedFieldLookupID>FormattedID</ReferencedFieldLookupID>
</RallyReferenceFieldHandler>
</RallyFieldHandlers>
Here is an example of the syntax in the context of <Connector> section of the xml config file
<Connector>
<FieldMapping>
<Field><Rally>Name</Rally><Other>TS_NAME</Other></Field>
<Field><Rally>WorkProduct</Rally><Other>TS_USER_02</Other></Field>
<Field><Rally>Description</Rally><Other>TS_DESCRIPTION</Other></Field>
</FieldMapping>
<RallyFieldHandlers>
<RallyReferenceFieldHandler>
<FieldName>WorkProduct</FieldName>
<ReferencedFieldLookupID>FormattedID</ReferencedFieldLookupID>
</RallyReferenceFieldHandler>
</RallyFieldHandlers>
</Connector>
Run the connector. The test case is created in Rally, linked to a Rally story.