Listing All JIRA Transitions via API

前端 未结 3 2077
长情又很酷
长情又很酷 2021-01-13 05:27

I\'m looking to set up smart commits in JIRA, but my developers want to know all the options for their transitions. In order to help them, I\'d like to print a cheat-sheet

3条回答
  •  粉色の甜心
    2021-01-13 05:48

    You can get all transitions for project with /rest/api/2/project/{projectIdOrKey}/statuses endpoint. Here is response example, look at "statuses" array:

    [
        {
            "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"
                }
            ]
        }
    ]
    

    But it doesn't give you exactly list of transitions that any issue can take at any time, and I'm not sure that such method exist in API.

提交回复
热议问题