Automation rule triggered by issue #1 - creates and links issue #2 - get issue #2's data ??

Jamie Gordon April 7, 2023

Hello, 

Here's my rule:

--Trigger - Issue #1 Created

--Edit fields on issue #1

--Create Issue #2 with a link to Issue #1 (trigger issue)

--Add Issue #2's ID to a Parameter <---- HOW DO I DO THIS???

--Add a comment to Issue #1 Saying "This ticket has been linked to {{createdTicket.id}} - Click here to open {{createdticket.URL}}". 

How do it grab the context from the created ticket (Issue #2) in the automation's scope so I can use the data? 

Thanks for any assistance. 

Jamie

1 answer

1 accepted

2 votes
Answer accepted
Bill Sheboy
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.
April 7, 2023

Hi @Jamie Gordon 

There is a smart value to refer to the most recently created issue or multiple if you create several: {{createdIssue}} and {{createdIssues}}

https://support.atlassian.com/cloud-automation/docs/jira-smart-values-issues/#--createdIssue--

And so you can use {{createdIssue.key}} for your scenario.

Also please note: when using the Issue Created trigger, that can fire faster than the data is available to the rule.  So it is a good idea to add a Re-fetch Issue action after the trigger, and before any next steps.  That will slow down the rule and reload the data before proceeding.  So, something like this:

  • trigger: issue created
  • action: re-fetch issue
  • ...continue with your rule steps

Kind regards,
Bill

Jamie Gordon April 7, 2023

Beautiful. Works like a champ. 


Thanks so much 

Jamie

Like Bill Sheboy likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events