When creating a task in a TFS project that was created using the Agile template there is an option to enter an original estimate (See image a).
When creating a task in a project that was created using the Scrum template there is not option to enter original estimate at the task level.
Is there a way to add or turn on this feature. We use the Fibonacci effort sequence at the PBI/User Story level and make use of velocity, but we need to use original estimates at the task level for accounting purposes.
Reference img a:
Original Estimate (Microsoft.VSTS.Scheduling.OriginalEstimate) field exists in Agile and CMMI process template by default. You need to update the Task work item type definition in Scrum process template and add that custom field yourself:
Use witadmin tool to export the Task work item from the team project you want to customize:
witadmin exportwitd /collection:http://TFS2017:8080/tfs/DefaultCollection /p:ScrumProject /n:task /f:task.xml
Add the custom field between <FIELDS> </FIELDS>:
<FIELD name="Original Estimate" refname="Microsoft.VSTS.Scheduling.OriginalEstimate" type="Double" reportable="measure" formula="sum" />
Add a section between <Page Label="Details" LayoutMode="FirstColumnWide"> </Page>:
<Section>
<Group Label="Effort">
<Control Label="Original Estimate" Type="FieldControl" FieldName="Microsoft.VSTS.Scheduling.OriginalEstimate" />
</Group>
</Section>
Import the work item type:
witadmin importwitd /collection:http://TFS2017:8080/tfs/DefaultCollection /p:ScrumProject /f:task.xml
Then you'll see Original Estimate field:
You may download TFS Process Template Editor and edit work item type definition:
Open on VS 2017 Process Editor->Work Item Types->Open WIT from server.
Find your scrum project and work item type Task.
Add Original Estimate field to fields section:
Name=Original Estimate
Reference name=Microsoft.VSTS.Scheduling.OriginalEstimate
Data type=Double
Add new field to layout section.
You may find a sample in agile or cmmi project.
Related
I'm trying to use "Global Workflow" feature of TFS to have maintainable Work Item Customization.
Only resources I could've found is these two from msdn:
Manage Global Workflows
Customize global workflow
There are two problems I couldn't find a solution:
From the definitions I have a globalWorkflow.xml like below:
<?xml version="1.0" encoding="utf-8"?>
<GLOBALWORKFLOW>
<FIELDS>
<FIELD name="Global Field" refname="Namespace.GlobalField" type="String">
<REQUIRED />
</FIELD>
</FIELDS>
<GLOBALLISTS>
<GLOBALLIST name="Years">
<LISTITEM value="2014" />
<LISTITEM value="2015" />
</GLOBALLIST>
</GLOBALLISTS>
</GLOBALWORKFLOW>
I can import globalworkflow.xml either having only "Fields" tag or only "GlobalLists" tag but not both. If I try to import with both, like shown above, it gives a xml validation error indicating the second tag is not an acceptable child element of "GlobalWorkflow" tag.
If I put "GlobalLists" second, "GlobalLists" is the invalid child element, "Fields" tag is invalid if it's written as second element.
If it is imported including "Fields" tag, after import of global workflow; I can see the defined field in the WI Field Explorer of Power Tools but not in the definitions of the work items or in any combo for Field Selection, only in Work Item Field Explorer(not in Layout Tab, Workflow Tab or Fields Tab of work item).
MSDN vaguely explained the process like:
If you specify a field that is not currently defined for the team
project or the collection, the field is created when the global
workflow is imported.
I can assume, global workflow xml only saves the field and then you still have to define the same field in the fields tab of the work item to use it in Layout tab and Workflow tab. TFS only prevents another field creation in the same name and also implements the defined field rules. This logic, is not nice imho but still can be acceptable.
But there is still a problem with that logic to be true, because if I import global workflow with only globallist definitions, defined globallists are not seen in the global list designer screen or not in combo fields like "allowedvalues" rule options.
I'm using witadmin -importglobalworkflow /collection:"url" /f:"filepath" command and though I want my global workflow definition can be used from all my Team Project Collection
Expected Result
I want to be able to import a global workflow with both "Fields" and "GlobalLists" elements and after import operation, in a work item I should be able to see these definitions like the way I've created using Power tools.
UPDATE:
1 is solved: one global workflow can not include both "fields" and "globallists" elements.
MSDN didn't specifically explained it but the examples here include only seperate xml files.
Separate the globalist into a separate file, and import it with the command
witadmin importgloballist /collection:"http://MyServer:8080/tfs/DefaultCollection" /f:Directory/globallist.xml
Reference for globalists here: http://msdn.microsoft.com/en-us/library/ms194977.aspx
I am trying to add/import a new work item type "Test Case" (exported from MSF for agile ver 6.2 process template) into one of our existing team project based on MSF Agile 4.2 process template. I am able to import the WIT using power tools successfully. But when I try to create a new work item in team project using this Test Case template, I get the following error in tabs 'Steps' and 'Associated Automation':
*Microsoft.TeamFoundation.TestManagement.Client.InvalidWorkItemTypeException: The following work item type is not valid: Test Case. You must specify a valid work item type that belongs to a category with reference name Microsoft.TestCaseCategory or Microsoft.SharedStepCategory.
at Microsoft.TeamFoundation.TestManagement.Client.TestManagementTeamProject.CreateFromWorkItem(WorkItem workItem)
at Microsoft.TeamFoundation.TestManagement.Controls.TestStepsPart.GetTestBase(WorkItem workItem)
at Microsoft.TeamFoundation.TestManagement.Controls.TestStepsPart.get_TestBase()
at Microsoft.TeamFoundation.TestManagement.Controls.TestStepsPart.set_WorkItemDatasource(Object value)
at Microsoft.TeamFoundation.TestManagement.Controls.BasicWorkitemCustomControl.set_WorkItemDatasource(Object value)
at Microsoft.TeamFoundation.WorkItemTracking.WpfControls.CustomContentControl.set_WorkItemDatasource(Object value)
at Microsoft.TeamFoundation.WorkItemTracking.WpfControls.WorkItemControl.ControlFactory_ControlCreated(Object sender, ControlCreatedEventArgs e)
at Microsoft.TeamFoundation.WorkItemTracking.WpfControls.WpfControlFactory.OnControlCreated(ControlCreatedEventArgs args)
at Microsoft.TeamFoundation.WorkItemTracking.WpfControls.WpfControlFactory.CreateControl(String fieldName, String preferredControlType, String fallbackControlType, StringDictionary properties)
at Microsoft.TeamFoundation.WorkItemTracking.WpfControls.WpfFormRenderer.CreateControl(FormElement element)
at Microsoft.TeamFoundation.WorkItemTracking.WpfControls.WpfFormRenderer.RenderCollection(Grid panel, FormElementCollection collection, Int32& currentCol)*
Any idea how to resolve this? Thanks in advance.
By defining a default work item type for a category, you can help use the correct field population when you work in other Team Foundation clients, such as Microsoft Test Manager. By selecting the default work item defined for a category, many other fields can be auto-populated with default contents.
You modify the categories defined for a team project by modifying the XML definition file for its categories.
I updated the WIT category (given below) and imported the same (using witadmin importcategories command) to my team project. It solved the WI error!
<CATEGORY name="Test Case Category" refname="Microsoft.TestCaseCategory">
<DEFAULTWORKITEMTYPE name="Test Case" />
</CATEGORY>
I want to clarify Jimmy's answer. After you have created a new WIT template, identify the name that you have assigned to the template. If you are using VS Power Tools, the name you need is the Name entry box in the Work Item Type viewer. If you have an xml file with the template, the name id /Witd:WITD/WORKITEMTYPE/#name.(For this answer, we will assume a name of "My Custom Test Case") You must now retrieve the category file to add your new template. Do this with the witadmin exportcategories command (e.g. witadmin exportcategories /collection:"http: //tfsServerName:port/tfs/collectionPath" /p:project /f:Collections.xml which saves the collections file to the directory you run the command from). Once you have exported the collections file, find the category you would like to add your template to or create a new category. Next add a WORKITEMTYPE with an attribute name and a value of the template name. Below you can see the value for a custom test case that has been added to the TestCaseCategory:
After the necessary modifications, save the Collections.xml file and import it back into the server using witadmin importcategories (e.g. witadmin importcategories /collection:"http: //tfsServerName:port/tfs/collectionPath" /p:project /f:Collections.xml)
You should now be able to use the template you created to create new workitems.
I am connected to a TFS server, and when I create a work item (Bug, Task, etc.), the "Assign To" shows WAY too many users. I cannot find a way to limit the users shown that will affect anyone else who connects to the server.
For example, I have under the "Assign To" dropdown:
Administrator
LOCALE SERVICE
User 1
User 2
User 3
User 4
User 5
I want the "Assign To" dropdown to only show:
User 1
User 3
User 5
How would I do this, so that it changes on the server, and if anyone new connects to the server, they can only see the three users on the "Assign To" dropdown?
Here's what you should do:
Open the Visual Studio Command Prompt. This will give you a command line window with the PATH set to run VS / TFS tools
Download the Work Item Type definition that you want to modify (e.g. Bug, Task):
witadmin exportwitd /collection:collectionurl /p:project /n:typename [/f:filename]
This will give you the WIT's definition, in XML format.
Open the XML file. You will edit the rules for the Assigned To field. Find the term "System.AssignedTo"
In the Allowed Values rule element, modify (or add if none exists) your List Item element to limit the values to members of one (or more) TFS / Active Directory group(s).
Your field definition should look like this:
<FIELD name="Assigned To" refname="System.AssignedTo" type="String" syncnamechanges="true" reportable="dimension">
<HELPTEXT>The person currently working on this bug</HELPTEXT>
<ALLOWEXISTINGVALUE />
<ALLOWEDVALUES expanditems="true" filteritems="excludegroups">
<!-- Below is a TFS group. Note you actually type "[project]" verbatim -->
<LISTITEM value="[project]\Contributors" />
<!-- Below is an AD group. The name and group are examples only -->
<LISTITEM value="MYDOMAIN\Developers" />
</ALLOWEDVALUES>
</FIELD>
Importing your changes:
Save your file.
In the command line window type the following:
witadmin importwitd /collection:collectionurl /p:project /f:filename
That's it. Your work item type is now limited to the people you want.
See my answer here for 2012, it may be similar: Visual Studio - Don't display all domain users in "Assign To" field
The problem was that [TEAM FOUNDATION]\Valid Users included
[TEAM FOUNDATION]\Team Foundation Administrators which included [BUILT IN]\Administrators
In the TFS Server Administration Console I selected Application
Tier and clicked Group Membership. I then double-clicked on
[TEAM FOUNDATION]\Team Foundation Administrators and removed [BUILT IN]\Administrators.
Now I only see my team and not all the SQL admins and engineers that
were local admins on the server. All without any command line or
addons.
You can:
1) go here https://teamprojectmanager.codeplex.com/releases and download the latest Team Project Manager;
2) launch it (an *.exe file in the archive);
3) connect it to your project;
4) go to "work item configuration" on the right;
5) then to "work item types";
6) select your item type (Product Backlog Item for instance), click "edit";
7) do what Assaf Stone suggested above, in my case it was just replacing
<VALIDUSER />
with
<ALLOWEDVALUES expanditems="true" filteritems="excludegroups">
<LISTITEM value="[project]\Contributors" />
</ALLOWEDVALUES>
8) save your changes;
That's it! BTW, the tool can come in handy for some other customizations as well.
After installing TFS power tools for Visual Studio.
From the menu open Tools --> Process Editor --> Work Item Types --> Open WIT (WorkItem) Type from Server.
Select the Collection and the Project and The Work Item that you need to make changes to.
Open the Assigned To field and Click on Rules Tab
Edit the Valid user an add the "group name" which you wanted to display.
Then save the Workitem by selection save in Visual Studio.
Hope this works.
Create a seperate group under the collection and add the users.
Open the Process template Add a rule to assigned to field Assigned to "Valid User" and select the Group which you created.
So after looking at a few keywords from hems I got some good google results.
The first thing you need to do is go into visual studio, and select team menu and from there go to collection settings. You will see process template and from there you can download one you have.
After you download it you can then modify any settings you want. When you are done, go to the same menu and this time click upload.
That is all it takes, but note you can only select this new one on project creation.
If someone accidentally set the status of a task to "Removed" in TFS 2010, is there any way to recover it?
If you just changed the Status/State to Removed you should be able to create a new Query and search for Removed work items.
Go to My Queries, right click -> New Query, adjust the last item to State = Removed and click Run
From the query results you can open up the task and change the Status/State to the appropriate Status/State
this assumes that your work item type definition allows for the state to go back to something other than removed
Edit
If you want to alter the behavior for a Task in the default scrum template you must modify the Task.xml located under
C:\Program Files (x86)\Microsoft\Microsoft Visual Studio Scrum 1.0\Process Template\WorkItem Tracking\TypeDefinitions
Open the file and add in an additional <TRANSITION/> element located under <TRANSITIONS/>
<TRANSITION from="Removed" to="To Do">
<REASONS>
<DEFAULTREASON value="Added back into the backlog" />
</REASONS>
</TRANSITION>
Save the file and update the modified Task work item type definition using TFS Power Tools. This will overwrite the Scrum Task type and introduce the newly transition from Removed to To Do
From there you simply need to run a query to find your Removed task and change the State.
You can also duplicate the work item to create a complete copy of this item in the To Do state. This is a bit of a work around, but is simpler and quicker to do. You can do this by:
Open the work item.
Click Tools on the menu.
Choose "Create Copy of Work Item"
I am hoping someone here can shed light on my problem. I am trying to integrate TFS work items and MS Project. What field is mapped from the work item into the duration column of Project? I can change the way I am doing this, but, I had created a custom field Work Item field in TFS. I have the mapping file that TFS uses to map to Project. Here is my Work Item definition:
<FIELD name="EstCodingHours" refname="CustomFields.EstCodingHours" type="Double"
reportable="detail">
<HELPTEXT>Enter estimated number of hours to fix bug</HELPTEXT>
</FIELD>
Here is my mapping definition:
<Mapping WorkItemTrackingFieldReferenceName="CustomFields.EstCodingHours"
ProjectField="pjTaskDuration" ProjectUnits="pjHour" />
I can map to other fields such as pjTaskDuration1. Is pjTaskDuration read only perhaps? If I can figure out what maps into pjTaskDuration, I can use it instead of my new field EstCodingHours.
Thanks,
Scott
The TFS out-of-the-box templates don't map the duration field by default.
Wes Macdonald steps through the process of doing such a mapping in a blog post.