tfs - How to order rules in work item field -


is there way apply rules in specific order?

i want offer yesno if 2 specific values selected field... rules in xml this:

  <when field="xxx.yyy.foundinversion" value="xxx">     <allowexistingvalue />     <allowedvalues not="[project]\xxx" expanditems="true">       <listitem value="no" />       <listitem value="yes" />     </allowedvalues>   </when>   <when field="xxx.yyy.foundinversion" value="yyy">     <allowexistingvalue />     <allowedvalues not="[project]\xxx" expanditems="true">       <listitem value="no" />       <listitem value="yes" />     </allowedvalues>   </when>   <allowedvalues not="[project]\migrationaccounts" expanditems="true">     <listitem value="no" />   </allowedvalues> 

this works. if either of both whens correct yes , no allowed.

but tfs somehow automatically (on different/target instance) moves last allowedvalues rule top, , no allowed , selectable, if select 1 of values "yyy" or "xxx" in other field.

it seems cache somewhere, or try intelligent or sth.

how can force/workaround rules own order?

rules typically processed in sequence in listed. however, when use when*, default, , copy elements, additional behaviors may apply.

you can gain idea of how rules evaluated when apply multiple rules field. how rules evaluated not deterministic. section describes expected behavior , interactions when using when*, default, , copy rules.

the following steps show, in correct sequence, interactions tfs performs , user of work-item form. steps 1, 8, , 13 performed user.

1.from team foundation client─such visual studio, team explorer, team web access, or team explorer everywhere─, user creates new work item or edits existing work item.

2.fill in field defaults. fields, use default rules outside when* rules.

3.copy field values. fields, use copy rules outside when* clauses.

4.for fields when rule matches, first default , copy rules inside.

5.for fields whennot rule matches, first default , copy rules inside.

tfs processes when rules before whennot rules.

6.for fields have had values changed since step 1 , contain whenchanged rules, first default , copy rules inside.

7.allow user start editing.

8.the user changes field value , moves focus field.

9.raise when rules field match new value.

10.raise whennot rules field match new value.

11.raise whenchanged rules field match new value.

12.return editing ability user.

13.the user saves changes database.

14.for fields, perform serverdefault operations defined field either directly or indirectly under when or whennot rule.


Comments

Popular posts from this blog

java - Static nested class instance -

c# - Bluetooth LE CanUpdate Characteristic property -

JavaScript - Replace variable from string in all occurrences -