In TFS 2010 a requirement work item had also an implementation and a change request tab.
In TFS 2012 the requirement work item also had an implementation and change request tab as written in the documentation, but the picture of a newly created requirement doesn't show anymore these tabs.
Now, in TFS 2015 those two tabse aren't mentioned any more, though the CMMI process shows the work item hierachy as
Epic > Feature > Requirement > Task
I am missing the implementation and change request tab in the standard configuration the CMMI project, because they are very useful in tracking the whole work from defining the features down to the requirements and their implementation with testing as well as subsequent change requests.
Are there any ways to get back these tabs in the standard configuration? I don't like to change the predefined work item types, because you never now what happens with next upgrades of TFS.
I had to go back all the way to 2010 to find the tab definitions you're missing. You can't "configure" TFS to show additional tabs without changing the process definition. To add them back in you have two options.
Create a custom template.
Patch the Requirement form definition after project creation.
The latter option should work well in combination with the way exiting process templates are "upgraded" using the Feature Activation Wizard, though with the new Work Item Form's and the new way Process template customization is done on Visual Studio Team Services, it would not surprise me when the next version of TFS will require manual intervention after upgrade.
1. Create a custom template
Download the CMMI process template from TFS using Visual Studio, update the process template definition (ProcessTemplate.xml) file and give it a new name and GUID:
Then go to the WorkItem Tracking\TypeDefinitions folder and edit the Requirement.xml. Add the two old tabs and link controls back in:
<Tab Label="Implementation">
<Control Type="LinksControl" Name="HierarchyForm" LabelPosition="Top">
<LinksControlOptions>
<WorkItemLinkFilters FilterType="include">
<Filter LinkType="System.LinkTypes.Hierarchy" />
</WorkItemLinkFilters>
<WorkItemTypeFilters FilterType="include">
<Filter WorkItemType="Requirement" />
<Filter WorkItemType="Task" />
</WorkItemTypeFilters>
<ExternalLinkFilters FilterType="excludeAll" />
<LinkColumns>
<LinkColumn RefName="System.ID" />
<LinkColumn RefName="System.WorkItemType" />
<LinkColumn RefName="System.Title" />
<LinkColumn RefName="System.AssignedTo" />
<LinkColumn RefName="System.State" />
<LinkColumn LinkAttribute="System.Links.Comment" />
</LinkColumns>
</LinksControlOptions>
</Control>
</Tab>
<Tab Label="Change Requests">
<Control Type="LinksControl" Name="ChangeRequestsForm" LabelPosition="Top">
<LinksControlOptions>
<WorkItemLinkFilters FilterType="include">
<Filter LinkType="Microsoft.VSTS.Common.Affects" FilterOn="reversename" />
</WorkItemLinkFilters>
<WorkItemTypeFilters FilterType="include">
<Filter WorkItemType="Change Request" />
</WorkItemTypeFilters>
<ExternalLinkFilters FilterType="excludeAll" />
<LinkColumns>
<LinkColumn RefName="System.ID" />
<LinkColumn RefName="System.WorkItemType" />
<LinkColumn RefName="System.Title" />
<LinkColumn RefName="System.AssignedTo" />
<LinkColumn RefName="System.State" />
<LinkColumn LinkAttribute="System.Links.Comment" />
</LinkColumns>
</LinksControlOptions>
</Control>
</Tab>
Upload the custom process template using Visual Studio and create your new Team Projects using that template.
2. Update existing Projects
Use witadmin to export the definition for the requirement work item type from an existing project:
witadmin exportwitd /collection https://server/tfs/DefaultCollection /p MyProject
/n Requirement /f Requirement.xml
Edit the XML file using your favorite text editor (I use Visual Studio Code) and add the above mentioned XML snippet back in. Now that you have a definition for Requirement with the right layout, you can push it to existing projects. First, validate your changes:
witadmin importwitd /collection https://server/tfs/DefaultCollection /v
/f Requirement.xml
If no errors are found, import the definition:
witadmin importwitd /collection https://server/tfs/DefaultCollection /p MyProject
/f Requirement.xml
Related
I administrate an on-premises TFS server currently on TFS 2018.3.
I need to learn how to add a new column to the Kanban iteration board (which is where tasks are shown).
I searched and searched and found this post that is exactly relevant to this question, but the answer appears to only related to a different version of TFS (probably Azure DevOps 2019).
Nevertheless, I am able to download a copy of the Process (Agile), unzip and modify the tasks to show a new state. (I have incidentally also modified the witadmin (exportwitd) Tasks.xml and modified the workflow section to reflect the new state and state transitions.)
As a result, I can upload my new process template (after changing the name and guid), and create a new project based on it. When I create a story and sub-task, the new state and transitions behave as expected. However, no new column appears on my iteration board. If I transition the task to the new state, it simply disappears from the board.
I can alter columns for "User Stories", and create swimlanes and such with no issues. However, navigating to the Settings (Gear Icon) for the iteration does not give the "columns" setup that it does for User Stories.
Nevertheless, there must be a way to do it, because I can see that in my same collection, my new test project shows the columns "New", "Active", "Resolved", and "Closed", while other previously existing projects show only "Active" and "Closed", so there must be a means of configuring this on a project by project basis as the post suggests.
Can anyone describe for me how to add columns to the kanban iteration board?
You need to export the process config file and add there the new state (and of course, add it to the work item XML states (e.g. Tasks.xml)).
Export the file:
witadmin exportprocessconfig /collection:CollectionURL /p:ProjectName [/f:FileName] [/e:encoding]
There in the task category add the new state (under the <States>):
<TaskBacklog category="Microsoft.TaskCategory" parent="Microsoft.StoryCategory" pluralName="SubTasks" singularName="SubTask" workItemCountLimit="500">
<AddPanel>
<Fields>
<Field refname="System.Title" />
</Fields>
</AddPanel>
<Columns>
<Column width="400" refname="System.Title" />
<Column width="100" refname="System.State" />
<Column width="100" refname="System.AssignedTo" />
<Column width="50" refname="Microsoft.VSTS.Scheduling.RemainingWork" />
</Columns>
<States>
<State type="Proposed" value="Active" />
<State type="Proposed" value="NEW-STATE" />
<State type="InProgress" value="In Progress" />
<State type="Complete" value="Done" />
</States>
Then import:
witadmin importprocessconfig /collection:CollectionURL [/p:ProjectName] /f:FileName [/e:encoding] [/v]
Noticed StateChanged field is missing within XML definitions of some work items in scrum template of tfs 2017 RTM : pbi, testplan, testsuite, feebackrequest, codereviewrequest, and some more.
I assume i should add it manually to them. Right ?
If you mean the State Change Date field, yes, by default it's not added in some work items in scrum template.
Actually the control is not added to layout eventhough in the existing work items such as Bug, Feature. That means, you cannot see the field in work item layout. However you can add the control to display the field based on your requirements.
Yes, you can also add the State Change Date field manually to the work items which not exsiting in them. See Add a field, or apply a rule, or change an attribute for details.
You can also use the TFS Process Template Editor to edit the WITs definitions.
Field:
<FieldDefinition name="State Change Date" refname="Microsoft.VSTS.Common.StateChangeDate" type="DateTime">
<WHENCHANGED field="System.State">
<SERVERDEFAULT from="clock" />
</WHENCHANGED>
<WHENNOTCHANGED field="System.State">
<READONLY />
</WHENNOTCHANGED>
</FieldDefinition>
Layout Control:
<Group Label="Status">
<Column PercentWidth="100">
<Control FieldName="Microsoft.VSTS.Common.StateChangeDate" Type="DateTimeControl" Label="State Change Date:" LabelPosition="Left" />
</Column>
</Group>
Page Section:
<Section>
<Group Label="Status">
<Control Label="State Change Date:" Type="DateTimeControl" FieldName="Microsoft.VSTS.Common.StateChangeDate" />
</Group>
</Section>
I have a custom TFS form. In this form i need to add a check box as
Select test:
Test1
Test2
Test3
Test1, Test2 and Test3 should be check box controls and the user can select any number of check boxes. How can I achieve this in TFS? I installed a code plex project http://witcustomcontrols.codeplex.com/
But there is no documentation on how I can use the controls or samples.
The download file from http://witcustomcontrols.codeplex.com/ contains an installer for the Windows controls and a .zip file for the Web Access controls.
To install windows control:
Simply run the msi setup and restart Visual Studio.
Fields associated with multivalue control should have list of suggested values and each value enclosed in square brackets. For example:
<FIELD name="Triage" refname="Microsoft.VSTS.Common.Triage" type="String" reportable="dimension">
<HELPTEXT>Status of triaging the bug</HELPTEXT>
<SUGGESTEDVALUES expanditems="false">
<LISTITEM value="[Approved]" />
<LISTITEM value="[Investigate]" />
<LISTITEM value="[Rejected]" />
<LISTITEM value="[Submit]" />
</SUGGESTEDVALUES>
</FIELD>
Then use MultiValueControl as controltype for that field in Form section, for example:
<Control Type="MultiValueControl" FieldName="Microsoft.VSTS.Common.Triage" Label="Triag&e:" LabelPosition="Left" />
Check: http://witcustomcontrols.codeplex.com/wikipage?title=MultiValue%20Control
To install web control:
Navigate in your browser to the configuration panel for the web
extension of TFS: http://servername:8080/tfs/_admin/_extensions
Click on the Install and upload the CodePlex.WitCustomControls.MultiValueControl.zip-file, make
sure to use the .zip file matching you TFS server version.
Enable the extension.
Check: http://witcustomcontrols.codeplex.com/releases/view/616048
As of the recent release of TFS 2015 Update 2, this can be done with the witd in on-prem TFS like this (example is from a Bug).
Definition:
<FIELD name="CustomerReported" refname="X.X.CustomerReported" type="Boolean" reportable="dimension">
<DEFAULT from="value" value="True" />
</FIELD>
Layout:
<Control FieldName="X.X.CustomerReported" Type="FieldControl" Label="Customer Reported" LabelPosition="Left" />
On vs2013: tools > process editor > work item types > open WIT from server.
By editing the Task work item rules, I have come out with the following xml item definition:
<FieldDefinition name="Remaining Work" refname="Microsoft.VSTS.Scheduling.RemainingWork" type="Double" reportable="measure">
<WHENCHANGED field="Microsoft.VSTS.Scheduling.OriginalEstimate">
<COPY for="[global]\Project Collection Valid Users" from="field" field="Microsoft.VSTS.Scheduling.OriginalEstimate" />
</WHENCHANGED>
</FieldDefinition>
What I am trying to achieve is sth more like this:
<FieldDefinition name="Remaining Work" refname="Microsoft.VSTS.Scheduling.RemainingWork" type="Double" reportable="measure">
<WHENCHANGED field="Microsoft.VSTS.Scheduling.OriginalEstimate">
<WHEN field="Microsoft.VSTS.Scheduling.RemainingWork" value="">
<COPY for="[global]\Project Collection Valid Users" from="field" field="Microsoft.VSTS.Scheduling.OriginalEstimate" />
</WHEN>
</WHENCHANGED>
</FieldDefinition>
The problem is what I have now is not working for me (whenever I change Original Estimate, Remaining Work is not being updated), and I can't figure out how to stick in the WHEN clause.
I finally changed the Task tfs field definition for my project, via witadmin export/import:
On a Developer Command Prompt for VS2013
> witadmin exportwitd /collection:http://myTFSserver:8080/tfs/DefaultCollection /p:myTFSProject /n:Task /f:"c:\tfs\Task.xml"
replace the relevant section on Task.xml
<FIELD name="Remaining Work" refname="Microsoft.VSTS.Scheduling.RemainingWork" type="Double" reportable="measure" formula="sum">
<WHENCHANGED field="Microsoft.VSTS.Scheduling.OriginalEstimate">
<COPY for="[global]\Project Collection Valid Users" from="field" field="Microsoft.VSTS.Scheduling.OriginalEstimate" />
</WHEN>
</FIELD>
with
<FIELD name="Remaining Work" refname="Microsoft.VSTS.Scheduling.RemainingWork" type="Double" reportable="measure" formula="sum">
<WHEN field="Microsoft.VSTS.Scheduling.RemainingWork" value="">
<COPY from="field" field="Microsoft.VSTS.Scheduling.OriginalEstimate" />
</WHEN>
</FIELD>
then convey the change
> witadmin importwitd /collection:http://myTFSserver:8080/tfs/DefaultCollection /p:myTFSProject /f:"c:\tfs\Task.xml"
I can't think of a way to do what you want with just WITD.
Another (more complex) option is to create an ISubscriber plug-in that you deploy to your TFS. It can detect whenever your work items are changed and update fields appropriately using any logic you can write in C#.
The default "Backlog" page on TFS 2012 looks like the screenshot below.
I'd like to add the "Effort" field to the "quick add" panel on the top (see arrow).
I know it involves changing xml templates, but I can't figure out the specifics.
How would I go about accomplishing that? :)
You need to change the AgileProcessConfig of the project:
Export the config file:
witadmin exportagileprocessconfig /collection:http://tfsserver:8080/tfs/DefaultCollection /p:ProjectName /f:d:\temp\test\agileprocessconfig.xml
Edit the agileprocessconfig.xml by adding the Effort field:
<ProductBacklog>
<AddPanel>
<Fields>
<Field refname="System.Title" />
<Field refname="Microsoft.VSTS.Scheduling.Effort" />
</Fields>
</AddPanel>
Import the file back to your project
witadmin importagileprocessconfig /collection:http://tfsserver:8080/tfs/DefaultCollection /p:ProjectName /f:d:\temp\test\agileprocessconfig.xml