Define Template Work Items

A template Work Item is a Work Item that provides default content such as Description, and default field values for a specific Work Item type. For example, the template item for a Defect or a Test Case might have boilerplate text in the Description field, and/or some specific values set for fields such as Assignee, Priority, etc. or custom fields.

Before creating a template Work Item, its type must already be defined in the project configuration. In other words, before you can create a template item for a Defect, the Defect type must be defined in the enumeration for Work Item types in the project configuration.

Once the Work Item type exists, there are 2 steps to create a template Work Item:

  1. Create a Work Item of the desired type in the tracker and define default content and field values.

  2. Specify the ID of the template item in the definition of the Work Item type in the project configuration.

Create a template Work Item:

  1. Log on with administrator permissions and open your project if not already opened.

  2. In Navigation, select Work Items to load the Table view of Work Items.

  3. Create a new Work Item of the type for which you want to create a template. For example, create a new Defect item to be the template for all new Defect items.

  4. Enter a title such as Defect Template.

  5. In the Description field, enter any boilerplate text you want users to see when the create a new item of this type. For example, the Description field might contain instructions on what information must be entered in the field. (The boilerplate text appears in the Description field of new Defect items created by users, and users can then replace it with their own text.)

  6. Set default values for other fields if desired. Keep in mind that default value for Status is set by the workflow, and Severity can be defined in the Severity enumeration in the project configuration. Your focus here is most likely to be on any custom fields for which a default should be set for new items of the type.

  7. Save the new item. Make a note of the new item's ID, as you need it in the next process step, which is to specify the ID of the template item in the Work Item type configuration.

To specify the template item in the Work Item type configuration:

  1. Enter Administration and in Navigation, expand Work Items and select Enumerations.

  2. On the Enumerations page, locate the row for the workitem-type-enum.xml configuration file and click Edit on that row.

  3. In the configuration editor, locate the row for the type of the template item you created. If that was a Defect type item, for example, you want the row for the Defect type.

  4. In the Template column on the row, enter the ID of the template item you created.

    (You can optionally click the icon and query for and select the template item in the Work Item picker dialog box.)

  5. Click Save to finish.

You need to repeat this entire process for each Work Item type for which you want to have a template Work Item.

Field values not copied

When a user creates a new Work Item based on a template Work Item, values in the following fields of the template item are not copied to the new item:

  • approvals

  • assignee

  • attachments

  • author

  • categories

  • comments

  • created

  • hyperlinks

  • linkedWorkItems

  • resolution

  • resolvedOn

  • status

  • title

  • votes

  • watches

  • workRecords

Note that images are technically attachments, which currently are not copied to new items. Therefore, images appearing in the Description field and rich-text custom fields of the template item do not appear in these fields of new items.