Resolve an incident

Automatically resolve Better Stack incidents from Jira by using our Incidents API and Jira Automation.

Did Better Stack create the work item?

Use Better Stack for Jira instead. It adds Acknowledge, Resolve and Reopen buttons to work items Better Stack created or linked for an incident, with no Jira Automation to set up. This guide is for incidents created from Jira.

Setting up the Jira flow

  1. In your Jira space, click More actions (…) β†’ Space settings β†’ Automation.

    To apply this to all your spaces, go to Global administration and create a global flow.

  2. Click on Create flow.

  3. Select the Work item transitioned trigger.

  4. For To status, enter Done, then click Save.

    ACK Trigger.png
    Resolve Trigger.png

  5. Add a condition. Choose the incident_id field and set the condition to is not empty.

  6. Add an action and select Send web request.

    ACK Action.png

  7. Configure the web request:

    Web request URL: https://incidents.betterstack.com/api/v2/incidents/{{incident_id}}/resolve
    Headers: Authorization: Bearer $TOKEN
    HTTP method: POST
    Web request body: Custom data
    Custom data: {"resolved_by": "{{updated}} - {{changelog.status}}"}

    Resolve Action Detail.png

  8. (Optional) Add another action to Comment on work item. You can use {{webResponse.body}} to add the API's response to the ticket.

    Resolve Comment.png

That's all. πŸŽ‰

From now on, when a Jira work item is moved to "Done", the corresponding Better Stack incident will be resolved.

Need help with the Jira integration?

Please message us at hello@betterstack.com. We will help you with all the necessary configurations.