Linking by attribute
You can quickly and automatically create links between multiple artifacts by artifact attribute.
Before you begin
You can use the Link by Attribute function to automatically create, update, and delete links between artifacts based on an attribute value. To use this feature, type the artifact IDs of the target artifacts (separated by commas) in a custom string attribute type, select Link by Attribute and then follow the prompts. You can use this function in a module, a collection, or in any artifact view.
Note: This feature can also be used in conjunction with the CSV round-trip support to handle creating and changing links when you import data.
The following example provides a more thorough explanation of how the Link by Attribute function works. The examples show how to create links between multiple artifacts in a single module and between artifacts in different modules. First, the example shows how to complete these tasks:
- Create a custom attribute called
- Add the
MyStringattribute to a Feature artifact type.
- Change the column headings in a sample module to display the
MyStringattribute, and how to run the Link by Attribute function to automatically create the links.
Click the drop-down menu for the Administration icon and select Manage Project Properties.
Note: If configuration management is enabled for your project, on the Administration menu, click Manage Component Properties.
On the Artifact Attributes page, click New Attribute and create a custom
attribute that is called
MyStringwith a data type of
string, as shown in the following image:Note: You can use any custom attribute type as long as the type is
stringand is not a predefined system attribute.
Add the newly created
MyStringattribute to a Feature artifact type, as shown in the following image:
- Create a sample module that contains several Feature artifacts.
Change the column headings in the module to show the new
MyStringattribute column and the
Linked Tocolumn, as shown in the following image:The sample module is displayed with the new columns:
To create links from Feature One to Feature Two, Feature Three, Feature Four, and Feature Five.
To create these links, type the ID of each target artifact (separated by commas) in the
MyStringcolumn, as shown in the following image:
Then, to automatically create the links, select the check boxes for the artifacts and click , as shown in the following image:
In the Link by Attribute window, in the Attribute
field, select MyString and, in the Link type field,
select Link To. Click OK.The links that you specified are automatically created, as shown in the Link To column in the following image:
To create a link from Feature 3 to an artifact in another module, such as to Feature 10 in
Module Two, enter the artifact ID of Module Two (377) and the ID of Feature 10 (378), separated by a
period, as shown in the following image:
Then, select Feature Three (in Module One) and Feature 10 (in Module Two) as shown in the
following side-by-side view of both modules:
Then, run Link By Attribute and enter the
Attribute and Link To data in the Link by
Attribute window. When you click OK, the link is automatically
created in the Link To column in Module One, as shown in the following