Note that there are some explanatory texts on larger screens.

plurals
  1. POHow can I prohibit State change from Proposed to Active in TFS Requirement work-item based on value of another field?
    text
    copied!<p>I've added department approvals to the standard CMMI-Template Requirement work-item. I'd like to limit the System.State field such that it can only be changed from <strong>Proposed</strong> to <strong>Active</strong> when all department approvals are set to "Yes".<br> <img src="https://i.stack.imgur.com/KnK84.jpg" alt="Requirement Work-Item with Approvals"></p> <p>I've tried the following change to Requirement.xml</p> <pre><code>&lt;FIELD name="State" refname="System.State" type="String" reportable="dimension"&gt; &lt;WHEN field="Approval.Marketing" value="No"&gt; &lt;READONLY /&gt; &lt;/WHEN&gt; &lt;WHEN field="Approval.Quality" value="No"&gt; &lt;READONLY /&gt; &lt;/WHEN&gt; &lt;WHEN field="Approval.RD" value="No"&gt; &lt;READONLY /&gt; &lt;/WHEN&gt; &lt;WHEN field="Approval.System" value="No"&gt; &lt;READONLY /&gt; &lt;/WHEN&gt; &lt;WHEN field="Approval.ProgManagement" value="No"&gt; &lt;READONLY /&gt; &lt;/WHEN&gt; &lt;/FIELD&gt; </code></pre> <p>This causes the State field to become READONLY if any of the approval fields are set to "No" which is what I want. However it causes problems when creating a new requirement since the approvals are all "No" initially and thus the initial "Proposed" default for State doesn't get set due to READONLY condition. What I'd like is to do is add logic to the WHEN conditions above to <strong>AND</strong> them with the condition System.State="Proposed". I tried nesting WHEN clauses such as</p> <pre><code>&lt;FIELD name="State" refname="System.State" type="String" reportable="dimension"&gt; &lt;WHEN field="System.State" value="Proposed"&gt; &lt;WHEN field="Approval.Marketing" value="No"&gt; &lt;READONLY /&gt; &lt;/WHEN&gt; . . . &lt;/WHEN&gt; &lt;/FIELD&gt; </code></pre> <p>But this gets an error on import that <strong>WHEN</strong> clause cannot contain <strong>WHEN</strong>. How can I prohibit State change from <strong>Proposed</strong> to <strong>Active</strong> when any of the Approval fields are set to "No"</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload