Forums

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

Automation Rule to create multiple tickets and link them

David Loszewski
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.
July 13, 2020

I'm attempting to create a rule in Automation for Jira that would create the following by manual activation from a trigger issue.

  • Ticket 1 created
    • link to trigger issue
  • Ticket 2 created
    • link to ticket 1

It sounds simple enough to do and I have no issue linking ticket 1 to trigger issue, my problem is with linking ticket 2 to ticket 1.   If I link to most recently created issue it tries to link to itself.  I've also tried creating a new smart variable for use within the rule but can't seem to make it work and am not seeing any documentation on that feature. 

Any suggestions would be appreciated.  Thank you. 

 

2 answers

1 accepted

1 vote
Answer accepted
John Funk
Community Champion
July 14, 2020

Hi David,

I have done something similar involving 3 issues but with a different combination. I ended up creating two rules but had to have something in common between the 2 issues that were created at different times. 

In your case I am wondering if you could have a rule that creates ticket 1 from the trigger and then somehow uses ticket 1 to create 2 so they are linked. That's the scenario I have. Then I use the second rule to link the trigger issue with ticket 2. But I have a common unique value between the trigger issue and ticket 2 so I can make the linkage. 

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.
July 14, 2020

Hi David and John,

Two rules sounds like a good way to go, given potential timing issues in a rule like this.

Or you could try the following...

Once Ticket 1 is created, if you can uniquely identify it (while still inside your rule's scope) add a Lookup Action with JQL to find Ticket 1.  Then use that context to add Ticket 2 and link to Ticket 1.

 

Best regards,

Bill

1 vote
Yvan Martin
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 19, 2020

Hi David,

Developer from Automation here.

You should be able to achieve this use-case by using the "Linked issue" field on ticket creation, where as the link issue action would run after the new one has been created.

Something like this should work:

Screen Shot 2020-07-20 at 10.13.33 am.png

I hope this helps.

David Loszewski
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.
July 27, 2020

@Yvan Martin Thanks!

This worked exactly as needed! Thank you! 

Tal Stanek March 10, 2022

Hello there

 

For tasks in different projects it doesn't work.

Any idea what to do ?

Thanks!

John Funk
Community Champion
March 10, 2022

Hi @Tal Stanek  - You need to create a new question and post to the Community so more people will see it. 

Tal Stanek March 10, 2022

I did. Thanks

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events