Rally - TFS - TFS WIC config Stories and Linked Tasks pxml
search cancel

Rally - TFS - TFS WIC config Stories and Linked Tasks pxml

book

Article ID: 125022

calendar_today

Updated On:

Products

Rally On-Premise Rally SaaS

Issue/Introduction

Use this set of configuration files to copy Rally Stories and their associated tasks to TFS2012

Resolution

TFS2012-Config-Stories-and-Linked-Tasks.pxml

Use this set of configuration files to copy CA Agile Central Stories and their associated tasks to TFS2012 (maintaining the Story/Task association in TFS2012). This example uses <TFSTreePathFieldHandler> and the two <RelatedObjectLinkers> elements called <TFSTaskToParentLinker/> and <RallyTaskToWorkProductLinker/>.

The following sections relate to this TFS2012 workitem connector run:

  • UserStory Configuration File: x006-Test-Story.xml
  • Task Configuration File: x006-Test-Task.xml
  • Credentials Configuration File: Encoded-Credentials-Rally.xml

 

UserStory Configuration File x006-Test-Story.xml

<?xml version="1.0"?>
<!DOCTYPE config SYSTEM "config.dtd" [
<!ENTITY Encoded-Credentials-Rally SYSTEM "Encoded-Credentials-Rally.xml">
]>
<Config>
    <RallyConnection>
        <Url>rally1.rallydev.com</Url>
        <WorkspaceName>Testing</WorkspaceName>
        <Projects>
            <Project>TFStestProj</Project>
        </Projects>
<!-- ===============================================
       <User>[email protected]</User>
       <Password>encoded-x-x-x-x-x-x-x-x-x-x-x-=-</Password>
================================================ -->
        &Encoded-Credentials-Rally;
<!-- ============================================= -->
        <ArtifactType>UserStory</ArtifactType>
        <ExternalIDField>TFSPR01ExtID</ExternalIDField>
        <CrosslinkUrlField>TFSPR01Url</CrosslinkUrlField>
        <SuppressDeprecationWarning />
        <FieldDefaults>
            <Field><Name>JPselect</Name><Default>TFStest</Default></Field>
        </FieldDefaults>
        <CopySelectors>
            <CopySelector>JPselect = TFStest</CopySelector>
        </CopySelectors>
        <UpdateSelectors>
            <UpdateSelector>JPselect = TFStest</UpdateSelector>
        </UpdateSelectors>
    </RallyConnection>

    <TFSConnection>
        <Collection>http://<SERVER_NAME>:8080/tfs/Rally</Collection>
        <TeamProject>Integration-Test</TeamProject>
        <ArtifactType>User Story</ArtifactType>
        <IDField>System.Id</IDField>
        <ExternalIDField>Rally.Common.ExternalId</ExternalIDField>
        <ExternalEndUserIDField>Rally.Common.FormattedID</ExternalEndUserIDField>
        <CrosslinkUrlField>Rally.Common.Link</CrosslinkUrlField>
        <FieldDefaults>
            <Field><Name>Rally.Common.JPselect</Name><Default>TFStest</Default></Field>
        </FieldDefaults>
        <CopySelectors>
            <CopySelector>Rally.Common.JPselect = TFStest</CopySelector>
        </CopySelectors>
        <UpdateSelectors>
            <UpdateSelector>Rally.Common.JPselect = TFStest</UpdateSelector>
        </UpdateSelectors>
    </TFSConnection>

    <Connector>
        <FieldMapping>
            <Field><Rally>Name</Rally>          <Other>System.Title</Other>         </Field>
            <Field><Rally>Description</Rally>   <Other>System.Description</Other>   </Field>
            <Field><Rally>ScheduleState</Rally> <Other>System.State</Other>         </Field>
            <Field><Rally>Project</Rally>       <Other>System.AreaPath</Other>      </Field>
            <Field><Rally>Owner</Rally>         <Other>System.AssignedTo</Other>    </Field>
        </FieldMapping>

        <OtherFieldHandlers>
            <OtherEnumFieldHandler>
                <FieldName>System.State</FieldName>
                <Mappings>
                    <Field><Rally>Defined</Rally>       <Other>Active</Other></Field>
                    <Field><Rally>In-Progress</Rally>   <Other>Active</Other></Field>
                    <Field><Rally>Completed</Rally>     <Other>Closed</Other></Field>
                    <Field><Rally>Accepted</Rally>      <Other>Closed</Other></Field>
                </Mappings>
            </OtherEnumFieldHandler>

            <TFSTreePathFieldHandler>
                <FieldName>System.AreaPath</FieldName>
                <Prefix>Integration-Test</Prefix>
            </TFSTreePathFieldHandler>

            <OtherEnumFieldHandler>
                <FieldName>System.AssignedTo</FieldName>
                <Mappings>
                    <Field><Rally>[email protected]</Rally>   <Other>jpkole</Other></Field>
                </Mappings>
            </OtherEnumFieldHandler>
        </OtherFieldHandlers>

        <RallyFieldHandlers>
            <RallyUserFieldHandler>
                <FieldName>Owner</FieldName>
                <ReferencedFieldLookupID>UserName</ReferencedFieldLookupID>
            </RallyUserFieldHandler>
        </RallyFieldHandlers>

<!-- Another way to map usernames between the system:
    http://help.rallydev.com/rally-integrations-faq-and-best-practices#Mapping-users-using-a-lookup-field
       <RallyFieldHandlers>
           <RallyUserFieldHandler>
               <FieldName>Owner</FieldName>
               <ReferencedFieldLookupID>MiddleName</ReferencedFieldLookupID>
           </RallyUserFieldHandler>
       </RallyFieldHandlers>
