How to add a custom field in TFS Express? - tfs

I'm working on a project which will need to use some custom fields in TFS. I'm working on this using a TFS Express installed on my local machine.
But I could not figure out how to add custom fields to the TFS Express. The doc I could find is for VSTS.
Can we add custom fields in TFS Express? How?
Thanks

In short, you need to modify your process template XML. It's way too big a topic to go into in any detail here, so consult the documentation. What you're looking for is the "on-premises XML" model.
The basic step-by-step is:
Export your work item with witadmin
Modify the XML with your editor of choice
Import the work item with witadmin
Another option is to use the Process Template Editor plugin for Visual Studio.
However, please see my comment regarding your choice to install TFS Express over using VSTS. A workstation is not a realistic TFS environment.

Related

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"):
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?
Try below ways to achieve that:
Import, export, and manage work item types with witadmin
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
Edit the exported WIT definition file (xml) with text editor, add a new Activity Type (e.g.: TestActivity0727in below
sample)
like below:
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
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

Estimating LOE for TFS Customization - add a WIT to a project

For a full-time TFS admin professional, about how many hours would go into "customizing" an existing scrum template project to add an additional work item type?
The easiest way to add a new WIT is to copy an existing WIT and then modify the definition file. You have two options to achieve it:
You can install TFS Power Tools, this tool provides an add-in to the Team menu and a new section on the Work Items page in Team Explorer. Use this tool to create new work items with default values, or to easily apply values to existing work items.
You can export the a WIT definition files, and edit it, then import it. Useful links:
https://www.visualstudio.com/en-us/docs/work/customize/add-modify-wit#add-wit
https://msdn.microsoft.com/en-us/library/ms404855.aspx
Regarding how many hours it will cost, it depends on your detailed requirement and whether you are familiar with TFS Power Tools and WIT definition files. If you just want to create a new WIT based an existing WIT, and just add some field, it will only need several minutes with TFS Power Tool.

Remove TFS process template customizatons

I'm trying to migrate from our on-premise TFS (2013.2) to Visual Studio Online (VSO).
One of the requirements from VSO is that you cannot use customized process templates.
My predecessor added few fields to few work item types wich I now have to remove, I don't care if I lose the data in those fields, just keep the standard ones.
I've tried few suggested methods but I'm not familiar enough with TFS to understand what I am doing :)
How can I remove those customizations?
I'm using OpsHub and following this guide: http://www.visualstudio.com/get-started/migrate-team-projects-vs
You need to do a few things...
1) identify your process template
User Story = MSF for Agile
Requirement = MSF for CMMI
Product Backlog Item = Scrum
2) Connect to VSO and download the relevant process template.
3) Use "witadmin.exe" to upload the defaults for Work Item Types, Categories, and Process
You should then be on a comparable template.
Since you are using OpsHub Migration Utility. During the Validation process it will show you the list of mismatches.
For the validation to succeed, you will have to delete/destory those fields. (Warning : You will lose all the historic data for that field)
For deleting the field, you can use the Visual Studio Power Tools (https://visualstudiogallery.msdn.microsoft.com/dbcb8670-889e-4a54-a226-a48a15e4cace). Install the tools relevant to your Visual Studio version and once they are installed, from the Visual Studio select Tools > Process Editor > Work Item Types > Open WIT From Server.
Here, connect to your TFS on-prem and select the Entity one-by-one as shown by the OpsHub Utility for having the mismatch. And delete the custom fields in question and save.
Click on Re-Validate in the OpsHub Utility. It should pass, if all the mismatched as shown before were taken care of through the above process.
Now, in case you want to destory the field you can use the witadmin deletefield /collection:http://localhost:8080/tfs/DefaultCollection /m:field-reference_name command.

Change TFS Process Template

I've been looking into change the process template on a Team Project, but still have a few questions. I'm looking to move from MS Agile v5 to TeamPulse v1. There are no existing work items that we care about, so no need to move those over, however we do want to keep the existing source control history/branches.
With this in mind what is the best method to use? I am currently looking at using witadmin but am also considering TFS Integration Tools (MS or CodePlex versions). I think these are essentially my only options.
Do I need to worry about mapping existing fields to those in the new template if I don't intend to keep the current items?
Any additional advice would also be welcome.
It is not possible to explicitly change the Process Template, though it is possible to import the new work item type definitions using witadmin
I found the following answers helpful in finding a solution:
https://stackoverflow.com/a/2999219/509356
https://stackoverflow.com/a/5664531/509356
If you don't need any existing workitems I recommend to create a new team project with TeamPulse v1 and migrate only the source with the TFS Integration Tool. The problem with the witadmin solution is that you won't be able to delete the old workitem definitions and that could lead to confusions.

Is there a way to use a TFS2010 but that gets the code from a TFS2008?

at our company we are using a TFS 2008 server. We need some capabilities offered by TFS 2010 (like Lab Management) but currently we cannot change the server (we're a small part of a big company and doing that would make others to update their tools so it's not an option).
What I'm looking for is a way to install a TFS 2010 server that links somehow to the repository of the actual TFS server so when the 2010 MSBuild tries to build he takes sources from TFS2008.
Is this possible or do you think that could be another way of getting that to work?
Thanks for your assistance.
You can use the Integration platform to sync the sources and work items of TFS2008 with TFS2010.
See http://tfsintegration.codeplex.com/ for more information
You can also customize a build template so that it pulls in source code from anywhere.

Resources