Search code examples
tfstfs-2015tfs-workitemtfs-power-tools

TFS work item AssignedTo field being set to service account and not current user upon transition


For a particular Team Foundation Server Work Item when transitioning State from New to Active I would like to set the AssignedTo field to the current user. After looking at a few examples I came up with the below transition markup:

<TRANSITION from="New" to="Active">
  <REASONS>
    <DEFAULTREASON value="Implementation started" />
  </REASONS>
  <FIELDS>
    <FIELD refname="Microsoft.VSTS.Common.ActivatedBy">
      <ALLOWEXISTINGVALUE />
      <COPY from="currentuser" />
      <VALIDUSER />
      <REQUIRED />
    </FIELD>
    <FIELD refname="Microsoft.VSTS.Common.ActivatedDate">
      <SERVERDEFAULT from="clock" />
    </FIELD>
    <FIELD refname="System.AssignedTo">
      <DEFAULT from="currentuser" />
    </FIELD>
  </FIELDS>
</TRANSITION>

The above does set the AssignedTo field, but sadly sets it to the TFS Service Account and not the current user making the change.

What is wrong with my markup or server configuration that is causing the AssignedTo field to be set to the TFS Service Account and not the current user?


Solution

  • There is none error with your TRANSITION.

    currentuser : Name of the user who is logged on. Use the short user name of the current user as the value. No additional attributes are required. Valid only for string fields.

    Please double check the logged on user, make sure it's not the TFS Service Account