How to add columns in sprint board TFS (not backlog board) - tfs

In the newer versions I can customize the product backlog board by adding columns and set states. I want to do the same in the sprint board but I can't find that functionality. I've change the way you can work with Bugs but it still don't give me the options I want.
Pls Help

Not possible for Visual Studio Team Services(VSO) but for on-premise it is and is the same process since at least TFS 2012.
You will need to alter your process template for the Team Project to include the additional states. You can do this with either TFS Power Tools or I prefer to do it manually. You didn't specify what Process Template you are using so here it is for the SCRUM template (Others will be the same just will contain different wordings):
Export your WITD for Tasks from your dev machine via command line (I think it needs Team Explorer):
witadmin exportwitd /collection:http://servername:8080/tfs/DefaultCollection /p:"TeamProjectName" /n:Task /f:"C:\FileToExportTo.xml"
Edit this file and find the WORKFLOW section and add in your new state into STATES e.g:
<STATE value="New State" />
Next, in the TRANSITIONS section add in the required transitions and any logic associated with it e.g:
<TRANSITION from="In Progress" to="New State">
<REASONS>
<DEFAULTREASON value="New State Started" />
</REASONS>
</TRANSITION>
Save the file and import it again:
witadmin importwitd /collection:http://servername:8080/tfs /p:"TeamProjectName" /f:"C:\FileToExportTo.xml"
You should export your entire process template and you should add those files to source control. If you want to do the same for Bugs or any other work item type then you will need to export and modify those WITD's too.

Related

How do I customize the work items states - customize the list and colors?

I installed TFS 2018 on the premises and I migrated 2 project collections from a TFS 2012 server. I have a hard time finding the page/dialog where I can assign different colors to the work items states. For the previous versions, MS provided visual studio extensions:
Process Templates Editor, TFS 2015 Power Tools. I use VS 2022. I haven't been able to find an extension for editing these lists that would work with VS 2022 and TFS 2018.
Can you please tell me how can I assign different colors to the work items states, and where I can customize the list?
TIA
Currently there is no such an extension (Process Templates Editor) for VS 2022.
However, we can export the work item type and process definition files using witadmin tool, then customize it with a txt editor, then import the changed files back to your project.
To run the witadmin command-line tool, open a Command Prompt window where Visual Studio is installed. The witadmin command-line tool installs with any version of Visual Studio.
For Visual Studio 2022, it's under the following path:
%programfiles(x86)%\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer
or Professional or Enterprise in place of Community, depending on the version you've installed.
Can you please tell me how can I assign different colors to the work
items states?
To set state colors, we can add the property StateColors to define the colors. See Specify properties and behaviors. Below steps for your reference:
Export the process configuration definition file:
witadmin exportprocessconfig /collection:http://servername:8080/tfs/DefaultCollection /p:YourProjectName /f:E:\temp\ProcessConfiguration.xml
Open the ProcessConfiguration.xml with text editor, add property
StateColors to define the state colors under Properties block,
save the changes.
Import the process configuration definition back to your project:
witadmin importprocessconfig /collection:http://servername:8080/tfs/DefaultCollection /p:YourProjectName /f:E:\temp\ProcessConfiguration.xml
Check the state colors:
where I can customize the list?
If you mean add or remove work item states, then you can reference below steps to do that. (Add "Test" state for Task work item type for example here)
1.Export the Task work item type:
witadmin exportwitd /collection: http://servername:8080/tfs/DefaultCollection /p:YourProjectName/f:E:\temp\Task.xml
2.Open the exported Task.xml file with text editor and add a new state Test under witd > WORKITEMTYPE > WORKFLOW > STATES:
<WORKFLOW>
<STATES>
<STATE value="Test">
<FIELDS>
<FIELD refname="Microsoft.VSTS.Common.ClosedDate">
<EMPTY />
</FIELD>
</FIELDS>
</STATE>
3.Modify the transitions to go through the new state (Add the transitions as needed, from ="In Progress" to="Test" for example here):
<TRANSITIONS>
<TRANSITION from="In Progress" to="Test">
<REASONS>
<DEFAULTREASON value="Ready to Test" />
</REASONS>
</TRANSITION>
4.Import the Task definition file:
witadmin importwitd /collection: http://servername:8080/tfs/DefaultCollection /p:YourProjectName /f:E:\temp\Task.xml
5.Check the state list.

Trying to remove some columns from a TFS Kanban board

One of my users has discovered that 3 new columns were added to the Kanban board. I've never removed a column from a Kanban board before, so I've been researching how this might be done. It looks like I have to use a command line utility named witAdmin. Using what I found I launched the Developer Command Prompt for VS 2015 and then entered this command:
witadmin exportwitd /collection:http://ourtfsserver:8080/tfs/Enterprise%20Architecture /p:"Server 2008 Retirement" /n:Task /f:"D:\FileToExportTo.xml"
I thought opened the FileToExportTo.xml file, but I couldn't find the column headers that need to be removed, anywhere in it. So, I must have either left something off in the command line, or gave the wrong parameter. What do I need to change, please?
There is nothing wrong with your command line. But it's used to delete redundant state in task.
If you just want to remove some columns from the board. I will give you a more detail steps for your reference:
Before in the sprint board:
Steps:
Export work item (e.g. task) through WitAdmin command.
Delete not used custom state to workflow section
Export ProcessConfiguration process file through WitAdmin command.
Delete the row of state test item in TaskBacklog=>States section. For example:
<States>
<State type="Proposed" value="To Do" />
<State type="InProgress" value="In Progress" />
<State type="InProgress" value="Test" />
<State type="Complete" value="Done" />
</States>
Import modified work item file and process file to the team project
Check the result in web access.
After deleted the column:
After deleted, the customized test column "Test" is gone, hope it helps.
I talked to the former TFS administrator about this issue. He went poking around in TFS 2015 and found an alternative solution. Go to the TFS Team Project, then go to WORK. Make sure you've selected Board and then go to the gear Configuration/Settings. Under the General tab, select "Working with bugs" tab. What he found was someone had selected "Bugs appear on the backlogs and boards with tasks". It should be "Bugs appear on the backlogs and boards with requirements".

