suggested values - tfs

I had added some suggested values to a field in a Work item, But now when i try to update the value, changes are not reflected.
If I delete the suggested values , then as expected it is not suggesting anything.But when I reenter the same values again. It is going back to old value and changes are not reflected.
Basically , I added a suggested value with some letter in upper case while some in lower and I want to fix this problem after the workitem is uploaded to the server.
Is it Ok to go in SQL server and updated the table, If so then can someone which table hold the suggested values.

In TFS2010, WitAdmin console application is used to Import\Export WorkItem Types, WitAdmin will be available in (Drive:\%Program Files%\Microsoft Visual Studio 10.0\Common7\IDE).
To modify a Work Item Type in TFS, first you have to download the Work Item Type using below exportwitd command.
witadmin exportwitd /collection:collectionurl /p:project /n:typename [/f:filename] [/e:encoding] [/exportgloballists]
ex: witadmin exportwitd /collection:”http://TFSServer:8080/tfs/DefaultCollection” /p:”Demo” /n:Bug/f:”c:\WorkItemTypes\Bug.xml”
Then you can perform the modification on the downloaded Work Item Type. You have to search the required field in xml file and under its suggested values you can add your new value and then save.
Now,you have to upload the xml to TFS Server using the Importwitd command.
witadmin importwitd /collection:collectionurl [/p:project] /f:filename [/e:encoding] [/v]
ex:
witadmin importwitd /collection:”http://TFSServer:8080/tfs/DefaultCollection” /p:” Demo” /f:” c:\WorkItemTypes\Bug.xml”

Related

Can we change the default description about the field that appears on hovering the field in vso?

i have 2 questions.
can we remove the default description(field name and type) of a field that appears on hovering the field ? After adding the description to the field, on hovering it some default text is displayed along with the description added.
can we add hyperlink in the desctiption of the field ?
If you are using VSTS (VSO), the answers for both questions are NO since you can only list WIT definitions but can’t change and import into VSTS.
If you are using TFS, the answers are yes for both. You can use witadmin to change a WIT.
With witadmin, you can modify XML definition files to support the
On-premises XML process model. For Hosted XML and Inheritance process
models, you can only use witadmin commands to list information.

Updating TFS field names in more than 1 Team Project Collection

I have two Team Project Collections -- DefaultCollection and ArchiveCollection. I need to update the display name for System.ExternalLinkCount from 'ExternalLinkCount' to 'External Link Count'.
This is the command I'm using to accomplish that on both collections:
witadmin changefield /collection:http://localhost:8080/tfs/<CollectionName> /n:System.ExternalLinkCount /name:"External Link Count"
I get no errors from the command and it tells me that the field is updated. However, after I process the Tfs Warehouse, I see a schema conflict on the field. The DefaultCollection has the updated name, but the ArchiveCollection still has the old name.
That's the part I don't understand. The update is getting made to the same field in both collections, but it isn't updating in the ArchiveCollection.
Not sure what I'm missing.

Test Case WIT in TFS2012 giving error - Microsoft.TeamFoundation.TestManagement.Client.InvalidWorkItemTypeException

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.

After upgrading to TFS2013 RTM, the search from the web interface returns "TF51535: Missing or unsupported field name."

After upgrading to TFS2013 RTM, the search from the web interface returns "TF51535: Missing or unsupported field name." It looks like the default fields to search changed.
How do you change the work item fields that are searched on by default in TFS2013?
What I have found so far:
It is searching on Title, Description, Repro Steps\
In TFS2010 you could follow the steps listed here to change the default (at least I assume... I didn't actually use that version)
This is likely to happen for anyone that started using bugs in an older process template and has continued to use and upgrade the template to work with the newer versions.
Microsoft is now searching on Description, Title, and "Repro Steps" by default. The error happens because "Repro Steps" is not in any of the work item types. This field maps to Microsoft.VSTS.TCM.ReproSteps the old similar field was Microsoft.VSTS.CMMI.StepsToReproduce
One way to fix the problem:
export the bug work item type
witadmin exportwitd /collection:CollectionName /p:projectName /n:Bug /f:"Bug.xml"
add the new field
FIELD name="Repro Steps" refname="Microsoft.VSTS.TCM.ReproSteps" type="HTML"
import the bug work item type
witadmin importwitd /collection:CollectionName /p:projectName /n:Bug /f:"Bug.xml"
This allows the search to find the field but with these minimum steps that field won't have anything in it. The search will effectively be on title and description only.
There are two other solutions:
- Change what fields are being searched on to not include reprosteps (I haven't figured out how to do this yet)
- Do the above, copy all the old data into the new field, show the new field on the WI. This would allow the search of the field as intended.

Unable to update field datatype

I had to create a work item template.In order to do it quickly.I created all the fields by opening the template in notepad and copy pasting them with differnent name but same datatype.
Then I import the template. Now I am trying to change the datatype form Open Wit from Server option , it is throwing me errors that datatype do not match . So I deleted those fields and reimported the templated.It is still throwing me the same error. I notice when I open work item field explorer then I can see the fields there. Even I have deleted them form workitem template.
So my question how can I delete Fields and work items.
For TFS 2008:
- To delete a work item type, use the "DestroyWITD" from the power tools
For TFS 2010:
Use WitAdmin DestroyWitd and WitAdmin DeleteField: http://msdn.microsoft.com/en-us/library/dd236914.aspx
Found the answer:
http://msdn.microsoft.com/en-us/library/dd236914.aspx

Resources