Error TF51635 Occurred while trying to create workitem batch

巧了我就是萌 提交于 2019-12-31 04:54:05

问题


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?

回答1:


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.



来源:https://stackoverflow.com/questions/42945345/error-tf51635-occurred-while-trying-to-create-workitem-batch

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!