locked
Can you populate ALLOWEDVALUES with only team members? RRS feed

  • Question

  • I see you can populate fields in the templates using global and project level groups:

    <LISTITEM value="[Global]\GlobalGroup" />
    <LISTITEM value="[Project]\ProjectGroup" />

    What about if you want to populate a template with only the team members?  e.g.

    <LISTITEM value="[Project]\TeamName" />

    I have a project with

    Team1
    Team2
    Team3

    Everyone is a member of the project group but they only belong to one Team.  When we create a story, task, or bug we'd rather populate some of the drop downs with only the names of those people who are part of the team.  People work in their team view  [Project]\Team which filters on their part of the backlog.  Seems like you should be able to do this.

    Friday, May 23, 2014 3:28 PM

Answers

  • Hi RangT, 

    Thank for your reply.

    I created a Team1 with 3 members in one of my TFS 2013 Update 2 team project, then created the below custom field in Bug work item, that 3 members show correctly in the custom field when I open the Bug work item in VS 2013. The result indicate that: I can use the LISTITEM value="[project]\Team1" in work item field.       

    <FieldDefinition name="Users" refname="demo.users" type="String">

      <ALLOWEDVALUES expanditems="true" filteritems="excludegroups">

        <LISTITEM value="[project]\Team1" />

      </ALLOWEDVALUES>

    </FieldDefinition>


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Friday, May 30, 2014 8:14 AM
    Moderator
  • Hi RangT,

    John's test lead me to do more test on this since before I gave my initial reply, I tried this in both TFS 2012.2 and TFS 2013.2.

    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 you in some way. 

    @John is there a way to say <LISTITEM value="[project]\<TheCurrentTeam>" /> which would be wonderful to have I think.

    Cheers!

    Chaminda






    Friday, May 30, 2014 8:17 PM

All replies

  • Hi,

    <LISTITEM value="[Project]\TeamName" /> will not work, instead you should use

    <LISTITEM value="[Project]\Contributors" /> to do this. depending on the team you are in the work item will have relevant team users only appearing in the field.  (You need to have all the teams as members of [Project]\Contributors security group to make it work)

    Logically it make sense because the [Project]\Contributors are the people who is going to contribute to the work in the project.

    Cheers!

    Chaminda



    Friday, May 23, 2014 5:49 PM
  • Hi RangT, 

    Thanks for your post.

    What’s the version of your TFS and VS?


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, May 26, 2014 5:54 AM
    Moderator
  • We're using TFS 2013 (Update 1 I believe)  Version 12.0.30324.0

    Visual Studio 2013 as well.


    Thursday, May 29, 2014 3:29 PM
  • Hi RangT, 

    Thank for your reply.

    I created a Team1 with 3 members in one of my TFS 2013 Update 2 team project, then created the below custom field in Bug work item, that 3 members show correctly in the custom field when I open the Bug work item in VS 2013. The result indicate that: I can use the LISTITEM value="[project]\Team1" in work item field.       

    <FieldDefinition name="Users" refname="demo.users" type="String">

      <ALLOWEDVALUES expanditems="true" filteritems="excludegroups">

        <LISTITEM value="[project]\Team1" />

      </ALLOWEDVALUES>

    </FieldDefinition>


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Friday, May 30, 2014 8:14 AM
    Moderator
  • Hi RangT,

    John's test lead me to do more test on this since before I gave my initial reply, I tried this in both TFS 2012.2 and TFS 2013.2.

    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 you in some way. 

    @John is there a way to say <LISTITEM value="[project]\<TheCurrentTeam>" /> which would be wonderful to have I think.

    Cheers!

    Chaminda






    Friday, May 30, 2014 8:17 PM
  • Hi Chamindac,

    Thanks for your reply.

    And thank you for sharing your very useful experience here. It will be very beneficial for other community members having the similar questions.

    I agree with that <TheCurrentTeam> is wonderful. You can submit it as a suggestion to User Voice site at: http://visualstudio.uservoice.com/forums/121579-visual-studio. Microsoft engineers will evaluate them seriously.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, June 2, 2014 2:13 AM
    Moderator