When a user Ack an Alert in Opsgenie, he becomes the assignee of it in JIRA
Asked by eran.gur:

We have integrated Opsgenie with Jira Cloud project so tickets created in Opsgenie will be created automatically in Jira.

When a user Ack an alert in Opsgenie - it get assigned to the user.

The problem: Assignee in Jira is not being changed to the same user.

We would like to find a solution where the user Ack, it will become the assignee in Jira.

Script Runner is an option but there is no record for the ack'ed in Jira

Please assist


Answers:
author: Darryl Lee
body: Hi [@eran.gur](/t5/user/viewprofilepage/user-id/3713834) ,

This is Darryl. I am here to help. :)

Understand that you would like to find a way to automatically assign the Jira ticket to the same user as the one who acknowledged the Opsgenie alert which this ticket was created from.

This will need to set up the [Jira Automation Rules](https://www.atlassian.com/software/jira/guides/expand-jira/automation).

Similar to [Opsgenie's Alert Policies](https://docs.opsgenie.com/docs/global-policies#alert-policy), Automation Rules are automated actions taken on tickets based on if specific criteria are met; WHEN ? IF ? THEN.

Automation Rules can be found under:

* Globally: Settings menu ? Systems tab ? Automation rules tab
* OR per Project: Projects tab ? select project ? Projects settings tab ? Automation tab

#### Steps: {#toc-hId--479635766}

1. In Opsgenie - Map the integration to add a comment on the ticket when the alert is acknowledge:  
   ![setp1.png](https://community.atlassian.com/t5/image/serverpage/image-id/189341i152AA1ECA3D5B7C8/image-size/large?v=v2&px=999 "setp1.png")

2. In Jira - Create an Automation Rule that filters on the user's name and assigns them to the ticket:

   ![step2.png](https://community.atlassian.com/t5/image/serverpage/image-id/189343i5CAEAF0D8E014EF5/image-size/large?v=v2&px=999 "step2.png")

#### Example: {#toc-hId-2007877067}

![Screenshot 2022-03-22 at 18.11.46.png](https://community.atlassian.com/t5/image/serverpage/image-id/189344iB755B1976704B22A/image-size/large?v=v2&px=999 "Screenshot 2022-03-22 at 18.11.46.png")

![example2.png](https://community.atlassian.com/t5/image/serverpage/image-id/189346iB93BCE2301D719B3/image-size/large?v=v2&px=999 "example2.png")![example3.png](https://community.atlassian.com/t5/image/serverpage/image-id/189347i1867C07B23F24DFF/image-size/large?v=v2&px=999 "example3.png")

#### NOTE - Multiple Automation Rules will need to be configured for each assignee, but they can be easily copied/cloned. {#toc-hId-200422604}

Simply rename the rule ? adjust the IF condition ? adjust the THEN condition:

![example4.png](https://community.atlassian.com/t5/image/serverpage/image-id/189348i397EC4F0E03A178D/image-size/large?v=v2&px=999 "example4.png")![example5.png](https://community.atlassian.com/t5/image/serverpage/image-id/189349i09F2CBD7BCD000BC/image-size/large?v=v2&px=999 "example5.png")

*** ** * ** ***

Hope this helps.

Kind regards,   
Darryl Lee  
Support Engineer, Atlassian

comments: author: eran.gur
body: Thanks for this super detailed answer Darryl.

I'm able to preform the full integration with 1 problem,

In Opsgenie, the acknowledge alert is not in the activity log.

In Jira - I'm not getting anything under comment?

All other integration rules are working (by ack'ed, changed to in-progress, change to done)

Seem that OpsG is not adding the comments


author: Darryl Lee
body: Hi [@eran.gur](/t5/user/viewprofilepage/user-id/3713834) ,

Thanks for the further details.

May I confirm with you that have you configured the outbound rules of the Jira integration on Opsgenie to add a comment when an Opsgenie alert is ack'ed?

As described in the screenshot:

![setp1.png](https://community.atlassian.com/t5/image/serverpage/image-id/189430i3239C04C516DBAA9/image-size/large?v=v2&px=999 "setp1.png")

If this has been done but still not seeing any comment is added to the associated Jira ticket, please reach out to the Opsgenie Support Team via [this link](https://support.atlassian.com/contact/), my colleague will help you from there.

Kind regards,   
Darryl Lee  
Support Engineer, Atlassian


author: eran.gur
body: Hey Darryl,

We have decided to implement the automation using Workato.

This solution is not scalable for us since we have around 30 members in the support team and aprox 100 projects.

Thank you for your help


Tags: jira-cloud

scriptrunner