0

如何获取 Jira API 中的所有状态/转换?

http://example.com/rest/api/2/workflow/返回

[{"name":"jira","description":"The default JIRA workflow.","steps":5,"default":true}]
输出中没有 id,因此无法获取工作流详细信息/组件。

http://example.com/jira/rest/api/2/issue/PROJ-1/transitions仅提供特定于问题的过渡,我也需要未来的过渡。

任何指针或建议将不胜感激。

4

1 回答 1

0

我不能将问题标记为重复,所以这里是重新发布

您可以使用/rest/api/2/project/{projectIdOrKey}/statuses端点获取项目的所有转换。这是响应示例,请查看“状态”数组:

[
    {
        "self": "http://localhost:8090/jira/rest/api/2.0/issueType/3",
        "id": "3",
        "name": "Task",
        "subtask": false,
        "statuses": [
            {
                "self": "http://localhost:8090/jira/rest/api/2.0/status/10000",
                "description": "The issue is currently being worked on.",
                "iconUrl": "http://localhost:8090/jira/images/icons/progress.gif",
                "name": "In Progress",
                "id": "10000"
            },
            {
                "self": "http://localhost:8090/jira/rest/api/2.0/status/5",
                "description": "The issue is closed.",
                "iconUrl": "http://localhost:8090/jira/images/icons/closed.gif",
                "name": "Closed",
                "id": "5"
            }
        ]
    }
]
于 2016-05-05T10:04:53.537 回答