Linking by attribute

You can quickly and automatically create links between multiple artifacts by artifact attribute.

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 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 MyString.
  • Add the MyString attribute to a Feature artifact type.
  • Change the column headings in a sample module to display the MyString attribute.
Then, the example shows how to add artifact IDs of the artifacts to link to in the MyString attribute, and how to run the Link by Attribute function to automatically create the links.
  1. Click the Administration icon Administration icon and select Manage Project Properties.
    Note: If configuration management is enabled for your project, on the Administration menu, click Manage Component Properties.
  2. Click the Artifact Attributes tab. On the Artifact Attributes page, click New Attribute and create a custom attribute that is called MyString with a string data type.
    Note: You can use any custom attribute type if the type is string and is not a predefined system attribute.
  3. Click the Artifact Types tab and select the Feature attribute from the Artifact Types section.
    screen cap selecting feature attribute from the artifact types
  4. From the Add Attribute page, select the MyString attribute, and click OK.
    screen cap adding attribute to artifact type
  5. Click the Artifact tab and then click the Modules tab. Create a sample module that contains several Feature artifacts.
  6. Change the column headings in the module to show the new MyString attribute column and the Linked To column.
    screen cap of display settings
    The sample module is displayed with the new columns:
    screen cap of new columns
  7. To create links from Feature 1 to the rest of the features, type the ID of each target artifact (separated by commas) in the MyString column.
    Create links from an artifact
  8. Then, to automatically create the links, select the check boxes that are next to the artifacts, and right-click Link by Attribute for 5 Artifacts.
    screen cap of link by attribute menu
  9. In the Link by Attribute window, select MyString from the Attribute list and select Link To from the Link Type list. Click OK.
    link by attribute window
    The links that you specified are automatically created in the Link To column.
    type alt text here
  10. Complete the following steps to create links from feature type attributes between two modules:
    1. 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:
      module one screen cap
    2. 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:
      side by side graphic of mod1 and mod2
    3. 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 image:
      screen cap showing new inter module link