Assigning users to TFS if two fields have specific values

An updated question with additional information as a solution is not applicable.

Sorry, I will have to ask this question again. My goal is to implement some TFS automation for the Assigned To field. This field must be filled with some values ​​in the module and category fields.

Is there a way to create an AND operator in the TFS XML interface that can handle this? I asked this question a couple of months ago and got an answer. Unfortunately, I did not have time to realize it because of several objects that went down the pipe. When I tried to implement the solution and when importing WIT, TFS would throw "WHEN", it has a child element error of "WHEN".

Example:

If "Module" field = value X and "Platform" field = value Y, then "Assigned to" field is set to specific user

This solution does not work:

<FIELD name="QA Owner" refname="<QAOwnerFieldReference>" type="String">
<VALIDUSER />
<WHEN field="<ModuleReferenceName>" value="Compliance">
<WHEN field="<AnotherFieldName>" value="SomeValue">
<DEFAULT from="value" value="<QATester>" />
</WHEN>
</WHEN>
</FIELD>

I have an idea if it is possible to merge the second condition "WHEN" with the first, for example:

<WHEN field="<ModuleReferenceName>" value="Compliance" && WHEN field="<AnotherFieldName>" value="SomeValue">

Link to previous post: Assigning users to TFS if two fields have specific values

+4
source share
2 answers

The only viable solution I can find for this is to create a custom control that will process the ruleset before saving the work item.

Check out the Gregg Boer Blog for a quick tutorial on creating custom WI controls . Please note that this will need to be installed on each client computer.

Note that you will want to write a BeforeUpdateDatasource event handler.

Also, if you want this to be done on the Internet, you need to create a custom web access control (see the Ewald Hoffman post on WA controls).

+1
source

To create an effect and you need to fulfill cascading two conditions. Not perfect, but what will you do :)

Your WIT field definition might look like this:

<FIELD name="QA Owner" refname="<QAOwnerFieldReference>" type="String">
<VALIDUSER />
<WHEN field="<ModuleReferenceName>" value="Compliance">
<WHEN field="<AnotherFieldName>" value="SomeValue">
<DEFAULT from="value" value="<QATester>" />
</WHEN>
</WHEN>
</FIELD>

+2
source

Source: https://habr.com/ru/post/1414134/


All Articles