In "Automation for Jira", we want to automatically assign based on pagerduty

Michael Shulman
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 15, 2018

Is there an integration between "Automation for Jira" and pagerduty? We want to automatically assign tickets based on the "on call" person in pagerduty.

 

Is there a way to get this name? Or can we make REST calls from Automation for Jira?

 

-ms

7 answers

1 accepted

1 vote
Answer accepted
andreas
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 15, 2018

Hi Michael,

No, we don't support this quite yet: https://codebarrel.atlassian.net/browse/AUT-204

We do have an outgoing webhook action (https://docs.codebarrel.io/automation/components/actions/actions.html#send-webhook), but currently it can only send POSTs and any response data can't be used in the rest of the Automation rule in Jira.

We've got quite a few higher priority items in our backlog at the moment so it will be a while before we can get to this, but we'll let you know when we get a chance to work on this.

Cheers,
Andreas

David Dana January 2, 2019

We'd like to assign an owner when a label, 'on-call' is added to a JIRA issue based on the current active duty person in PagerDuty. Is that possible within Scriptrunner?

Like # people like this
Michael H.
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 21, 2020

Ever found out if this is possible ? We want to do the same thing. 

Deleted user January 19, 2022

I would just like to change the Jira assignee to the user that either acknowledges the incident or is assigned to it. Is this possible yet?

I tried to just sync them with the custom fields but that does not seem to work.

3 votes
Vignesh Suthanthirapandian
Contributor
July 20, 2023

Hi @Michael Shulman ,

 

We managed to set up this using JIRA Automation, Sharing my experience here if anyone still needs a way to achieve this.

Trigger: Issue Created

Action: Web Request to Pagerduty API to get the oncall

Creation Variable: Retrieve the oncall email id from web response 

Action: Web Request to Jira api to get the Account ID, pass the email id (variable from the previous step)

Action: Assign the JIRA using the account ID from the web response of the previous step.

 

Thank you

Deleted user July 20, 2023

Where is JIRA Automation in PagerDuty?

Under Automation I only have 3 choices: Event Orchestration, Event Rules, Automation Actions

Vignesh Suthanthirapandian
Contributor
July 27, 2023

Hi @Sam 

It's not in Pagerduty, the above steps are in Jira Automation Rules.

 

In Pagerduty , you can add Jira cloud extension to create Jiras automatically

 

https://support.pagerduty.com/docs/jira-cloud

In Jira, setup the above mentioned rule to assign it to current Oncall

 

Thank you

Like Deleted user likes this
Lee Segal August 22, 2023

Hi Vignesh, 

 

Thank you for sharing that. Can you give an example of the API request you made (ofc you can leave any secrets or sensitive information out) and how accomplished this step: Creation Variable: Retrieve the oncall email id from web response?

 

Trying to do the same as you but not able to get it to work. 

Vignesh Suthanthirapandian
Contributor
August 27, 2023

Hi @Lee Segal ,

 

You can set up Web requests like the below,

image.png

image.png

Also, trigger another Webrequest in the next step with the user email to Jira API to get the account ID and assign the JIRA to the retrieved account ID.

image.png

image.png

Thanks

Like # people like this
Lenny Castaneda
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 10, 2023

Thanks for posting this @Vignesh Suthanthirapandian ... is this the endpoint you used?

 

https://api.pagerduty.com/oncalls?include%5B%5D=users&escalation_policy_ids%5B%5D=${ESCALATION_POLICY_ID}&schedule_ids%5B%5D=${SCHEDULE_ID}
Vignesh Suthanthirapandian
Contributor
October 10, 2023

Hi @Lenny Castaneda 

The endpoint configured to get the oncall details,

https://api.pagerduty.com/oncalls?include[]=users&schedule_ids[]=SCHEDULE_ID&escalation_policy_ids[]=ES_POLICY_ID&earliest=true

Replace the below with respective values

SCHEDULE_ID

ES_POLICY_ID

Like Deleted user likes this
Johann B June 7, 2024

@Vignesh SuthanthirapandianI'm struggling to figure out how you then used that variable {{jiraaccountid}} - I added that as a next action:

JiraAutomation.png

But even though it seems like there is a success in the logs, the assignee field stays the same:


Status: Success


Vignesh Suthanthirapandian
Contributor
June 9, 2024

Hi @Johann B ,

 

To assign it to the variable, use the Smart value option like below.

Hope this helps.

image.png

Like Johann B likes this
Johann B June 13, 2024

Thanks! That worked.

1 vote
Syed Fazeem
Contributor
June 18, 2023

still no response and update June 2023... so sad. i believe other providers service is much better,

1 vote
Tian Wang
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 1, 2022

Hello from 2022 looking for the same thing.

Mele Sax-Barnett
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 13, 2022

Yes, still hoping for you to add this feature, thanks!

1 vote
David Roberts December 28, 2021

It says answer accepted but I think everyone is still waiting for a solution

0 votes
Troy Lopez
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 10, 2023

I am here looking for the same answer in 2023... 

0 votes
Deleted user January 19, 2022

delete

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events