使用 Azure API 在 Azure Boards 上创建新任务
Create new task on Azure Boards using Azure API
我们已经设置好看板并希望使用 Azure API 打开一个新任务,到目前为止我使用以下文档创建了一个基本任务:Microsoft Doc.
使用以下正文:
[
{
"op": "add",
"path": "/fields/System.Title",
"from": None,
"value": "Sample task"
}
]
但现在我想将 'Sample task' 实际放入迭代 (Sprint) 中,但出于某种原因我找不到实现它的方法。
我试过以下方法:
body =
[
{
"op": "add",
"path": "/fields/System.Title",
"from": None,
"value": "Sample task",
"op": "add",
"path": "/fields/System.IterationPath",
"from": None,
"value": "Labs_TelAviv\Sprint32"
}
]
[
{
"op": "add",
"path": "/fields/System.Title",
"path": "/fields/System.IterationPath",
"from": None,
"value": "Sample task",
}
]
Microsoft 文档没有指定我们可以配置哪些 custom/basic 字段
试试这个模板:
body =
[
{
"op": "add",
"path": "/fields/System.Title",
"from": None,
"value": "Sample task"
},
{
"op": "add",
"path": "/fields/System.IterationPath",
"from": None,
"value": "Labs_TelAviv\Sprint32"
}
]
查看更新操作的例子,包含几个字段:https://docs.microsoft.com/en-us/rest/api/azure/devops/wit/work%20items/update?view=azure-devops-rest-6.1#examples
我们已经设置好看板并希望使用 Azure API 打开一个新任务,到目前为止我使用以下文档创建了一个基本任务:Microsoft Doc.
使用以下正文:
[
{
"op": "add",
"path": "/fields/System.Title",
"from": None,
"value": "Sample task"
}
]
但现在我想将 'Sample task' 实际放入迭代 (Sprint) 中,但出于某种原因我找不到实现它的方法。
我试过以下方法:
body =
[
{
"op": "add",
"path": "/fields/System.Title",
"from": None,
"value": "Sample task",
"op": "add",
"path": "/fields/System.IterationPath",
"from": None,
"value": "Labs_TelAviv\Sprint32"
}
]
[
{
"op": "add",
"path": "/fields/System.Title",
"path": "/fields/System.IterationPath",
"from": None,
"value": "Sample task",
}
]
Microsoft 文档没有指定我们可以配置哪些 custom/basic 字段
试试这个模板:
body =
[
{
"op": "add",
"path": "/fields/System.Title",
"from": None,
"value": "Sample task"
},
{
"op": "add",
"path": "/fields/System.IterationPath",
"from": None,
"value": "Labs_TelAviv\Sprint32"
}
]
查看更新操作的例子,包含几个字段:https://docs.microsoft.com/en-us/rest/api/azure/devops/wit/work%20items/update?view=azure-devops-rest-6.1#examples