TFS shows old cached team members in "Assigned To" field

I'm using TFS 2013 and the process editor templates. I am trying to add an "allowed values" rule for the "Assigned To" standard field so I entered "[Project]\Some TFS Team" in the the ListItem popup hopping that only members from this team will appear in the dropdownlist suggested values of this field.
Unfortunately the list showed old team members of this team and no matter I added or removed members to and from this team the dropdownlist keeps showing only the old data.
Here are the steps I tried to clear that cache:
1-restart everything (TFS, my machine, TFS server)
2-remove and re-add the rule
3-run witadmin rebuildcache from my machine
4-delete C:\Users\ ...\AppData\Local\Microsoft\Team Foundation\5.0\Cache folder
What else should I look for to make the TFS responsive?
Note:
The same old list also appears in the field in the TFS web access.
You need to remove the default ALLOWEXISTINGVALUE and VALIDUSER rule.
Just change the Assigned to filed context as below:
<FIELD name="Assigned To" refname="System.AssignedTo" type="String" syncnamechanges="true" reportable="dimension">
<ALLOWEDVALUES expanditems="true">
<LISTITEM value="[Project]\Team0720" />
</ALLOWEDVALUES>
</FIELD>
Update:
Please try below items to narrow down the issue:
TFS doesn’t reflect changes in the AD immediately, you can try to
force sync the changes, See Neno’s blog post on the issue with a
tool TfsSyncIdentities.exe as solutions. And this article to synchronize TFS users with AD for your reference.
Try to create a new team, then add several
members to the team, then check the rule with this new team.
Have a check for other work item types, whether they have the same issue.
Have a check for another team project, to check if it works.
#Andy-MSFT it looked like it took years from me to figure out what was the issue- maybe because I didn't logged into the TFS server itself -as I ran TfsSyncIdentities.exe tool to enforce the AD sync then run it again with /status option to check I found that it didn't run , only then I know that the Job agent service is stopped!!, and just after I restarted it everything worked as dreams and TFS responding to all the changes
note:
I had to stop it again because the TFS became toooooo slow when the job agent was running
Thanks Andy for you help and support

Upgraded team project: adding Epic work item type

I have a TFS2015 server upgraded from TFS2013.5.
The existing team projects were created using the old template MSF For Agile 2013.x.
For these team projects I would like to enable also the Epic work item type.
According with http://blogs.msdn.com/b/tfssetup/archive/2015/09/16/configuring-the-epics-for-upgraded-team-projects-in-team-foundation-server-tfs-2015.aspx I should download the latest Agile template and import the Epic work item type.
The import of Epic type is failling with the below message:
Error importing work item type definition:
The 'refname' attribute is not declared.
So I created a new team project using the Agile template, exported the Epic work item type and compared with Epic work item type resulted from the download operation.
It seems that the differences between these two types are quite notable:
<WORKITEMTYPE name="Epic">
vs
<WORKITEMTYPE name="Epic" refname="Microsoft.VSTS.WorkItemTypes.Epic">
missing:
<FIELD name="Iteration ID" refname="System.IterationId" type="Integer" />
<FIELD name="External Link Count" refname="System.ExternalLinkCount" type="Integer" />
and so on.
Do you know why are those differences present?
The process template that you download from VSO is already prepared for Process Customization and contains extra information that an on-prem server doesn't understand yet.
In your case, you can simply remove the "refname=Microsoft.VSTS.WorkItemTypes.Epic" piece from the file and import it.
The fields that you list out are system fields (they start with System.*) and they will always be added to all WIT definitions. They don't have to be part of the xml file that you import.

TFS work items for tracking tasks

I'm using Visual Studio 2012 and TFS onlin. I have created a TFS project using "MSF for CMMI" process template because it allows devs to estimate tasks, specify the remaining, etc.
Questions:
1) How can make the estimation of the work item read only? I don't want anybody to change that value once it has been set.
2) I need to create a report that shows what each dev has done each week, indicating task and hours. I tested MS Project integration with TFS and it's great but some columns like start date and end date only exists in MS Project so I need to ask each developer when they have started and finished each task manually.
3) What reports do you recommend for tracking devs and tasks?
Thanks in advance.
Answering your first question: you'll have to modify Task work item type definition in TFS:
export existing definition using witadmin.exe tool (you can find it in your Visual Studio folder):
witadmin.exe exportwitd /collection:<collection URL> /p:<project name> /n:Task /f:task.xml
Modify exported xml by adding CANNOTLOSEVALUE and FROZEN rules to the Microsoft.VSTS.Scheduling.OriginalEstimate field definition:
<FIELD name="Original Estimate" refname="Microsoft.VSTS.Scheduling.OriginalEstimate" type="Double" reportable="measure" formula="sum">
<HELPTEXT>The original estimate of work required to complete the task (in person hours)</HELPTEXT>
<CANNOTLOSEVALUE />
<FROZEN />
</FIELD>
Import the updated xml back to TFS:
witadmin.exe importwitd /collection:<collection URL> /p:<project name> /f:task.xml

Resources