Is there a way in team foundation server 2010 to make a work item field read only from visual studio and team web access after synchronizing from a MS Project plan to TFS. This is an idea that I had but the problem is that the <READONLY /> attribute blocks the fields from synchronization with the project plan:
<WHENNOT field="Custom.WBS" value="">
<READONLY />
</WHENNOT>
To explain, when synchronizing the project plan for the first time, the WBS field is pushed to TFS with a value, then the field containing the condition above will be readonly, which is perfect, but unfortunately blocks further synchronizations and gives an error message saying that the field cannot be synchronized because it is readonly.
Is there a way to set a field as readonly without blocking synchronization from MS Project ?
I you want the field in the Work Item form to be always read-only you can set the control as read-only (which is different from the field rules, this is immutable). MS Project will still be able to modify the field but users won’t.
I don’t know if it’s what you want to achieve.
EDIT
Then I don’t think it’s possible to achieve what you need automatically, mainly because the WHEN/WHENOT conditions are only compared to a static value, ideally you’d need to compare against a dynamic value to detect a recent synchronization with MS Project.
You still can handle it by manually maintaining a boolean custom field that is used in the WHEN/WHENNOT condition, it’s better than nothing.