by XDK
21. June 2016 20:47
Explanation:
I got a requirement to add a custom field for initial estimate which is required and should be read only or non editable after creating the work item.
Solution:
Solution is to add a FROZEN rule along with REQUIRED rule as follow
<FIELD name="Inital Estimate" refname="Custom.InitalEstimate" type="Double" reportable="Measures">
<HELPTEXT>Inital estimate for this task</HELPTEXT>
<FROZEN />
<REQUIRED />
</FIELD>
Rule:
FROZEN - Prevents users from changing the value of a field once it contains a value. As soon as a user saves the work item with a value in that field, the value can no longer be modified.
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.