Understanding sd.customer.transition.error.transition.unavailable error

Hi!
I’m starting with the REST API for JSD Server. So far, all GETs are working, but my first attempt to a POST failed with this message. However, I want to understand what am I doing incorrectly… so…

I have a Request in OPEN state. Next state should be InProgress… If I right click on the “InProgress” button on the GUI and copy the link, this is it:
http://jsd…:8080/secure/WorkflowUIDispatcher.jspa?id=10202&action=21&atl_token=…

If I understand correctly action=21 is the transition I want to do.

Moreover, if I GET /issue I can see the first possible transition is precisely id:21:

$ curl -stderr -u apiuser:*** -G …/rest/api/2/issue/10202/transitions | python3 -mjson.tool
{
“expand”: “transitions”,
“transitions”: [
{
“id”: “21”,
“name”: “Initiate Progress”,

Now, the POST method fails with this message:

$ curl -stderr -u Llagos:*** -H “Content-Type:application/json” -H “X-ExperimentalApi:true” -d ‘{“id”:“21”}’ -X POST …/rest/servicedeskapi/request/10202/transition | python3 -mjson.tool
{
“errorMessage”: “You cannot make this transaction”,
“i18nErrorMessage”: {
“i18nKey”: “sd.customer.transition.error.transition.unavailable”,
“parameters”:
}
}

So, what am I doing wrong here? or understanding incorrectly? This seems to be pretty simple and straightforward…

API versions are Jira 7.6.1 & JSD 3.9.8

Thanks a lot,

Hello @leo.lagos,

I see the problem with your current approach (and I’ve fallen for this one, too :slight_smile: ); short answer, the transition ID you passed for the JSD REST call is not allowed.

For a bit longer answer:

  1. When you call Get transitions, you’re getting the transitions possible for the current user.
  2. When you tried to change the transition via JSD’s Perform customer transition, you are only limited to the transitions that a customer can do, in which case transition with ID 21 most probably is not allowed for the customer.

There are different ways to solve this depending on the specific use case you want to achieve:

  1. If you want to transition the issue as the current user, use Jira’s Do transition REST API.
  2. If you want to perform a customer transition, use JSD’s Get customer transitions to get the list of available transitions allowed for the customer then use the POST REST API.

Hope this helps.
Ian

1 Like

Thanks Ian,

Actually, I did the same transx using the Jira “do transx”, same user, same ID… So maybe it’s something on the “experimental” side… who knows…

I’ve not check that “customer transx” but I will now that you mention them.

Regards,

You’re welcome, @leo.lagos.

I tried your approach, passed a transaction ID that is returned by Get customer transitions, and it worked for me.

Best of luck and feel free to reach out to the community for any more questions :slight_smile:

Hi Ian,
Maybe worthy another ticket, but I’ve tried the same TT with both API, Jira and JSD…

With JSD, no transitions whatsoever:
$ curl -stderr -u llagos:*** -H “X-ExperimentalApi:true” -G …/rest/servicedeskapi/request/SERVICE-62/transition | python3 -mjson.tool
{
“size”: 0,
“start”: 0,
“limit”: 50,
“isLastPage”: true,
“_links”: {
“base”: “…”,
“context”: “”,
“self”: … },
“values”: []
}

With Jira API I do get the IDs.
$ curl -stderr -u Llagos:*** -H “X-ExperimentalApi:true” -G …/rest/api/2/issue/SERVICE-62/transitions | python3 -mjson.tool
{
“expand”: “transitions”,
“transitions”: [
{
“id”: “51”,
“name”: “Resolver”,
“to”: {
“self”: “…”,
“description”: “”,
“iconUrl”: “…”,
“name”: “Resuelto”,
“id”: “10004”,
“statusCategory”: {
“self”: “…”,
“id”: 3,
“key”: “done”,
“colorName”: “green”,
“name”: “Listo”
}
}
},
{
“id”: “111”,
“name”: “Cambiar Fecha Entrega”,
“to”: {
“self”: “…”,
“description”: “”,
“iconUrl”: “…”,
“name”: “En Progreso”,
“id”: “10003”,
“statusCategory”: {
“self”: “…”,
“id”: 4,
“key”: “indeterminate”,
“colorName”: “yellow”,
“name”: “En curso”
}
}
},
{
“id”: “11”,
“name”: “Consultar Cliente”,
“to”: {
“self”: “…”,
“description”: “”,
“iconUrl”: “…”,
“name”: “En Espera del Cliente”,
“id”: “10002”,
“statusCategory”: {
“self”: “…”,
“id”: 4,
“key”: “indeterminate”,
“colorName”: “yellow”,
“name”: “En curso”
}
}
},
{
“id”: “41”,
“name”: “Escalar a Otro Grupo Resolutor”,
“to”: {
“self”: “…”,
“description”: “”,
“iconUrl”: “…”,
“name”: “Abierto”,
“id”: “1”,
“statusCategory”: {
“self”: “…”,
“id”: 2,
“key”: “new”,
“colorName”: “blue-gray”,
“name”: “Por hacer”
}
}
}
]
}

So, why the difference? What’s missing on the JSD call?

Thanks again!

Although the follow up question is a bit related, it would be best to raise another question (moving forward :slight_smile: )in order to make searching for this specific scenario if in case another member of the community is experiencing the same challenges.

To answer this question, a probable explanation is that the current status of your issue does not have a transition that a customer can perform but can be performed by specific users, hence, the Jira REST API returns transitions. For example, if the issue is already in the Canceled state, the customer can no longer transition it but an agent can transition the request to Closed. You can verify this by looking into the the issue type’s workflow.

Hope this clarifies the matter.
Ian