Creating a work item template
To create a work item template, create one or more work items that contain the field values that you want to use in the template. Then, include those work items in the template.
Before you begin
About this task
- Create one or more work items to include in the template. Populate the work item fields with the values to use in the work items that you create based on the template.
Add links to establish relationships between the work items.
For example, you might want to use parent and child links to create a hierarchy of work items.Restriction: Work item templates support only item links, for example, parent-child, but not URI links, for example,Tracks. The only exception to these URI links are: Mentions, Related Artifacts , and Attachments.
In the Eclipse client, complete the following steps:
In the Work Items view, select the work items to include in the
For example, to include three work items in the template, run a query with the parameters that include all three work items in the results.
- In the Work Items view, from the query results, select the work items to include in the template.
- Right-click the selected work items and click Create Work Item Template.
- In the Work Items view, select the work items to include in the template.
In the web client, complete the following steps:
- Run a query with the parameters that you want to include in the work item template.
- On the query results page, on the toolbar, click Create Work Item Templates .
- Select the work items to include in the template.
- In the Create Template from Work Items section, click Create Work Item Template.
In the Create Work Item Template wizard, on the Select Work
Items for the Template page, enter a name and a description for the template.
Tip: You can remove one or more of the work items by clearing the check box next to each item that you do not want to include in the template.
- In the web client, the work items that you selected in step 4 are listed. If these items have related links, click the arrow next to each work item to display the links. Then, select the related links to include in the new template.
- In the Eclipse client, add work items by clicking Add and searching for them.
Use the Define Attribute Variables page to define the Filed
Against and Planned For attributes as template variables.
Note: When you define these attributes as template variables, you can set the attribute values each time that you use the template to create work items. If you do not define these attributes as template variables, their values are inherited from the project area where the template was created. If you later import the template into another project area with different team areas and a different timeline structure, an error similar to this one is displayed:
Cannot save the work item template on the server. Value "Scrum/Team" cannot be assigned to attribute "ChangeRequest:filedAgainst"
In this example, Scrum/Team is the name of the team area that is stored in the Filed Against attribute in the work item template.
When you import a template into a new project area, you can assign values to the attributes that are defined as template variables. For all other attributes, the field values in the work items that you used to create the template are used in the new work items.
If the Next button is enabled, click it. Otherwise, click
Note: The Next button is enabled when one or more of the work items that you selected to create the template include one or more string variables in their Summary or Description fields. The string variables must be defined in the following format:
idcontains only alphanumeric and underscore characters.
On the Define String Variables page, select the check box next to the
variables to include in the template.
Tip: When the template is instantiated, each variable is replaced with a user-specified value.
For each variable that you select, type a name in the Variable Name
The variable name is the name that a user sees when they instantiate the template.
- Optional: In the Default Value field, change the default value for the variable.
- Click Finish.
- On the Define String Variables page, select the check box next to the variables to include in the template.