The RTC has many types of links that we can use, but depending on the software development process of your business, you may feel the need to create a new type of relationship between WorkItems. In my opinion, this creation of new link types, although not very complicated, could be more simplified.
Anyone who has read the previous posts or have developed some plugin for RTC will have no difficulty in creating a new type of link, because it is nothing more than a plugin. The main difference is that you have to install the plugin on the server and if you use the Ide Client you have to install the eclipse plugin directly into the client as well.
As I said earlier a link type is a plugin, so the first step is to create a Plug-in Project
Name your plugin, in our case we call it rtc_rework_link, as it will indicate that a workitem is a Rework opened by another (Rework Opener). Remember, do not select any additional options to create the plugin.
Go to Dependencies tab and add the plugin com.ibm.tean.repository.common
Now, go to the Extensions tab, add the Extension Point com.ibm.team.repository.common.linkTypes. Then right click on newly created item, choose New -> LinkTypes. Fill out the following properties:
In plugin.xml tab, which is actually the source code of the plugin, add the elements <source> and <target> to the <linkType> element that was created in the previous step. Note that you can skip the previous step and configure directly the plugin.xml with all options. I chose to show the previous step so that you can relate the tab with the xml element.
The above code defines a type of link that connects two WorkItems (itemReferenceType). One source WorkItem will be called Rework and has cardinality 0..n, and the target WorkItem will be called WorkItem Rework Opener and have cardinality 0..1.
There, the plugin is finished. Only thing left is the well-known steps of creating a feature for the plugin, create the update site for the feature and deploy the site on the server. If you have questions regarding these steps take a look at this post to remember.
As I mentioned at the beginning of the post, if you use the RTC Client (Eclipse) will need to install the plugin directly on the client. This is done in the same way you install any plugin via the Eclipse Update Sites. Access: Help -> Install New Software... . Click Add to add the new site, choose the location where the Update Site was compiled, select your plugin and install it normally.
Any questions just email me, tweet or comment here. See you!