Adding WIT to TFS - to the whole collection? - tfs

I'm trying to modify a WIT and import it afterwards with witadmin.
From what I've seen, it's possible to import the WIT only to specific projects but not to the whole team project collection.
Is there really no way to do it?
On the same note - I'd also like to share a query to all project at once. Is it impossible as well?
Thank you!

You are correct: Work item modifications have to be individually applied to team projects, as do custom work item queries.

Just as Daniel said, it's project level based. There was nothing built in to achieve what you want.
However, you could use some workaround. One method is automating your WIT export\import with batch files (ExportWITDs.cmd, ImportWITDs.cmd). Then use the Checkin.cmd example to check-in the changes to a dedicated folder for WITs on the source control.
More detail steps you could refer this blog: How to Customize Work Item Types

First of all: You are right - you can't provide Wit's to Collections. The whole process configuration is defined on Teamproject level. But you can ease the task of updating all Teamprojects at once.
To share a WorkItemQuery or WorkItemType to several project you can write a batchfile where you import your modified file to one project after another.
I'm using this simple batch file to import changed Wit's to all of my projects (just pass in the path to the wit.xml file you want to import):
witadmin.exe importwitd /collection:http://servername:port/tfs/collectionName/ /p:ProjectName1 /f:%1
witadmin.exe importwitd /collection:http://servername:port/tfs/collectionName/ /p:ProjectName2 /f:%1
witadmin.exe importwitd /collection:http://servername:port/tfs/collectionName/ /p:ProjectName3 /f:%1
... add more projects here
On the Developer command prompt for VisualStudio call the *.bat file like this:
import.bat c:\temp\task.xml
As witadmin.exe doesn't provide the feature to import/export WorkItemQueries you can use wiqadmin instead. You can find it here.

Related

How to add columns on the online sprint board

I'm trying to understand how to add columns on the web version of TFS for my latest sprint but can't find the options to do so.
Using the default model (To do, In progress, done) does not capture the complexity and need for my team so I need an extra column but do not know how to add it.
If someone could give me pointers on the web version of TFS that would be great.
The sprint board can't be customized through the UI a more complex sequence of steps is required, this involves exporting a couple of XML files, editing them end importing them back in:
Export the task WIT from TFS using witadmin exportwitd
Add the required State(s)
Add the required State transition(s)
Export the processconfig using witadmin exportprocessconfig
Update the task board configuration to add the new state(s)
Import the task WIT using witadmin importwitd
Import the processconfig using witadmin importprocessconfig
See:
Modify workflow
Add work item types
This is best performed on a (temporary) test Team project collection to finetine the process, you can then import the tested configuration into the existing project.

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.

Can we Export WIT BUG rename it and Import again on the same project

We have TFS 2010 environment, We have WIT BUG with so many customizations done. current need is want a new Work Item Type which has exactly same behaviour and functionality as “Bug”, but just a different name (Both Work Items, BUG and new WIT should be in the same team project). So can we Export WIT 'BUG' Rename it and import it to the same Team Project if we do this what are the impacts. Or what else we need to do and where we need to do changes. If not possible please let me know what is the best possible way to do this.
Absolutely you can do this, with no adverse consequences.
If you are using a Developer Command Prompt, the steps are:
Run: witadmin exportwitd /collection:http://yourserver:8080/tfs/YourCollection /p:YourProject /t:Bug /f:bug.xml
Open bug.xml, change the name element to something else at the top of the file. Save the file.
Run: witadmin importwitd /collection:http://yourserver:8080/tfs/YourCollection /p:YourProject /f:bug.xml

Work item types in TFS 2010; Where are the XML files stored?

I am trying to add a new work item type. Where the heck are the XML files that define these?
I don't see them in solution explorer, they aren't in the file system on the TFS server, so where the heck are they?
I am following instructions from Microsoft but it doesn't say where to look
You get these from Team > Team Foundation Server Settings -> Process Template Manager, then download the template you want. Then you'll find all the WITs in there. You can edit and create new ones, then upload the changed template. Just be careful to rename the process template (inside process.xml file).
Use WitAdmin to alter existing project WITs. Use this method above for future projects.
Do you have your XML and are trying to deploy it? Reading the link you posted, it looks like you deploy the work item types by using the witadmin utility. The link to instructions to witadmin is below and under the references section of the instructions you gave a link to.
http://msdn.microsoft.com/en-us/library/dd312129.aspx

Team Foundation Server Source Control - Shared AssemblyVersion.cs file

I am aware that Team Foundation Server Source Control does not support the shared file (link) concept of Visual Source Safe.
I currently have a scenario where we link an AssemblyVersion.cs file across multiple projects. This means that in our MSBuild script, we can update the version in one file and have it propagate throughout the projects.
How would I accomplish this with Team Foundation Server Source Control?
My first thought is to create the file in a central location and have each project include that specific file in that specific location (instead of copying it to the local source directory)...
I don't know if you can embed the AssemblyInfo.cs as a link file.
But look here, looks like it works:
In our Teambuild, we have a task which updates the AssemblyFileVersion and other attributes.
We use this Task
Edit:
Actually it works with a multi solution architecture with round about 29 projects and
on TFS 2005 and 2008.
I personally like the second solution cause you don't need to change all projects,
only need to implement in daily/nightly build.

Resources