Click here to Skip to main content
15,881,757 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi,

I am trying to customize bug template by using ‘TFS Power Tool’. My requirement is to modify the selected value of a customized field (having some allowed values) based upon following conditions:

1. The transition (from OnHold State to Assigned).
2. Value in another field (Reason) should be equal to “Deferred”.

XML
I tried to achieve by adding rules by using ‘TFS Power Tool’.

Tool=>Process Editor=>Work Item Types=>Open WIT from Server, select the work item.

On the work Item Type Page, click WorkFlow tab, double click a Transition (from OnHold State to Assigned), select Fields tab on the dialog, then added reference for the customized field.

Xml code for the above steps:

<transition from="OnHold" to="Assigned" for="[project]\Managers">
          <reasons>
            <defaultreason value="Assign" />
          </reasons>
          <fields>
            <field refname="Microsoft.VSTS.Common.ActivatedBy">
              <copy from="currentuser" />
              <validuser />
              <required />
            </field>
            <field refname="Microsoft.VSTS.Common.ActivatedDate">
              <serverdefault from="clock" />
            </field>
            <field refname="CustomField.PrimusStatus">
              <when value="More information" field="System.Reason">
                <default from="value" value="O" />
              </when>
            </field>
          </fields>
        </transition>

Now again if I change the value of Reason field, the value in custom field (CustomField.PrimusStatus) should change.
But i am not able to do it. Any suggestion to achieve this.



Thanks in advance for any help.
Posted
Updated 6-Aug-13 0:02am
v2
Comments
Winston Madiano 6-Aug-13 5:42am    
Your Code?
JainPrince 6-Aug-13 6:31am    
Hi Winston,

Included my code and the steps i followed to achieve but got stuck to achieve complete solution.

1 solution

If you want to achieve this by coding then you may create plugins for TFS.
 
Share this answer
 
Comments
JainPrince 6-Aug-13 7:12am    
Could you please elaborate how to achieve.
CodeBlack 6-Aug-13 7:26am    
Tfs Provides facility to create plugins. If status of some field changed in workItem and you want to perform some action on TFS Template like changing Priority or changing IterationPath etc through coding than you can achieve this by Plugins.

Have a look at below URL.
http://www.nielshebling.de/?p=94

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900