Search code examples
tfstfs-workitemworkitem

How to set New Template of a workitem as default in TFS?


In TFS 2017, I created a new template for a workitem (out of the box) with the necessary fields. How can this template be set as default, so that any workitems created further will have the new template.

I could see bulk update of the Workitems, but not setting it as default.


Solution

  • It doesn't support to set the template as a default template currently in TFS 2017.

    As a workaround, you could set default vaules for fields in workitem definition files instead of using workitem template.

    For example, set the default vaule for Description field:

    1. Export the workitem definition file using witadmin command:
    2. Add a default rule for Description field:

      <FIELD name="Description" refname="System.Description" type="HTML"> <DEFAULT from="value" value="*****" /> </FIELD>

    3. Save and import your workitem definition file.

    Another workaround is you could add template links to a Markdown widget that appear on your team dashboard in the web portal. Then you could create workitem from this links on dashboard.

    In the Markdown widges, config links like [link description](Url).

    [Bug -- Template1](http://fabrikamfiber:8080/tfs/DefaultCollection/Fabrikam%20Fiber/Web/_workItems?_a=new&witd=Bug&templateId=15ffa521-7a1d-486e-9f71-a58c0b338d87)