OpsGenie and JSD Integration - Unable to set Incident to Completed (Done)

Naga Devisetty June 15, 2020

Hi Team,

We are on Jira v7.13.13 and JIRA Service Desk Application v3.16.13.

Used below document to enable OpsGenie and JSD integration.

https://docs.opsgenie.com/docs/jiraservicedesk-integration

I could get it authenticated from OpsG to JSD, could create Alerts from OpsG to JSD as Incidents, set Priority as well... so-far so good!

But, when I Close an Alert in OpsG, it calls the 'resolveIssue' action on python code as well, but stuck at below error:

[resolveIssue] Could not execute at Jira Service Desk; response: b'{"errorMessages":[],"errors":{"resolution":"Field \'resolution\' cannot be set. It is not on the appropriate screen, or unknown."}}' status code: 400

Here's the resolveIssue code:

elif mapped_action == "resolveIssue":
result_url += "/" + str(issue_key) + "/transitions"
content_params = {
"transition": {
"id": get_transition_id(headers, result_url, "Completed", token)
},
"fields": {
"resolution": {
"name": "Done"
}
}
}

Not sure if this is relevant, I see don't get to see "resolution" field under fields of transition to post when i run:

https://jira.resideo.com/rest/api/2/issue/<issueId>/transitions?expand=transitions.fields

There are two challenges here, it either doesn't execute the code or when it executes, i get above error.

Please advise what am I missing? Appreciate your assistance in advance.

 

Tnx, Dev

3 answers

1 accepted

0 votes
Answer accepted
Naga Devisetty October 12, 2020

Issue resolved!

0 votes
pavol_cvincek01 October 6, 2020

Hello Dev,
I have the same problem at the moment with:

"Field \'resolution\' cannot be set. It is not on the appropriate screen, or unknown."

Were you able to resolve this issue meanwhile? If so, how you managed? 

Naga Devisetty October 12, 2020

Hi pavol_cvincek01,

Just use below code,

POST URL: https://hostname/rest/api/2/issue/PROJ-XXX/transitions

PAYLOAD:

{

"transition": {

"id": "XX" //use respective transition ID, that can be used to transition to any other status not just closing (resolution to Done)

}

}

 

Thanks,

Dev

0 votes
Naga Devisetty June 16, 2020

Hi All,

Has anyone used Jira REST API to mark incidents with status as 'Resolved/Completed/Closed' and Resolution as 'Done'.
Please review my issue above and provide your expert advise.

Tnx, Dev

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events