Answered Customize the Assigned To dropdown box

  • Tuesday, November 29, 2011 3:58 PM
     
     

    Hi,

    Our development team has decided to go with TFS 2010 and Visual Studio 2010. We have also decided to use the latest process template Visual Studio Scrum 1.0.

    We found a need to customize the template a little bit. The first thing we want to do is link the "Assigned To" dropdown on the Product Backlog Item entry form, the Bug entry form, to a custom windows group. It appears that by default the templates pulls everyone that is a "valid" user according to the TFS, which is not what we want.

    I tried to create a TFS group at the Collection level with domain users from Visual Studio 2010. For example, the group is called "DevTeam" with a few domain users such as myDomain\hSmith, myDomain\DAlice, etc.

    But when I tried to change the "Assigned To" control to point to this group using the Process Editor, I got the following error: 

    Failed to save the 'Product Backlog Item' Work Item Type to the server.

    TF26204: The account you entered is not recognized. Contact your Team Foundation Server administrator to add your account.

    But I was able to point the dropdown box to a built-in TFS group such as Project Collection Administrators.

    I appreciate any insight and assistance in this matter.

    Thanks.

All Replies

  • Tuesday, November 29, 2011 7:23 PM
     
     

    Hi Johnyyu

     

    I think you can only refernce groups that are known at the TeamProject level. If you have a group "DevTeam" added to the TeamProject, modify the xml-code of the WorkItem as follow (I didn't test it, so i am 100% sure if this will work ;-)

     

          <FIELD reportable="dimension" refname="System.AssignedTo" name="Assigned To" syncnamechanges="true" type="String">
            <ALLOWEDVALUES expanditems="true" filteritems="excludegroups">
              <LISTITEM value="[project]\DevTeam" />
              <HELPTEXT>The person currently working on this work item.</HELPTEXT>
            </ALLOWEDVALUES>
          </FIELD>

     

    Does that work for you? And make sure you have added the group to the project before you try to modify the work-item.

     

    Regards,

    Riccardo

     

     

  • Tuesday, November 29, 2011 9:39 PM
     
      Has Code

    Thanks Riccardo.

    I replaced the Assigned To definition in the Export with what you have provided as shown below.

    <FIELD reportable="dimension" refname="System.AssignedTo" name="Assigned To" syncnamechanges="true" type="String">

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

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

            </ALLOWEDVALUES>

     </FIELD>

     

    I got the same error message.

     

    Failed to save the 'Product Backlog Item' Work Item Type to the server.
    
    TF26204: The account you entered is not recognized. Contact your Team Foundation Server administrator to add your account.
    
    

    Any idea why?

     

    Thanks.

  • Tuesday, November 29, 2011 10:03 PM
     
     
    Hm... from the message this looks like a problem with the backslash in "[project]\RequirementTeam". I can not test it myself right now, but will tomorrow and let you know...
  • Tuesday, November 29, 2011 11:44 PM
     
     
    Thank you so much. Looking forward to your findings!
  • Wednesday, November 30, 2011 7:33 AM
     
     Answered

    Hi

     

    Hm... that is strange. I have tried it on my system again today and it works perfectly. What I have done was adding a new group "MyTeam" to the TeamProject, opened the WorkItem for editing and added "[project]\MyTeam" to a new "AllowedValues" rule of the AssignedTo field:

     

    It did let me save that change without any problems and after that, only users from that security group "MyTeam" show up in the AssignedTo list. The code looks like this after saving it:

          <FIELD reportable="dimension" refname="System.AssignedTo" name="Assigned To" syncnamechanges="true" type="String">
            <ALLOWEXISTINGVALUE />
            <VALIDUSER />
            <ALLOWEDVALUES filteritems="excludegroups">
              <LISTITEM value="[project]\MyTeam" />
            </ALLOWEDVALUES>
            <HELPTEXT>The person currently working on this work item.</HELPTEXT>
          </FIELD>

     

    I am not sure what the problem could be on your side :-/ I guess you will have to wait until someone from MS or some other expert sees this thread and has an answer :-)

     

    Last guess I have: Did you add the group to the TeamProject and added some users to it? Maybe some localization issue... maybe try "/" or "|" instead of the backslash or without backslash at all in "[project]\RequirementTeam"

     

    Thanks and regards,

    Riccardo

     

  • Thursday, December 01, 2011 6:41 AM
    Moderator
     
     Answered

    Hi Johny,

    Welcome to MSDN forum.
     
    According to your description of the issue, I suppose you want to set the value of "Assigned To" as your custom windows group.

    I have simulated this issue as below for you to refer.
    1. In our domain, i create two users: hSmith and DAlice.
    2. Create a Collection level group. In Team Explorer, right-click the collection-->Team Project Collection Settings-->Group Membership-->New-->Group name: DevTeam-->OK. Double-click [your collection]\DevTeam-->select Windows User or Group-->Add-->add hSmith-->OK, then add DAlice too.
    3. Create "Product Backlog Item" work item type. Tool-->Process Editor-->Work Item Types-->Open WIT from server-->Copy an existings work item type and change the name as "Product Backlog Item".
    4. In Field tab, double-click Assigned To-->Rules-->New-->ALLOWEDVALUES-->in ALLOWEDVALUES window, click New-->in List Item Edit wondow, enter [Global]\DevTeam-->OK, then save this work item type.

    5. Create a new "Product Backlog Item", in Assigned To drop down list, hSmith and DAlice are there.

    I suggest you make a try by following my simulation step by step.

    I hope this information will help resolve this issue.
     
    If anything is unclear, please free feel to let me know.

    Best Regards,


    Lily Wu [MSFT]
    MSDN Community Support | Feedback to us
  • Friday, December 02, 2011 8:01 PM
     
     

    Thank you, Lily and Riccardo for your replies.

    I followed all the steps both of you specified. Riccardo's steps got me a bit closer but still not quite right. I got the same error following Lily's steps. The picture below shows the steps I followed Lily's steps.

     

     

    What I got in return for following Riccardo's instructions was interesting. Instead of the members in the group I got the actual group name populated in the drop down.

     

    By the way, I don't think I have mentioned the operating systems where TFS and Visual Studio are installed. 

    TFS: Windows 2008 R2 Standard

    VS 2010: Windows XP SP3.

     

    Thanks.

     

  • Monday, December 05, 2011 1:23 AM
    Moderator
     
     

    Hi Johny,

    In order to narrow know the issue, would you please edit the screen shot, it is not visible now.

    Best Regards,


    Lily Wu [MSFT]
    MSDN Community Support | Feedback to us
  • Monday, December 05, 2011 5:19 PM
     
     

    Thanks Lily.

    I re-read all your steps to make sure that I had not missed anything. I found I did exactly as your steps except step 3:

    3. Create "Product Backlog Item" work item type. Tool-->Process Editor-->Work Item Types-->Open WIT from server-->Copy an existings work item type and change the name as "Product Backlog Item".

    I am not sure what

    Copy an existings work item type and change the name as "Product Backlog Item".

    means. I could only get to "Open WIT from server" which will open the template for editing.

    Since I was not sure how to copy an existing work item type and change the name as "Product Backlog Item", I just did the "open the WIT from server" and started to customize the Assigned To field. Below is what I have. When I am done adding the global group and save the changes I got the same error, also shown below.

     


    Error message I got when saving the changes made to the Assigned to field.


     

    Thanks for your help.

     

     

  • Tuesday, December 06, 2011 3:11 AM
    Moderator
     
     

    Hi Johny,

    I have simulation the issue again, everything in my side is working well. I have done some other tests and research for the questions you mentioned in your poat above, the result is as following.

    1. About create "Product Backlog Item" WIT by copying existing default WIT. This is used to ensure the default WIT not been wrong changed.
    When you done "Open WIT from server" to a default WIT and do not change the WIT name to a new one, after you modify it and save the modify, you acturally do changes to the default WIT.
    In step3 of my simulation, i open "Bug" WIT from server and change the Name to a Product Backlog Item, after i save it, there is a new WIT in the list, and the default "Bug" WIT is still there too.

    2. For "TF26204", i noticed there is "HRSA\HDW Development Team" in the "ALLOWEDVALUES" list from your screen shot, is it a user group?
    Can you save the WIT when you delete "HRSA\HDW Development Team" that just add [Global]\DevTeam?
    If your Team Project is named HRSA, you should use "[HRSA]\HDW Development Team", not "HRSA\HDW Development Team". Using "HRSA\HDW Development Team" will return: TF26204 error.

    3. You can try to use witadmin destroywitd /? command to delete this WIT, then recreate this WIT again. http://social.msdn.microsoft.com/Forums/en-GB/tfsprocess/thread/bbfe7588-1829-4237-b404-c3415b8f2851

    I hope this information will help resolve this issue.
     
    If anything is unclear, please free feel to let me know.

    Best Regards,


    Lily Wu [MSFT]
    MSDN Community Support | Feedback to us
  • Wednesday, December 07, 2011 3:03 AM
     
     

     

    Thanks Lily.

    I am  not quite sure if your first above means. Did you mean that after you open a WIT template such as the backlog item template you do a "Save as..." first before you make any changes to it? If that is the case I can give it a try. As a side note I already saved a copy of the template by exporting it as XML.

    Now your second bullet on TF26204. Sorry for the confusion.  "HRSA\HDW Development Team" is actually a domain group that works fine with "HRSA" being the name of the domain. I should have mentioned it in my earlier reply. I just don't get it why TFS does not recognize "[Global]\DevTeam"? What should be done for TFS to understand it?

    The good news is that I have done the same thing on a different TFS server that runs on a different network and it works perfectly. What I did was that I first created a collection level group. I then added a few windows group (note that they are not domain groups and each group has a number of domain users) to the collection group. Finally for the Assigned To field I removed the existing "validuser" entry and in its place I added an "allowedvalues" item. And for its value I typed [global]\myGroupName with the Exclude Groups checkbox checked. After I did this and checked what appeared on the Assigned To field. Everyone from each group shows up as expected. This is the way it is supposed to work.

    This led me to think that there must be something wrong the server where I am having problem customizing the Assigned To field. If you can shed some light on this I'd really appreciate it.

    Thanks.

     

  • Wednesday, December 07, 2011 7:33 AM
     
     

    Hi Johny,

    It seems wierd of the issue.

    I tried lily's step in my side, everything works fine.

    Why not try to use witadmin destroywitd /? command to delete this WIT, then recreate this WIT again, the issue may not exists any more.

    More information like logs, screen shot may help, it is hard to narrow know the issue for o detail information.

    Thanks,

  • Friday, December 09, 2011 4:26 PM
     
     
    Thanks Mini Jacson.
    Sorry it took me so long to reply. I have not been able to do due to the issues the forum experienced this week. The forum is finally back.
    Yes indeed. I was able to do it following her steps on a different TFS that is hosted on machine in a different network. I am really at loss now as what has gone wrong. What could go wrong?
    I could certainly try to run the command but I am a bit concerned as to what it might do to those backlog items that were created based on it. Do you know? After those backlog items are migrated to our production server I will have no problem testing that command.
    Thanks.
  • Friday, December 09, 2011 9:45 PM
     
     

    Hi Johny,

    I'm not 100% sure, but this might relate to TFS 2010 SP1. Take a look at your TFS servers and check if they both have SP1 installed (or not).

    I would also make sure that the same (and latest) version of wit editor was used. Older versions had some interesting flaws.

    Also, you might want to try exporting the work item template, edit the raw xml (without the help of the template editor), and then import the work item template back into your project. Worked for me when I ran into a similar problem...

     


    Jesper Fernström
    QWise Software engineering – refactored!
  • Friday, August 17, 2012 7:14 PM
     
     

    Johny,

    I don't know if this is your problem, but I was using the actual project name rather than using the literal text: [Project]. You must use the latter for this to work. For example, I have a project named "ILE". I was trying to enter [ILE]\Contributors in SUGGESTEDVALUES. That resulted in the error. It worked when I instead entered: [Project]\Contributors.

    Dwight