Jazz Library Tip: Migrating Work Item URL Links
Author name

Tip: Migrating Work Item URL Links

Summary

This tip applies to how RTC 3.x. work items can link to related artifacts or CLM resources such as test cases or requirements. These links are stored as absolute URLs in the RTC repository. If the target server is moved to a new address, these links become stale. For example: In RTC 3.0, the CQ Bridge was decommissioned, and these links need to be retargeted to the CQ server. This tip describes how to do that.

More Information

The functionality to rewrite Work item URL links is part of repotools. The command is -modifyLinkURIs, and the following parameters are supported:

  • linkTypeId=<value>: The ID of the type of link to modify, for example com.ibm.team.workitem.linktype.relatedChangeManagement.

    The following link types are supported:

    Link NameTarget Application TypeLink Type Id
    Related Artifactany locationcom.ibm.team.workitem.linktype.relatedartifact
    Related Change RequestCMcom.ibm.team.workitem.linktype.relatedChangeManagement
    Affects Plan ItemCMcom.ibm.team.workitem.linktype.cm.affectsPlanItem
    Affected By DefectCMcom.ibm.team.workitem.linktype.cm.affectedByDefect
    Tested By Test CaseQMcom.ibm.team.workitem.linktype.testedByTestCase
    Blocks Test ExecutionQMcom.ibm.team.workitem.linktype.blocksTestExecutionRecord
    Affects Test ResultQMcom.ibm.team.workitem.linktype.affectsExecutionResult
    Related Test CaseQMcom.ibm.team.workitem.linktype.qm.relatedTestCase
    Related Test Execution RecordQMcom.ibm.team.workitem.linktype.qm.relatedExecutionRecord
    Related Test PlanQMcom.ibm.team.workitem.linktype.qm.relatedTestPlan
    Affects RequirementRMcom.ibm.team.workitem.linktype.rm.relatedRequirement
    Implements RequirementRMcom.ibm.team.workitem.linktype.implementsRequirement
    Tracks RequirementRMcom.ibm.team.workitem.linktype.rm.tracksRequirement
    Elaborated By Architecture ElementAMcom.ibm.team.workitem.linktype.am.elaboratedBy
    Change SetsSCMcom.ibm.team.workitem.linktype.scm.tracksChanges
  • find=<value>: A string inside of a URL to find and replace, for example https://<rtc-server>:<port>/jazz/oslc/cqrest/
  • replace=<value>: The new string to replace the existing string, for example https://<cq-server>:<port>/cqweb/oslc/

Please note that this command will only rewrite the links themselves. References to URLs within work item descriptions or comments will not be replaced.

Example #1: Change web app root

The following command changes the webapp context root of the links from /jazz to /ccm

  ./repotools-jazz.sh -modifyLinkURIs   	linkTypeId=com.ibm.team.workitem.linktype.relatedChangeManagement   	find=https://clmwb:9443/jazz /  	replace=https://clmwb:9443/ccm/  

The log will contain a detailed trace of the renaming operations performed:

log example

Example #2: Change URLs from CQ Bridge to CQ

The following command shows the typical usage for migrating a CQ Bridge setup to a CLM/OSLC based one:

  ./repotools-jazz.sh -modifyLinkURIs   	linkTypeId=com.ibm.team.workitem.linktype.relatedChangeManagement  	find=http://rtc-server:port/jazz/oslc/cqrest/  	replace=http://cq-server:port/cqweb/oslc/  

Related Information

The following links point to related information:


Fri, 20 May 2011