Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Link issues based on field contents Automation for Jira

I have a project where 2 different issue types use the same field.  Is it possible for me to create an automation that will look at that field and link the issues if they match?

1 answer

1 accepted

0 votes
Answer accepted
John Funk Community Leader Sep 02, 2020

Hi Chris,

Yes, you should be able to do that. 

Use the Condition for Advanced compare something like this:

screenshot.png

The initial trigger could be Issue Created or Issue Updated.

And instead of customfield as in my example, use issue.issuetype.name or issue.issuetype

@John Funk , thank you for the fast reply!

I have tried what you suggested but perhaps I have done something incorrectly.

I get an error that the issue is trying to link to itself.

2020-09-02 14_44_54-Project automation - ValJira USA.png2020-09-02 14_45_31-Project automation - ValJira USA.png

John Funk Community Leader Sep 02, 2020

Then that is on the step/action where you do the linkage. Can you share that? 

Here is the screenshot of that.  I think I see what the issue is but I do not seem to have enough options of what to link to.  Is there another smart-value that I can use?2020-09-02 15_57_11-Project automation - ValJira USA.png

John Funk Community Leader Sep 02, 2020

So, change that to Most Recently Created Issue and give it a test. 

This is the new error.2020-09-02 16_12_49-Project automation - ValJira USA.png

John Funk Community Leader Sep 02, 2020

You might need to do a Re-fetch action after the issue is created as I am not sure how your are populating the CAPX Project Number field. 

It would come before the Compare. 

The CAPX Project Number field is populated in the portal when the user submits the ticket.  

I tried the re-fetch action but unfortunately got the same error.

2020-09-02 16_31_46-Project automation - ValJira USA.png

John Funk Community Leader Sep 02, 2020

What is the key of the existing one it should find to link to? Is it the same project? 

Try creating a Branch (purple one) and using JQL there.

screenshot.png

Use the project of the exiting issue where I have HROPS.

Then notice the change on the Link going under the Branch and changed to Trigger issue. 

Like Chris Brewer likes this

@John Funk , that worked!!!  Thank you so much!!!

John Funk Community Leader Sep 03, 2020

You are very welcome!

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Marketplace Apps & Integrations

5 mobile apps for Jira Cloud to boost productivity

  It’s very important to have access to the workflow process from anywhere. Especially if you manage the work of others. There is no difference whether you’re out of office, or drive a ca...

265 views 2 5
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you