David Rogers
David Rogers

Reputation: 2653

How to add a new Activity type to the Task work item in TFS 2018

I would like to do exactly what is being proposed in this question, but instead of VSTS, I'd like to do it in on a On-Premise TFS(2018):

"Is it possible to add a new Activity type on the Task work item in VSTS and, if so, how can I do it? Thanks!"

I've followed the instructions explained here to export and modify my custom project template. However when I follow the instructions here(Step 5 of the original instructions) I get stuck at the "Configure Features" step, that does not appear in my implementation of TFS (Yes, my user account is part of "Project Collection Administrators"): enter image description here enter image description here

I'm sort of confused, there are people that claim this can't be done. In fact it's even stated in the process page:

"Changes you make to a process template will only apply to new team projects. They will not affect existing team projects."

But the instructions clearly indicate that it can be, I just done see the "Configure features" link? The instructions indicate that the use case is after a TFS update, but if I just changed my custom template, how would I enable this, so I can implement my changes in the custom template?

Upvotes: 2

Views: 2464

Answers (1)

Andy Li-MSFT
Andy Li-MSFT

Reputation: 30442

Try below ways to achieve that:

  • Import, export, and manage work item types with witadmin

    1. Export the specific work item type definition file (Task in your scenario). Run command prompt with administrator, if you are using VS 2017, then cd C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer

      witadmin exportwitd /collection:http://server:8080/tfs/DefaultCollection /p:ProjectName /f:C:\temp\MyTask.xml /n:Task

    2. Edit the exported WIT definition file (xml) with text editor, add a new Activity Type (e.g.: TestActivity0727in below sample) like below:

      enter image description here

    3. Save the file and import to TFS with witadmin command:

      witadmin importwitd /collection:http://server:8080/tfs/DefaultCollection /p:ProjectName /f:C:\temp\MyTask.xml /n:Task

    4. Refresh the page, now the new activity should be worked in Task work item.
  • Edit with TFS Process Template Editor, reference below screenshot:

    For VS 2017, install the extension TFS Process Template Editor

    For VS 2015, just install Microsoft Visual Studio Team Foundation Server 2015 Power Tools

enter image description here

Upvotes: 3

Related Questions