使用 VSTS REST 创建 EPIC 时选择 VSTS 看板列 API

Choosing VSTS Kanban column when creating an EPIC using the VSTS REST API

我正在使用 REST API 创建 VSTS 看板史诗。这会在看板的第一列中创建一个 Epic。

我希望能够选择它进入哪一列,并且作为第二个操作能够使用 REST API.

将它从一列移动到另一列

查看可用字段列表,有一个字段 'System.BoardColumn' - 这是修改 Epic 列的正确字段吗?

谢谢

您只需要在 REST API,那么它会去相关的栏目。由于 New 是 System.State 字段的默认值,如果您未指定 System.State.

的值,它将在第一列中创建

在第二列创建史诗

要在 Epics 看板的第二列 (In process) 中创建史诗节目,您可以使用 create a work item REST API。例如下面的例子(创建 Epic epic3):

PATCH https://account.visualstudio.com/DefaultCollection/Git2/_apis/wit/workitems/$Epic?api-version=1.0

Content-Type: application/json-patch+json

[
    {
        "op": "add",
        "path": "/fields/System.Title",
        "value": "epic3"
    },
    {
        "op": "add",
        "path": "/fields/System.State",
        "value": "In Progress"
    }
]

然后 epic3 将显示在第二列中:

将现有史诗从一列更新到另一列

您只需 replace System.State 字段的值 update a field REST API. 如上例,将 e1 (id=53) 从第一 (New) 列移动到第二 (IN process) 列:

PATCH https://marinaliu.visualstudio.com/DefaultCollection/_apis/wit/workitems/53?api-version=1.0

Content-Type: application/json-patch+json

[
    {
        "op": "replace",
        "path": "/fields/System.State",
        "value": "In Progress"
    }
]

然后工作项 e1 将显示在第二列中: