index > Team Foundation Server - Process Templates > How to creat an Unassigned user for the AssignedTo feild?

How to creat an Unassigned user for the AssignedTo feild?


How can I customize the template so I can have an Unassigned option in the Assigned To dropdown?
BobTheBuild

You can customize the workitem type definition and for System.AssignedTo field, you could have something like:

<FIELD name="Assigned To" refname="System.AssignedTo" type="String">
<ALLOWEDVALUES expanditems="true" filteritems="excludegroups">
<LISTITEM value="[Project]\Project Administrators" />
<LISTITEM value="[Project]\Contributors" />
<LISTITEM value="Unassigned" />
</ALLOWEDVALUES>
<DEFAULT from="value" value="Unassigned" />
</FIELD>

For help in customizing steps: http://msdn2.microsoft.com/en-us/library/ms195023.aspx




http://blogs.msdn.com/narend
Naren Datha - MSFT
Thanks a lot. Didn't realize I can mix hard coded values in there
BobTheBuild

Actually I encountered this error after making the above change: "TF20015: The field 'Assigned To' contains a value that is not in the list of supported values." when the Assigned To field shows "Unassigned". when I tried to add a new work item based the new template. I have the following state definition in addition to the definition of field above:

<STATE value="Created">
<FIELDS>
<FIELD refname="System.AssignedTo">
<DEFAULT from="currentuser" />
<VALIDUSER group="[Project]\Business Analysts" />
<ALLOWEDVALUES>
<LISTITEM value="Unassigned" />
</ALLOWEDVALUES>
</FIELD>
</FIELDS>
</STATE>

I want to limit to only the Business Analysts when an item is created. Likewise I want only the Developers group to be available in the Assigned To dropdown when the state changes to In Development. In addition, "Unassigned" should be available in very state.

BobTheBuild

The VALIDUSER key will restrict the values to users in that group, so you can try doing the below instead to use LISTITEM:

<STATE value="Created">
<FIELDS>
<FIELD refname="System.AssignedTo">
<DEFAULT from="currentuser" />

<ALLOWEDVALUES expanditems="true" filteritems="excludegroups">

<LISTITEM value="[Project]\Business Analysts" />
<LISTITEM value="Unassigned" />
</ALLOWEDVALUES>
</FIELD>
</FIELDS>
</STATE>




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

Naren:

I confirmed what you said above is working in my TFS now. Thanks a lot.

Now I have another issue. Consider the following transition:

<TRANSITION from="In Dev" to="Dev Complete">
<FIELDS>
<FIELD refname="System.AssignedTo">
<ALLOWEDVALUES expanditems="true" filteritems="excludegroups">
<LISTITEM value="[project]\Developers" />
<LISTITEM value="Unassigned" />
</ALLOWEDVALUES>
<REQUIRED />
</FIELD>
<FIELD refname="My.VSTS.Tax.Common.FixedBy">
<COPY from="field" field="System.AssignedTo" />
<VALIDUSER group="[project]\Developers" />
<REQUIRED />
</FIELD>
</FIELDS>
</TRANSITION>

I want Unassigned to be an option until an item is moved into the Dev Complete state. At that point I also want to set the FixedBy field with the value in AssignedTo. However, if I change the state to Dev Complete and change the Assigned To from Unassigned to a developer at the same time (that is, try to save both changes to gether), it gives an error saying: "The following fields are invalid: TTP Fixed By (ListValue). Save operation failed". Apparently TFS copies the old AssignedTo value to FixedBy rather than the new value.

My question is, is there a way to make to this work, that is, allow Unassigned until moving to the Dev Complete state and set the FixedBy value at the same time?

Thanks a lot
Bob

BobTheBuild
Bob, as you mentioned the value that was in assignedto will be copied to FixedBy as soon as the transistion happens, not after the transistion. So I could not think of a way to make the copy happen after the transistion and after user types another value in AssignedTo field - it seems like what you'll need is rules based on field changes with some constraints. You might want to see if asking users to fill in FixedBy instead of AssignedTo is an option.


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

You can use google to search for other answers

 

More Articles

Extending the Project Creation Wizard
ACTUAL Expected Behavior of the <WHEN*>, <DEFAULT> an...
Extending the Project Creation Wizard without a new UI screen
Can I trigger a stored procedure or SQL statement from TFS?
Creating field which is a value dependent on other fields
Changing theme on WSS loses CSS styles
MSFWinBuildTool
Hide the team project name screen during a new team project setup
How i can changed task item Start Date and Finish Date?
Can you add portal and reporting later?
Welcome to Bokebb   New Update   Joins the collection  
 

New Articles

Modify CMMI process description
ACTUAL Expected Behavior of the <WHEN…
Process Creation wizard
Modifying Work Items\Team Queries folder…
TFS Templates with Reports and Sharepoin…
Reports are not accessible from Team Fou…
Using MS Project Agile Software developm…
Help Needed
Omitting Process Guidance stuff?
Creating Area/Iteration Path Nodes
AreaPath value in Field Conditions
Changing field type on a COPY?
Creation of query with required value of…
Where does the "Assigned To" l…
Purpose of Iterations

Hot Articles

Changing field type on a COPY?
What can be localized and when?
AreaPath value in Field Conditions
Create Team Project from existing Project
how to start the defect id from 1?
Override policy
Can I add a field to a work item after t…
is there a way a field turns into a requ…
Can a field in a Work Item Type be a ref…
Delete Work Item Type
how can I change my process template?
Creating Area/Iteration Path Nodes
Error creating a new Team Project using …
Trouble reusing a field name
load testing query for 1.0 application

Recommend Articles

Transition Reasons
Task Context mapped into new ms project …
TF30272: Template not found on the server
Setting default WorkItem field values du…
Update documents on process guidance.
How to provision a new team project with…
Purpose of Iterations
process template dependencies problem
Work item field formula
MSFWinBuildTool
how do i add more bug status's?
Transitioning WorkItems from one TeamSer…
Header Images
Get list of Iterations and Builds via OM
What's the different effect if I select …