Transition Screen: empty vs none

Erik Timmers April 1, 2015

Hi all,

 

Using the JIRA REST API I try to obtain the fields that are shown in the Transition Screen for a given transition.

My call to http://laptop:8080/rest/api/2/issue/FOO-3/transitions?expand=transitions.fields returns the following JSON data:

{
    "expand": "transitions",
    "transitions": [
        {
            "id": "31",
            "name": "Stop Progress",
            "to": {
                "self": "http://laptop:8080/rest/api/2/status/10000",
                "description": "",
                "iconUrl": "http://laptop:8080/images/icons/statuses/open.png",
                "name": "To Do",
                "id": "10000",
                "statusCategory": {
                    "self": "http://laptop:8080/rest/api/2/statuscategory/2",
                    "id": 2,
                    "key": "new",
                    "colorName": "blue-gray",
                    "name": "To Do"
                }
            },
            "fields": {}
        },
        {
            "id": "41",
            "name": "Done",
            "to": {
                "self": "http://laptop:8080/rest/api/2/status/10001",
                "description": "",
                "iconUrl": "http://laptop:8080/images/icons/statuses/closed.png",
                "name": "Done",
                "id": "10001",
                "statusCategory": {
                    "self": "http://laptop:8080/rest/api/2/statuscategory/3",
                    "id": 3,
                    "key": "done",
                    "colorName": "green",
                    "name": "Done"
                }
            },
            "fields": {
                "summary": {
                    "required": true,
                    "schema": {
                        "type": "string",
                        "system": "summary"
                    },
                    "name": "Summary",
                    "operations": [
                        "set"
                    ]
                },
                "issuelinks": {
                    "required": false,
                    "schema": {
                        "type": "array",
                        "items": "issuelinks",
                        "system": "issuelinks"
                    },
                    "name": "Linked Issues",
                    "autoCompleteUrl": "http://laptop:8080/rest/api/2/issue/picker?currentProjectId=&showSubTaskParent=true&showSubTasks=true&currentIssueKey=FOO-3&query=",
                    "operations": [
                        "add"
                    ]
                },
                "resolution": {
                    "required": true,
                    "schema": {
                        "type": "resolution",
                        "system": "resolution"
                    },
                    "name": "Resolution",
                    "operations": [
                        "set"
                    ],
                    "allowedValues": [
                        {
                            "self": "http://laptop:8080/rest/api/2/resolution/1",
                            "name": "Fixed",
                            "id": "1"
                        },
                        {
                            "self": "http://laptop:8080/rest/api/2/resolution/2",
                            "name": "Won't Fix",
                            "id": "2"
                        },
                        {
                            "self": "http://laptop:8080/rest/api/2/resolution/3",
                            "name": "Duplicate",
                            "id": "3"
                        },
                        {
                            "self": "http://laptop:8080/rest/api/2/resolution/4",
                            "name": "Incomplete",
                            "id": "4"
                        },
                        {
                            "self": "http://laptop:8080/rest/api/2/resolution/5",
                            "name": "Cannot Reproduce",
                            "id": "5"
                        },
                        {
                            "self": "http://laptop:8080/rest/api/2/resolution/10000",
                            "name": "Done",
                            "id": "10000"
                        },
                        {
                            "self": "http://laptop:8080/rest/api/2/resolution/10001",
                            "name": "Won't Do",
                            "id": "10001"
                        }
                    ]
                }
            }
        }
    ]
}

 

  • For the transition 'Done' the resulting fields object contains the fields 'summary', 'issuelinks' and 'resolution'.
  • For the transition 'Stop Progress' I get an empty fields object.

This is exactly the way I configured JIRA to create the Transition Screens. However, I am unable to tell whether I have an empty Transition Screen (that only shows the 'comments' field) or having no Transition Screen at all.

 

The REST API seems to lack functionality to do so. Does anyone know a workaround? Or am I missing some functionality here?

 

Many thanks in advance!

 

Regards,

Erik

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Andrew Boerema February 26, 2016

This is the exact issue I am currently having. It also seems that I am unable to determine when the screen has the comment fields removed as well. This is really important for me because I have no indication whether a user should be asked to comment on transition or whether the transition itself is documentation enough.

TAGS
AUG Leaders

Atlassian Community Events