Defining custom asset attributes

Repository administrators create the requirements for customizable asset information, called attributes that can be shared across asset types. Administrators can set custom attributes to require users to provide classification that fits a specific context.

Before you begin

You must be a repository administrator to create custom asset attributes.

About this task

Custom attributes are useful for describing the capabilities or characteristics of an asset. When a user submits an asset, descriptions are visible when the user hovers over the attribute names, providing additional context for using the attributes effectively.

Custom attributes can be uniquely searched on. For example, you could create an attribute Supported by which will allow users to search for all assets supported by a specific user.

You can specify default values for some attribute types. For example, if you know the support contact will be the same person for assets in a specific department you can include a set value for that attribute to save users time during asset submission.

Procedure

  1. Log in to the web application.
  2. Click Administration.
  3. From the Repository Administration sidebar, click Asset Attributes.
  4. To create a new attribute in the repository, click New Attribute.
  5. From the Type list, select the appropriate data type of the attribute and click OK. You can select from the following attribute types:
    • Text - Plain text; you can either let users type their own values or define one or more values to choose from.
    • Date - Date values; you can optionally define a minimum, maximum, or default date.
    • User - Repository user and user group values.
    • Number - Numerical values; you can optionally define a minimum, maximum, or default value.
    • Boolean - True or False; you can define a default value.
    • Link - A URL value.
    • XML - The content of an XML file that is attached to the asset. To extract information from artifacts, define the file types that could include XML content, the appropriate namespace mappings, and the XPATH expressions .
    • Resource - The links to one or more resources from an IBM® Jazz™ server such as IBM Rational® Team Concert. To use this attribute type, you must add a Jazz server as a friend server . For more information, see Creating or linking to work items on IBM Jazz servers from assets and Integrating with Jazz servers
  6. On the Attribute page, describe the new attribute.
    1. In the Name field, type a name.
    2. In the Description field, type a meaningful description. This description is shown when users move the cursor over the attribute name from the general details of an asset.
    3. Depending on the type of attribute, you can define additional rules for the attribute values, such as minimum, maximum, predefined, or default values. For example, select Multi-valued for link, user, or text attributes to allow those attributes to be set to multiple values.
      If you are creating a text attribute, you can specify a regular expression that controls the text that can be entered:
      1. Type a regular expression in the Pattern field in the Constraints section. For example, to constrain the attribute to be a string of five numbers, type \d{5}. For more information about regular expressions, see http://www.regular-expressions.info/.
      2. Type an Error message to be displayed when the entered text does not match the regular expression.
      3. Test the regular expression by typing in the field at the bottom of the Constraints section. If the text does not match the regular expression, the text box is displayed in red.
      If you are creating an XML attribute, do these steps:
      1. Upload a sample XML file that is representative of the XML files that you expect to be added as artifacts. You can upload only one XML file at a time.
      2. Click Add File Type and type a file extension for the XML files that contain content that you want to be used as attributes; for example, wsdl. Enter only one file extension at a time.
      3. To declare a namespace mapping, either click Add Namespace Mapping and type a prefix and URI manually (for example, wsdl and http://schemas.xmlsoap.org/wsdl/, respectively), or have the namespace mappings automatically detected by clicking Add From Sample.
      4. In the XPATH Expression section, type an XPATH expression that defines the value that would be set for the attribute; for example, //wsdl:portType. You can click Test Sample to see what value would be returned from the sample XML file that you uploaded.
  7. Click OK.

What to do next

To remove an attribute click Delete on the Asset Attributes page.

To edit the name, description, or preset value for an attribute, click Edit.

To locate an existing asset attribute to modify, enter the name of the attribute in the Filter field for quick identification in long lists.


Feedback