How to allow to modify a field during specific transition and have it read-only in all states?  
Author Message
Vladimir Bougay





PostPosted: Team Foundation Server - Work Item Tracking, How to allow to modify a field during specific transition and have it read-only in all states? Top

My recent work with WIT customization troubled me with one more issue. I need to have one field to be read-only except transition from one specific state to another when it filled by some value. The problem is that when the field defined read-only (in field definition or state definition) there is no way to override this setting during specific transition. I couldn't say that in specific transition that field should be modifiable. Is it possible to overcome this limitation or not


Visual Studio Team System7  
 
 
Vladimir Bougay





PostPosted: Team Foundation Server - Work Item Tracking, How to allow to modify a field during specific transition and have it read-only in all states? Top

Any chance to get this question answered

 
 
Aliaksei Baturytski - MSFT





PostPosted: Team Foundation Server - Work Item Tracking, How to allow to modify a field during specific transition and have it read-only in all states? Top

I cannot think of an easy way for doing that, however, this is possible:

- Make your field r/o for all states except destination one (<WHENNOT field="System.State" value="YourState"><READONLY/></WHENNOT>). This will make it editable only in a certain state

- Make your field r/o in all transitions into that state excluding the transition where you want this field to be editable.

This should work - your field will be editable only in a certain state - and a certain transition occured.

Thanks,

Alex