1

We have a customized workflow in TFS 2017 and want to make a field mandatory (REQUIRED) when the work item is pulled to the kanban done column (state will not change!).
As far as I know only state changes may get REQUIRED rules.

I tried this but it does not work:

<FIELD name="AcceptanceCriteria" refname="Whiteduck.Scrumban.AcceptanceCriteria" type="HTML">
  <HELPTEXT>What criterias have to be fulfilled (what, how, restrictions, etc.).</HELPTEXT>
  <WHEN field="System.BoardColumnDone" value="true">
    <REQUIRED />
  </WHEN>
</FIELD>

For state changes this had worked:

<TRANSITION from="Analyze" to="Test">
  <REASONS>
    <DEFAULTREASON value="Test" />
  </REASONS>
  <FIELDS>
    ...
    <FIELD refname="Whiteduck.Scrumban.AcceptanceCriteria">
      <REQUIRED />
    </FIELD>
  </FIELDS>
</TRANSITION>

Any chances to apply a rule on a kanban done pull?

ndee
  • 375
  • 2
  • 12

1 Answers1

0

To make a field mandatory in a work item you just need to add the REQUIRED rule for your field. It's not related to states changes only.

REQUIRED

Requires a user to specify a value for the field. Users cannot save a work item until they have assigned values to all required fields.

More details please refer this tutorial-- Require, read-only, and restrict values

You can specify these rules to take affect during a workflow transition or as child elements within a FIELD (Global workflow) element.

So this will not work when the work item is pulled to the kanban done column without a transition. Your requirement could not be achieved for now.

PatrickLu-MSFT
  • 49,478
  • 5
  • 35
  • 62
  • 1
    Summarized: Not possible at the moment because rules only take effect on transitions between states and kanban doing/done is no state change. WorkAround: Add a new state "DevelopDone" and apply a rule on that state. – ndee Jul 17 '17 at 10:05