TFS Integration: Synchronize Ids?


  • We are using TFS Integration to keep work items synchronized across 2 servers in real-time.  The synchronized work items do not have the same Id, as expected.  One server is our "Master".

    Goal: The Master's Ids are visible on the Secondary system.

    To try to solve this, we created a new field called MasterId as follows:

    <FIELD name="MasterId" refname="..." type="Integer">   
    <COPY from="field" field="System.Id" />

    The COPY attribute only exists on the Master's side, so that only the Master populates the field.  In theory, the MasterId is then visible on the Secondary server's side.  This works...sort of.

    Problem Statement: The problem is that when the Work Item is first created and saved, it does *not* populate the field.

    * In a Query result window, the MasterId column is blank.  If you select a row, the Master Id is set dynamically.  If you move on to another row, it blanks out again.  (Very weird behavior.)

    * If you open the Work Item a 2nd time and save it again, the field is then populated the way we wanted it populated the first time.  Now it can sync across to our secondary server.

    Please advise on how to solve the Problem Statement, or suggest an alternative means to accomplish the Goal.  Thanks in advance!

    Wednesday, March 14, 2012 8:18 PM


All replies

  • When the work item is first created the “” would not be assigned until the field is saved. Since the copy is done at the “field level” the System.ID is not set and hence it does not copy anything to the “MasterId” field.

    You can try modifiying the work item to add the below to the "transition" tag

    <TRANSITION from="" to="The first state of the work item">
        <FIELD refname="...">
          <COPY from="field" field="System.Id" />

    Hope this helps..


    Wednesday, March 14, 2012 9:47 PM
  • You should also check out the reflected ID feature in the integration tools.


    • Marked as answer by bcoll Friday, March 16, 2012 3:43 PM
    Thursday, March 15, 2012 2:19 PM
  • This approach doesn't seem to work.  (I'm guessing the SQL ID is assigned after the transition logic is applied.)
    Friday, March 16, 2012 3:40 PM
  • That didn't work, but it got me on the right path.
    Thank you!
    • Edited by bcoll Friday, March 16, 2012 3:41 PM
    • Marked as answer by bcoll Friday, March 16, 2012 3:43 PM
    Friday, March 16, 2012 3:41 PM