-->
    </Connector>

    <ConnectorRunner>
        <Preview>false</Preview>
        <LogLevel>Debug</LogLevel>
        <Services>COPY_RALLY_TO_TFS,  UPDATE_TFS_TO_RALLY</Services>
    </ConnectorRunner>
</Config>

 

Task Configuration File x006-Test-Task.xml

<?xml version="1.0"?>
<!DOCTYPE config SYSTEM "config.dtd" [
<!ENTITY Encoded-Credentials-Rally SYSTEM "Encoded-Credentials-Rally.xml">
]>
<Config>
    <RallyConnection>
        <Url>rally1.rallydev.com</Url>
        <WorkspaceName>Testing</WorkspaceName>
        <Projects>
            <Project>TFStestProj</Project>
        </Projects>
<!-- ===============================================
       <User>[email protected]</User>
       <Password>encoded-x-x-x-x-x-x-x-x-x-x-x-=-</Password>
=============================================== -->
        &Encoded-Credentials-Rally;
<!-- ========================================== -->
        <ArtifactType>Task</ArtifactType>
        <ExternalIDField>TFSPR01ExtID</ExternalIDField>
        <CrosslinkUrlField>TFSPR01Url</CrosslinkUrlField>
        <WorkProductType>Story</WorkProductType>
        <WorkProductExternalIDField>TFSPR01ExtID</WorkProductExternalIDField>
        <SuppressDeprecationWarning />
        <FieldDefaults>
            <Field><Name>JPselect</Name><Default>TFStest</Default></Field>
        </FieldDefaults>
        <CopySelectors>
            <CopySelector>JPselect = TFStest</CopySelector>
        </CopySelectors>
        <UpdateSelectors>
            <UpdateSelector>JPselect = TFStest</UpdateSelector>
        </UpdateSelectors>
    </RallyConnection>

    <TFSConnection>
        <Collection>http://<SERVER_NAME>:8080/tfs/Rally</Collection>
        <TeamProject>Integration-Test</TeamProject>
        <ArtifactType>Task</ArtifactType>
        <IDField>System.Id</IDField>
        <ExternalIDField>Rally.Common.ExternalId</ExternalIDField>
        <ExternalEndUserIDField>Rally.Common.FormattedID</ExternalEndUserIDField>
        <CrosslinkUrlField>Rally.Common.Link</CrosslinkUrlField>
        <ParentType>User Story</ParentType>
        <ParentExternalIDField>Rally.Common.ExternalId</ParentExternalIDField>
        <FieldDefaults>
            <Field><Name>Rally.Common.JPselect</Name><Default>TFStest</Default></Field>
        </FieldDefaults>
        <CopySelectors>
            <CopySelector>Rally.Common.JPselect = TFStest</CopySelector>
        </CopySelectors>
        <UpdateSelectors>
            <UpdateSelector>Rally.Common.JPselect = TFStest</UpdateSelector>
        </UpdateSelectors>
    </TFSConnection>

    <Connector>
        <FieldMapping>
            <Field><Rally>Name</Rally>          <Other>System.Title</Other>         </Field>
            <Field><Rally>Description</Rally>   <Other>System.Description</Other>   </Field>
            <Field><Rally>State</Rally>         <Other>System.State</Other>         </Field>
            <Field><Rally>Project</Rally>       <Other>System.AreaPath</Other>      </Field>
            <Field><Rally>Owner</Rally>         <Other>System.AssignedTo</Other>    </Field>
        </FieldMapping>

        <OtherFieldHandlers>
            <OtherEnumFieldHandler>
                <FieldName>System.State</FieldName>
                <Mappings>
                    <Field><Rally>Defined</Rally>       <Other>Active</Other></Field>
                    <Field><Rally>In-Progress</Rally>   <Other>Active</Other></Field>
                    <Field><Rally>Completed</Rally>     <Other>Closed</Other></Field>
                </Mappings>
            </OtherEnumFieldHandler>

            <TFSTreePathFieldHandler>
                <FieldName>System.AreaPath</FieldName>
                <Prefix>Integration-Test</Prefix>
            </TFSTreePathFieldHandler>

            <OtherEnumFieldHandler>
                <FieldName>System.AssignedTo</FieldName>
                <Mappings>
                    <Field><Rally>[email protected]</Rally>   <Other>jpkole</Other></Field>
                </Mappings>
            </OtherEnumFieldHandler>
        </OtherFieldHandlers>

        <RallyFieldHandlers>
            <RallyUserFieldHandler>
                <FieldName>Owner</FieldName>
                <ReferencedFieldLookupID>UserName</ReferencedFieldLookupID>
            </RallyUserFieldHandler>
        </RallyFieldHandlers>

<!-- Another way to map usernames between the system:
    http://help.rallydev.com/rally-integrations-faq-and-best-practices#Mapping-users-using-a-lookup-field
       <RallyFieldHandlers>
           <RallyUserFieldHandler>
               <FieldName>Owner</FieldName>
               <ReferencedFieldLookupID>MiddleName</ReferencedFieldLookupID>
           </RallyUserFieldHandler>
       </RallyFieldHandlers>
-->
        <RelatedObjectLinkers>
            <TFSTaskToParentLinker/>
            <RallyTaskToWorkProductLinker/>
        </RelatedObjectLinkers>
    </Connector>

    <ConnectorRunner>
        <Preview>false</Preview>
        <LogLevel>Debug</LogLevel>
        <Services>COPY_RALLY_TO_TFS,  UPDATE_TFS_TO_RALLY</Services>
    </ConnectorRunner>
</Config>

Credentials Configuration File Encoded-Credentials-Rally.xml

<User>[email protected]</User>
<Password>encoded-x-x-x-x-x-x-x-x-x-x-x-=-</Password>