The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

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

Jamie Gordon
Contributor
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

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

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 Champions.
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
Contributor
April 7, 2023

Beautiful. Works like a champ. 


Thanks so much 

Jamie

Like Bill Sheboy likes this
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events