index > Team Foundation Server - Process Templates > Setting default WorkItem field values during creation of New Team...

Setting default WorkItem field values during creation of New Team...


Hi, I've created a creation wizard that will gather information from the user when they create a new team project.

I'd like to be able to set some fields of work items when they are created to the values that were entered in the wizard during project creationg.

For example, during the wizard a user will enter the project category along with name. Each bug entered will also have the project category saved in a field that is also a dimension. I don't want the user to have to enter the project category when entering bugs.

Is there any way to get the information from the wizard back into the Team Project XML? Or some way to change the Process template tasks lists during project creation to have the custom field default to a certain value?

Thanks in advance.

Ben.




Ben
Ben Tsui
One option I could think of: You could have your project creation task after work item tracking task, and in your task you could witexport the workitem type xml programmatically, and import it after changing certain xml rule elements.


http://blogs.msdn.com/narend
Naren Datha - MSFT

Thanks for the advice. I'll try it.

One thing that I was trying to do - during the Execute of my wizard I was thinking of somehow changing the WorkItem XML's and having the default value set - but I couldn't figure out if the XML's for work items was saved anywhere, loaded already? I'll try your suggestion - I think it may be the missing piece.

Thanks




Ben
Ben Tsui

How about using witexport and witimport?




Robert Kozak
Robert Kozak

Is there a similar Team Foundation set of classes that I can use that are similar to witexport and witimport that I can use programmatically in the wizard?

Is it possible to extend the Microsoft.ProjectCreationWizard.WorkItemTracking wizard to modify the XML before it is put into Team Server?

Thanks.

Ben




Ben
Ben Tsui

Yes, there are ways to do witimport and witexport programmatically. You can use WorkItemType.Export, WorkItemTypeCollection.Import methods in object model to do it.

I do not think there are extensiblity points in workitemtracking plugin to modify it. It is actually better to modify wit xml after the workitemtracking plugin creates default workitems for the process template, because if we do it before then the workitems created in pcw will be subjected to that rules as well. Also, I do not see any significant savings in adding that code in wit plugin instead of in your own plugin.




http://blogs.msdn.com/narend
Naren Datha - MSFT
Thanks for you help Naren, worked like a charm.


Ben
Ben Tsui
reply 7

You can use google to search for other answers

 

More Articles

can you create an alias for a field?
work items are not publishing from project professional
Adding Numerics in addition to COPY for work items
Create a Team Project Programatically
uploading Agile templates in italian to en english TFS
Area and Iteration fields and field constraints
HelpText
TF30272: Template not found on the server
Selecting multiple customers in a single work item
Can I create new Fields with hierarchical values?
Welcome to Bokebb   New Update   Joins the collection  
 

New Articles

Sample code for getting the global list …
Can a field in a Work Item Type be a ref…
How to provision a new team project with…
MSFWinBuildTool
MetaData.xml & MethodologyTemplate.xml
how do i add more bug status's?
Create Team Project from existing Project
Latest version MSF Agile Process Template
why is 'Rank' a string type?
FileMapping.xml gets corrupt during temp…
Is it possible to define checkin rules v…
Delete Work Item Type
Can a group and permissions be loaded in…
Set up: Set Permissions Work Item
Add new Work Item type to existing project

Hot Articles

2 questions.. how do you rename a work i…
creating new process template
Is there a way to automate (complete/par…
Does TFSDeleteProject really delete?
How to define a conditional transition?
Can I create new Fields with hierarchica…
Ability to incorporate relational data w…
Release > Project > Task hierarchy…
Extending the Project Creation Wizard wi…
Modifying MSF Process Guidance
TF30272: Template not found on the server
create a default work item
MS Project and Publish & Refresh Pro…
Extending the Project Creation Wizard
Purpose of Iterations

Recommend Articles

Review WI isn't associated with an itera…
Modify CMMI process description
WssTasks.xml
Can I create new Fields with hierarchica…
Multiple iteration fields in a task.
Another TF30177 Error: Team Project Crea…
What can be localized and when?
AreaPath value in Field Conditions
Modifying MSF Process Guidance
Changing Methodology During Working On T…
Problem opening a work item in a templat…
Limitation in MS Project ?
Anyone working on a Crystal Clear proces…
can you create an alias for a field?
creating work - item. is attribute refna…