Welcome to MSDN Blogs Sign in | Join | Help

FAQ #2: How do I enforce a rule on Area Path or Iteration Path?

I saw a question on this recently and thought it would be good to contribute to the FAQ that Gregg started:

Incidentally, this solution is from Gregg too :-)

  <FIELD name="Iteration Path - Validation" refname="MyFields.IterationPathValidation" type="String">
   <HELPTEXT>Hidden field used to validate Iteration Path</HELPTEXT>
   <WHEN field="System.IterationId" value="XX">
    <COPY from="value" value="Restricted" />
   </WHEN>
   <PROHIBITEDVALUES not = "[project]\Project Administrators">
    <LISTITEM value="Restricted"/>
   </PROHIBITEDVALUES>
  </FIELD>

Where XX is the Iteration ID of the root level node. Change Iteration to Area for Area Path field. So if you want to prevent users specifying just root node as AreaPath or IterationPath, put the project name (root) there and users will get an error message that "Iteration Path - Validation has invalid value.

Note: This will work for Area Path as well.

-Siddharth

 

Published Wednesday, January 30, 2008 4:13 AM by sbhatia

Comments

# Teams WIT Tools : FAQ #2: How do I enforce a rule on Area Path or Iteration Path? &laquo; Noocyte&#8217;s Weblog

# VSTS Links - 02/04/2008

Monday, February 04, 2008 9:13 AM by Team System News

Martin Hinshelwood on TFS Event Handler CTP 2 Released. Brian Harry on Requirements management with Team...

# re: FAQ #2: How do I enforce a rule on Area Path or Iteration Path?

Wednesday, February 13, 2008 4:18 PM by barnesbuilt

This is exactly what I'm needing but it fails.  No matter what I put in it throws the error.  Any ideas?

# re: FAQ #2: How do I enforce a rule on Area Path or Iteration Path?

Sunday, March 23, 2008 11:57 PM by sbhatia

Hi barnesbuilt,

Sorry for the delay.

Could you reply back to sbhatia(at)Microsoft.com with the error?  We'll look into it.

Thanks,

-Siddharth

# re: FAQ #2: How do I enforce a rule on Area Path or Iteration Path?

Thursday, February 05, 2009 6:13 PM by Richard Berg

Using the XML definition above, it was impossible to get the field to validate, even if the user changed to a valid area path.  Here was my solution:

     <FIELD name="Iteration Path - Validation" refname="MyFields.IterationPathValidation" type="String">

  <HELPTEXT>Hidden field used to validate Iteration Path</HELPTEXT>

  <WHEN field="System.IterationId" value="XX">

   <COPY from="value" value="Restricted" />

  </WHEN>

  <WHENNOT field="System.IterationId" value="XX">

   <COPY from="value" value="Ok" />

  </WHENNOT>

  <PROHIBITEDVALUES not = "[project]\Project Administrators">

   <LISTITEM value="Restricted"/>

  </PROHIBITEDVALUES>

 </FIELD>

Anonymous comments are disabled
 
Page view tracker