0

I am attempting to transition an issue from one status to another.

When I call

jira.statuses()

I get a list of statuses that include the one I would like to transition to:

<JIRA Status: name=u'Scheduled', id=u'11301'>

When I ping https://our.server/rest/api/2/issue/issue_id/transitions I get the following response:

{
  "expand": "transitions",
  "transitions": [
    {
      "id": "51",
      "name": "Close Request",
      "to": {
        "self": "https://our.server/rest/api/2/status/6",
        "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.",
        "iconUrl": "https://our.server/images/icons/statuses/closed.png",
        "name": "Closed",
        "id": "6",
        "statusCategory": {
          "self": "https://our.server/rest/api/2/statuscategory/3",
          "id": 3,
          "key": "done",
          "colorName": "green",
          "name": "Done"
        }
      }
    }
  ]
}

The issue here is that when I attempt to transition to the status to "Scheduled" or it's ID "11301" I get the following error:

response text = {"errorMessages":["Internal server error"],"errors":{}}

Do I need to to add this status to transitions? Or do I need to include more data with the transition? I'm not really sure how to diagnose this.

John Snow
  • 1,898
  • 2
  • 27
  • 48
  • Apparently your issue is already resolved, so you cannot transition it into that `scheduled` status (i suppose). Maybe try to reopen it first and then move it to scheduled? – SgtDroelf Dec 21 '18 at 08:59

1 Answers1

0

You can only change it to statuses that have a transition from the current status to the desired status. If your workflow has to strictly follow To Do->In Progress->Resolved->Closed and your current ticket is in "To Do" and you want it to be "Closed" you'll have to go through each status in order to get there, and if you require fields along the way you must pass those in as well, such as going from a non resolved status to a resolved status often requires a resolution. Other than that you should not be limited (unless you have some sort of other logic built into the conditions/validators for the transition such as only certain people can transition).

guitarhero23
  • 1,065
  • 9
  • 11