REST API for Create and Transition Issues with one single Endpoint

XMLWordPrintable

    • Type: Suggestion
    • Resolution: Unresolved
    • None
    • Component/s: Documentation - All
    • None
    • 1
    • 7

      Scenario

      In JIRA Cloud, it's possible to create and transition an issue using this endpoint:

      /rest/api/2/issue

      Sample JSON body:

      { 
      	"fields": {
      		"project": {
      			"key": "TEST"
      		},
      		"summary": "Test Summary",
      		"description": "Test Description",
      		"issuetype": {
      			"name": "Story"
      		}
      	},
      	"transition": {
      		"id": "21"
      	}
      }
      

      According to Cloud REST API doc, it seems the transition parameter has been enabled and works as intended.

      This however doesn't work in JIRA Server. With the same endpoint and JSON body, an issue is created but not transitioned. According to Server REST API doc, it seems transition hasn't been enabled.

      Suggestion

      1. Enable transition for JIRA Server REST API so that an issue can be created and transitioned with this single endpoint:
        /rest/api/2/issue
      2. Document this feature clearly in the respective docs above.
        It's even better to have a full checklist of differences between Cloud and Server REST APIs.

      Workaround

      For JIRA Server, once an issue is created, take note of its ID in the response, e.g.:

      {
          "id": "12407",
          "key": "TEST-31",
          "self": "http://10.60.2.88:8770/jira770/rest/api/2/issue/12407"
      }
      

      then use this (POST) endpoint to transition it:

      /rest/api/2/issue/12407/transitions

      Sample JSON body:

      { 
      	"transition": {
      		"id": "21"
      	}
      }
      

            Assignee:
            Unassigned
            Reporter:
            Andy Nguyen (Inactive)
            Votes:
            11 Vote for this issue
            Watchers:
            13 Start watching this issue

              Created:
              Updated: