I'm trying to add a custom workitemtype to TFS.
I would like to have a field called SignOff, with possible values of Yes/No. Next to that I would like to have a field called SignOffBy - when you change the SignOff field the SignOffBy field should be set to the current user.
<FIELD name="Signoff" refname="MyProj.Signoff" type="String" >
<ALLOWEDVALUES expanditems="true">
<LISTITEM value="Yes" />
<LISTITEM value="No" />
</ALLOWEDVALUES>
<DEFAULT from="value" value="No" />
</FIELD>
<FIELD name="Signoff By" refname="MyProj.SignoffBy" type="String" >
<WHENCHANGED field="MyProj.Signoff">
<DEFAULT from="currentuser" />
</WHENCHANGED>
<WHENNOTCHANGED field="MyProj.SsoSignoff">
<READONLY />
<EMPTY />
</WHENNOTCHANGED>
</FIELD>
The problem seems to be that the SignOffBy field wants to be populated at all times. If I don't use the empty tag it just gets populated right away. I want it to be blank, but only get populated when the field gets changed. At the moment it's not changing at all - it's just blank and stays blank.