A question in MSDN Forum lead me to do some experiments on restricting AssignedTo field of a work item to Team Members. 
Here are some notes  
1. I created team project CustomizeTest  
2. This created default team "CustomizeTest"  
3. I tried modifying Bug WIT template AssignedTo field  
<ALLOWEDVALUES expanditems="true" filteritems="excludegroups">  
    <LISTITEM value="[project]\CustomizeTest" />  
  </ALLOWEDVALUES>  
TFS template was not imported. Error  
Error importing work item type definition:  
TF26204: The account you entered is not recognized. Contact your Team Foundation Server administrator to add your account.  
4. Created a new team "Team1" and tried with  
<ALLOWEDVALUES expanditems="true" filteritems="excludegroups">  
    <LISTITEM value="[project]\Team1" />  
  </ALLOWEDVALUES>  
Wow it works fine.  
5. So where did I go wrong.... Got it... The default team of team project "CustomizeTest" is created as "CustomizeTest Team"  
<ALLOWEDVALUES expanditems="true" filteritems="excludegroups">  
    <LISTITEM value="[project]\CustomizeTest Team" />  
  </ALLOWEDVALUES>  
Works fine.  
OK That is that and it works...BUT  
Another experiment notes  
1. I assigned one member to my Team1  
2. Customized Bug WIT AssignedTo field to have  
<ALLOWEDVALUES expanditems="true" filteritems="excludegroups">  
    <LISTITEM value="[project]\Team1" />  
  </ALLOWEDVALUES>  
3. Went into Team project CustomizeTest\Team1 and tried creating Bug. Assigned To field drop down have only one member. yeah I am happy.  
4. Went into root team project CutomizeTest (CustomizeTest Team) Create Bug. AssignedTo field only has that one member in Team1. Ok it should be since I have made it to work like that.  (my CutomizeTest Team has 3 Members but I can assign a bug in this team only to one member of the Team1, looks like I made some bad customization)  
5. I created another Team "Team2" with 2 members.  and modified my Bug WIT AssignedTo field to have  
<ALLOWEDVALUES expanditems="true" filteritems="excludegroups">  
    <LISTITEM value="[project]\Team2" />  
  </ALLOWEDVALUES>  
Now when I go into "CustomizeTest Team", "Team1" and "Team2". Create a bug I can assign it to only to the two members of the "Team2".  
6. I changed my Bug WIT AssignedTo field to
 
<ALLOWEDVALUES expanditems="true" filteritems="excludegroups"> 
     <LISTITEM value="[project]\Contributors" />  
  </ALLOWEDVALUES>  
and I added teams "CustomizeTest Team", "Team1" and "Team2" as members of [project]\Contributors.  
This lists all members from the three teams in my AssignedTo field regardless of the team I am in.  
Think all above my experiments will help someone in some way.
 
If there is  a way to say <LISTITEM value="[project]\<TheCurrentTeam>" /> which would be wonderful to have I think.
  
Subscribe to:
Post Comments (Atom)
Popular Posts
- 
As we discusssed in " Setup Redis Cluster with JSON and Search Modules on AKS with Binami Redis Using Custom Image " the cluster...
 - 
Setting up an Azure File Share capacity alert is useful to know when you reach at least 80% of allocated quota for the file share . This w...
 - 
We have discueed, that we have to use an environment variable to handle input parameter default values, if we are using trigger for workflo...
 - 
Pull Request are the controlled way to bring in the changes to your stable branches in your Azure Git repos, or for that matter all Git prov...
 - 
Sometimes you may need to edit files especially the web.config or appsettings.json files after deploying your application to Azure App Servi...
 
1 comment:
Have you tried:
It would be not be ideal, since you'd need to change the values each time a team is added or removed or renamed, but it's a workaround that should work for now, as you can have multiple ALLOWEDVALUES rules on the same field.
Post a Comment