Answered Filtering the Assigned To Field in TFS 2010

  • Thursday, February 23, 2012 7:32 PM
     
     

    Hello,

    In2008, I was able to filter the assigned to name in work items by editing the process template as follows:

    <FIELD name="Assigned To" refname="System.AssignedTo" type="String" syncnamechanges="true" reportable="dimension">
            <HELPTEXT>The person currently working on this task</HELPTEXT>
            <ALLOWEXISTINGVALUE />
            <ALLOWEDVALUES expanditems="true" filteritems="excludegroups">
              <LISTITEM value="[Test Project]\Contributors" />
            </ALLOWEDVALUES>
            <PROHIBITEDVALUES expanditems="true">
              <LISTITEM value="tfsservice" />
            </PROHIBITEDVALUES>
          </FIELD>

    If I try to do this in 2010, I get an error message when importing the project template.  It says:  Error importing work item type definitions TF 26204: The account you entered is not recognized.  Contact your Team Foundation Server administrator to add your account.

    This message occurrs whenever you use a backslash in the list item value.

    So...how does one accomplish this once simple task in TFS 2010????

    I read somewhere that you could use a global group, but that doesn't seem to work either.  I got the same mesage using a top-level group ([Team Foundation Server]) and a team project collection group.


    • Edited by Sophie B Friday, February 24, 2012 2:35 AM
    •  

All Replies

  • Friday, February 24, 2012 2:36 PM
     
     

    Sophie,

    try using instead the "tfsservice" following: "[GLOBAL]\Project Collection Service Accounts"


    Please remember to mark the replies as answers if they help. --- Success, Damir

  • Monday, February 27, 2012 2:40 AM
    Moderator
     
     

    Hi Sophie,

    Thank you for your post.

    Damir's suggestion is workable in my side, you should type the global group like "[Global]\XXX". How do you add a global group?

    If anything is unclear, please free feel to let me know.

    Best Regards,


    Lily Wu [MSFT]
    MSDN Community Support | Feedback to us

  • Monday, February 27, 2012 3:56 PM
     
     

    Lily,

    This is unclear for several reasons:

    1.  As far as I know you cannot add a global group.

    2.  The existing Global groups do not have the correct members in them.  I need a group whose members I can select.   Global groups have things like "all valid team foundation users" in them.  

    Just think about this:  Suppose this is a large organization with 1000 team foundation users.  For my particular team project, I want to see 30 people in the dropdown, not 1000 people.  Suppose for another team project, I have a different 50 people that need to be in the assigned to dropdown.   

    I need to be able to create a TFS group that I can put in the allowed values (no problem there), AND I need to be able to specify this group in the allowed values field.  But every time you put a backslash in the list of allowed values, I get the error I mentioned.  Therefore it is impossible to use any TFS group that I create other than global groups.

    Is there a way to create a new Global group?  If not, then I don't see how one can resolve this problem other than to manually specify a list of users for each team project, and then to manually update them every single time a new person joins or leaves the team.  Doing this is extremely inconvenient.

  • Tuesday, February 28, 2012 9:33 AM
     
     Answered Has Code

    Sophie,

    I have created a new Global (Collection) group: MyGlobalGroup and was also able to add that value in the prohibited values element:

    <FieldDefinition reportable="dimension" refname="System.AssignedTo" name="Assigned To" syncnamechanges="true" type="String">
      <ALLOWEXISTINGVALUE />
      <VALIDUSER />
      <PROHIBITEDVALUES>
        <LISTITEM value="[GLOBAL]\MyGlobalGroup" />
      </PROHIBITEDVALUES>
      <HELPTEXT>The person currently working on this bug</HELPTEXT>
    </FieldDefinition>

    This is working fine. Accounts that are in the MyGlobalGroup do not appear in the AssignedTo field (even if they are part of the Contributors group for example).

    What important is is that you put the [GLOBAL] including the brackets [ ]


    Please remember to mark the replies as answers if they help. --- Success, Damir

    • Marked As Answer by Sophie B Tuesday, February 28, 2012 6:31 PM
    •  
  • Tuesday, February 28, 2012 3:46 PM
    Moderator
     
     

    Hi, Sophie,

    It seems that the two concepts made you confused.  Process Template and Workitem template. In TFS 2010, process template is the workflow for team projects of different template, like Agile, CMMI etc.  Workitem template is the definition of workitems, like bug, test case and task etc. You're modifying workitem template in this case.

    The task is a typical scenario in workitem customization. That is to create pick list. See http://msdn.microsoft.com/en-us/library/ms194947.aspx

    Definitely we can create global group, as known as collection level group. To create collection level group, right click team project collection node from Team Explorer, Team Project Collection Settings-> Group membership; To create project level group, right click team project node, following steps are similar.

    All of these can be done with TFS Power Tool, let me know if there's anything unclear please.

    Regards,


    Forrest Guo | MSDN Community Support | Feedback to us

  • Tuesday, February 28, 2012 6:31 PM
     
     

    Damir,

    I'm going to mark your reply as an answer, but I want to note that the only thing at all that was confusing me was the concept of a global group in TFS2010.

    To me "global" implies the entire Team Foundation Server, not a Team Project Collection (TPC).

    It seems that a global group in 2010 is defined to be a group at the Team Project Collection level, not the server lever.  I did manage to figure out how to create both of those groups in 2010, but the TFS server  level group didn't work when I used your suggestion [GLOBAL]\Name of TFS server level group.

    So, next I tried using the TPC level group, and it did work.  Thank you very much for your response.

  • Tuesday, February 28, 2012 7:56 PM
     
     

    Sophie,

    I am glad that you have resolved the issue and I was able to help. I agree that the naming of GLOBAL is at least a little bit confusing at first. On the second thought the Collections are actually two separate entities and then it makes sense.


    Please remember to mark the replies as answers if they help. --- Success, Damir