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 Name Target Application Type Link Type Id Related Artifact any location com.ibm.team.workitem.linktype.relatedartifact
Related Change Request CM com.ibm.team.workitem.linktype.relatedChangeManagement
Affects Plan Item CM com.ibm.team.workitem.linktype.cm.affectsPlanItem
Affected By Defect CM com.ibm.team.workitem.linktype.cm.affectedByDefect
Tested By Test Case QM com.ibm.team.workitem.linktype.testedByTestCase
Blocks Test Execution QM com.ibm.team.workitem.linktype.blocksTestExecutionRecord
Affects Test Result QM com.ibm.team.workitem.linktype.affectsExecutionResult
Related Test Case QM com.ibm.team.workitem.linktype.qm.relatedTestCase
Related Test Execution Record QM com.ibm.team.workitem.linktype.qm.relatedExecutionRecord
Related Test Plan QM com.ibm.team.workitem.linktype.qm.relatedTestPlan
Affects Requirement RM com.ibm.team.workitem.linktype.rm.relatedRequirement
Implements Requirement RM com.ibm.team.workitem.linktype.implementsRequirement
Tracks Requirement RM com.ibm.team.workitem.linktype.rm.tracksRequirement
Elaborated By Architecture Element AM com.ibm.team.workitem.linktype.am.elaboratedBy
Change Sets SCM com.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:
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:
© Copyright 2010, 2012 IBM Corporation