尝试创建工作项批次时发生错误 TF51635

Error TF51635 Occurred while trying to create workitem batch

当我尝试通过批量创建操作创建工作项时,出现以下错误

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

网络上没有太多关于此的信息 error.below link 包含 TFS 错误和代码,但我找不到有关相同的详细信息。 https://msdn.microsoft.com/en-us/library/aa337645(v=vs.80).aspx

根据我的研究,这个问题可能与批处理中的 Id 表示法有关(当我尝试批量创建多个没有 Id 的工作项时发生错误)。你能解释一下下面的表示法吗(我指的是 https://www.visualstudio.com/en-us/docs/integrate/api/wit/batch)

      {
        "op": "add",
        "path": "/id",
        "value": "-1"
      }
  1. 是否必须定义ID? .
  2. 如何确定 Id(应该首先使用哪个 id/获取上一个工作项的最后一个 id)?
  3. 是否可以为此分配自动递增编号?

虽然还没有找到相关的官方文档。此 ID 似乎用于定义 json 内容中多个工作项的顺序。 例如:如果上一个workitem的最后一个id是289,那么带-1的work item的ID就是290,-2就是291……以此类推。这个观点是基于一些测试。

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.