Conditional field rules for field values  
Author Message
pflangan





PostPosted: Team Foundation Server - General, Conditional field rules for field values Top

I'm trying to make a field readonly except for the creator of a work item. I know that I can use the <READONLY not="Group/User" to restrict readonly access to a particular group etc.

What I want to do is restrict ability to change the assignedto field to the person who created the work item.

The rule I'd like to exist is
<FIELD name="System.AssignedTo">
<READONLY not="System.CreatedBy" />
</FIELD>
This fails in the import process

Am I missing something obvious





Visual Studio Team System12  
 
 
Smitha S Saligrama





PostPosted: Team Foundation Server - General, Conditional field rules for field values Top

Try this...

<Field name="System.AssignedTo" refname....>

<WHENNOT field="System.CreatedBy" value="currentuser">

<ReadOnly/>

</WHENNOT>

</Field>



 
 
Mareen Philip





PostPosted: Team Foundation Server - General, Conditional field rules for field values Top

Hi,

This posting has the answer to a similar question. http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=195752&SiteID=1.

Using the XML above can make the field readonly in the UI. Users can bypass this by changing the data programmatically though. Full support for this will be available in a future release.

Thanks.

-Mareen.


 
 
pflangan





PostPosted: Team Foundation Server - General, Conditional field rules for field values Top

Thanks for the posts, this is helpful info. I'm in the process of testing it, but from the outset, it seems like it's exactly what I'm looking for.

I'll update if this is a suitable solution.

Thanks.

Paul Langan.


 
 
paso





PostPosted: Team Foundation Server - General, Conditional field rules for field values Top

Are you sure the suggestion above is working

To me it seems that "currentuser" is taken as a string and not as a reference to the current user logged in. If I change "currentuser" to a 'real' username, then the WHENNOT rule seems to work.