Lalindu
Lalindu

Reputation: 349

Error TF51635 Occurred while trying to create workitem batch

When I try to create work items trough batch create operation I am getting below Error

TF51635: There are duplicate temp IDs in the Update XML.\\r\\nParameter name: workItemUpdates\

There is no much information available in web regarding this error.below link contains TFS errors and codes , But I couldn't find detailed information about same. https://msdn.microsoft.com/en-us/library/aa337645(v=vs.80).aspx

As per my research this issue could associate with Id notation in batch (error occurred When I tried to create several workitems without Id in batch).Can you explain bit about below notation (I am referring to https://www.visualstudio.com/en-us/docs/integrate/api/wit/batch)

      {
        "op": "add",
        "path": "/id",
        "value": "-1"
      }
  1. Is it compulsory to define ID ? .
  2. how to determine Id (which id should use first / get last id of previous workitem)?
  3. Is it possible to assign auto increment number for this?

Upvotes: 1

Views: 161

Answers (1)

PatrickLu-MSFT
PatrickLu-MSFT

Reputation: 51093

Even though haven't found some related official documentation. This ID seems to use for defining the order of the multiple work items in json content. For example: If the last id of previous workitem is 289, then the ID of work item with -1 will be 290, -2 will be 291 ...and so on. This opinion is based on some tests.

1. Is it compulsory to define ID ?

Yes, you have to define this ID, if you don't, you will get error.

2. how to determine Id (which id should use first / get last id of previous workitem)?

You don't have to get the last id of previous workitem TFS will automatically detect it. This could be confirmed, when you create a single work item, you don't have to do this.

3. Is it possible to assign auto increment number for this?

Seems not.

Upvotes: 1

Related Questions