none
Assigned To field auto assignment of a user from allowed user list. It does nto work while querying

    Question

  • Hi,

    I am using TFS 2103

    How can i auto assign a user from allowed user list in Assigned To field.

    I am trying in Assigned To field definition

     <WHEN field="My.Custom.group" value="g1">
              <COPY from="field" field="my.Custom.userlist1" />
            </WHEN>
            <WHEN field="My.Custom.group" value="g2">
              <COPY from="field" field="my.Custom.userlist1" />
            </WHEN>

    This works for me but when i go to report and run a query for that assigned user, it does not show in the list.

    When I save second time the work item by chaning any otehr field and go to query, it shows in the list.

    Is it a bug from MS or i am missing something? Please response.  

    Please ingnore the s



    • Edited by Anurag VER Thursday, February 06, 2014 2:50 AM
    Tuesday, February 04, 2014 2:13 PM

All replies

  • Hi,

    Any clue?

    Thanks,

    Anurag

    Wednesday, February 05, 2014 2:56 AM
  • Hi Anurag,

    In order to help you with your issue, I need to first reproduce it on my machine. So could you please share me your WI type definition file, and also the steps how to reproduce it? You can upload the WI definition file to the SkyDrive.

    Thanks.


    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.

    Wednesday, February 05, 2014 8:51 AM
    Moderator
  • I am using TFS 2013 Agile template

    Please add the below details for Assigned to field definition.

         

     <FIELD name="Assigned To" refname="System.AssignedTo" type="String" syncnamechanges="true" reportable="dimension">
            <HELPTEXT>The person currently working on this bug</HELPTEXT>
            <ALLOWEDVALUES expanditems="true">
              <LISTITEM value="[project]\All" />
            </ALLOWEDVALUES> 
     <WHEN field="My.Custom.Group" value="G1">
              <COPY from="field" field="My.Custom.field1" />
            </WHEN>
            <WHEN field="My.Custom.Group" value="G2">
              <COPY from="field" field="My.Custom.field2" />
            </WHEN>
            <WHEN field="My.Custom.ActiveGroup" value="G3">
              <COPY from="field" field="My.Custom.field3" />
            </WHEN>      
          </FIELD>

    Default value for Group is G1 and this field is required field.

    Steps to follow-

    1. Create a bug make yourself the Field1 member and someone else in the the Field2. Assigned group as G1 .
    2. Save the bug and you see assigned to is yourself.
    3. Go to the assigned to me query.

    Result: Not in your queue.

    Field1 and Field2 are allowed to have user list from one of TFS groups.

    I hope it will help to reproduce the bug.

    Thursday, February 06, 2014 2:45 AM
  • Hi Anurag,

    Thanks for your response.

    However, with the script you offered above, I can get that work item which is assigned to the user in Field1 when I run the assign to me work item query. It seems that there's nothing wrong with the System.AssignTo field.

    Or you can share me your complete WI file, I will check whether I can reproduce your issue on my side.

    In addition, for your words:" it does not show in the list", do you mean that work item isn't shown in the query result window?

    Thanks.


    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.

    Thursday, February 06, 2014 5:35 AM
    Moderator
  • Thanks Vicky

    you can follow the steps which I provided. Use Agile 2013 bug xml. Add the tags which i mentioned.

    You are right that bug assigned to a user does not show in query result when I run query for WIs assigned to that user

    Thursday, February 06, 2014 1:40 PM
  • Hi Anurag,

    Thanks for your response.

    I can't reproduce your issue on my machine, and it seems that there's nothing wrong with your WI type definition file.

    Do you get the same issue on another machine? How about you download and install VS2013 Update1: http://www.microsoft.com/en-us/download/details.aspx?id=41650

    Also delete your local cache to see if it helps. You can go the delete the folder: C:\Users\username\AppData\Local\Microsoft\Team Foundation\5.0\Cache

    Thanks.


    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, February 07, 2014 6:22 AM
    Moderator
  • Hi Vicky,

    I tired both of the options you provided but no luck.

    I am still getting the same problem. Few questions for you-

    did you import the WIT successfully in Agile template 2013 of TFS?

    Did you try creating the custom user groups and added some users to them?

    Did you try the scenario that I mentioned?

    It is reproducing for me in 3 different servers. So why do not you give a try again. 

    Thanks for trying to help.

    Thanks,

    Anurag

    Monday, February 10, 2014 9:51 AM
  • Hi Anurag,

    Thanks for your post.

    According your Assigned To field xml definition, there’s 4 custom fields in it. I need you share your My.Custom.Group, My.Custom.field1, My.Custom.field2 and My.Custom.field3 fields’ xml definitions here.


    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, February 10, 2014 11:28 AM
    Moderator
  • All these fields are string type and can allow valid users from TFS.

    I hope this will help to create the custom fields.

    <FIELD field="My.Custom.field1"  type="String" >

      <ALLOWEDVALUES expanditems="true">
              <LISTITEM value="[project]\All" />
            </ALLOWEDVALUES> 

    </FIELD>

    <FIELD field="My.Custom.Group"  type="String" >

      <ALLOWEDVALUES expanditems="true">
              <LISTITEM value="[project]\All" />
            </ALLOWEDVALUES> 

    </FIELD>

    <FIELD field="My.Custom.field2"  type="String" >

      <ALLOWEDVALUES expanditems="true">
              <LISTITEM value="[project]\All" />
            </ALLOWEDVALUES> 

    </FIELD>

    Monday, February 10, 2014 1:38 PM
  • Hi Anurag, 

    Thanks for your reply.

    I tested this scenario in my TFS 2013 Agile team project, but I also cannot reproduce this issue, after save the Bug work item, I can see the this Bug work item assigned to me(my account), and I can create a query(Assigned To = @Me) to list this Bug work item in result. Below is my fields xml definition(user1 and user2 both in [project]\All group):

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

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

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

      </ALLOWEDVALUES>

      <WHEN field="My.Custom.Group" value="User1">

        <COPY from="field" field="My.Custom.field1" />

      </WHEN>

      <WHEN field="My.Custom.Group" value="User2">

        <COPY from="field" field="My.Custom.field2" />

      </WHEN>

      <HELPTEXT>The person currently working on this bug</HELPTEXT>

    </FieldDefinition>

    <FieldDefinition name="field1" refname="My.Custom.field1" type="String">

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

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

      </ALLOWEDVALUES>

    </FieldDefinition>

    <FieldDefinition name="field2" refname="My.Custom.field2" type="String">

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

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

      </ALLOWEDVALUES>

    </FieldDefinition>

    <FieldDefinition name="CustomGroup" refname="My.Custom.Group" type="String">

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

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

      </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.

    Tuesday, February 11, 2014 2:40 AM
    Moderator
  • Thanks for trying and sharing result.

    XML looks good to me. Could please this updated XML and share the results.

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

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

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

      </ALLOWEDVALUES>

      <WHEN field="My.Custom.Group" value="Group1">

        <COPY from="field" field="My.Custom.field1" />

      </WHEN>

      <WHEN field="My.Custom.Group" value="Group2">

        <COPY from="field" field="My.Custom.field2" />

      </WHEN>

      <HELPTEXT>The person currently working on this bug</HELPTEXT>

    </FieldDefinition>

    <FieldDefinition name="field1" refname="My.Custom.field1" type="String">

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

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

      </ALLOWEDVALUES>

    </FieldDefinition>

    <FieldDefinition name="field2" refname="My.Custom.field2" type="String">

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

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

      </ALLOWEDVALUES>

    </FieldDefinition>

    <FieldDefinition name="CustomGroup" refname="My.Custom.Group" type="String">

      <ALLOWEDVALUES expanditems="true" >

        <LISTITEM value="Group1" />

      </<LISTITEM value="Group2" />

    ALLOWEDVALUES>

    </FieldDefinition>

    This bug is reproducible. Please try again with this XML

    Tuesday, February 11, 2014 7:22 AM
  • Hi Anurag,

    Thanks for your reply.

    I tried your update xml, it also works fine, and I can get the Bug work item in query result.


    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.

    Tuesday, February 11, 2014 9:14 AM
    Moderator
  • Hi Anurag, 

    You still can reproduce this issue?

    You can share your Bug work item type xml file here and highlight the custom part in xml file, I will try to import your Bug work item type into my TFS 2013 Agile team project.


    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.

    Thursday, February 13, 2014 11:19 AM
    Moderator
  • Hi Vicky,

    Could you please share the steps you followed?

    1. you select value for field 1 and Field 2.

    2. Now select the group from Group field.

    What is the behaviour of Assigned To field? Is it blank or has value as per group?

    If it has value then you rocks. I will want to know how does it works

    If it does not have value and then

    3. Click on Save button only once. No second time saving of this work item.

    4. Go to queries and check assigned WI for the user to whom you assigned the value.

    I am sure you will be able to see this issue. 

    If not, let me know.

    Friday, February 14, 2014 4:48 AM
  • Hi Anurag, 

    Thanks for your reply.

    I think I reproduced this issue.

    In your step 2, when I selected group value from Group field, field 1(or field 2) value will be copied to Assigned To field, but when I click on Save button only once time, the Assigned To column show empty for the work item when list the work item in query result. And as you said in your initial post, if I save the work item second time by changing any other field and go to query, the Assigned To field value will show in query list correctly.

    For this scenario, please submit it to Microsoft Connect Feedback portal at: https://connect.microsoft.com/VisualStudio. 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.

    Friday, February 14, 2014 5:27 AM
    Moderator
  • Thanks that you are able to reproduce it.

    So what do you think? Is there any solution without writing custom control?

    Even using custom control, I am facing refresh issue so no luck from custom control too.

    Please suggest.

    Thanks,

    Anurag

    Monday, February 17, 2014 1:49 PM
  • Hi Anurag,  

    Thanks for your reply.

    Please submit it to Connect Feedback site, then tracking the replies in there.


    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.

    Tuesday, February 18, 2014 1:31 AM
    Moderator