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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

Automation for Jira - linking based on field comparison


I'm trying out Automation for Jira to hopefully solve a problem that I have.  As Jira cloud does not have a lookup field I'm trying to find a way around to link issues between projects.  

I currently have two projects: 1 called Customers that has a list of issues and the summary of each issue has a customer name. The other Is a service desk which has a pre-populated customer number field. 

What I would like to do it create an automation that will link the issue in Customers if the customer number field matches the one in the Customer.    

With SharePoint all I would have to do is create a lookup field to a table and it would automatically be linked.  


2 answers

1 accepted

0 votes
Answer accepted
frother Atlassian Team Jan 06, 2020

Hi David,

Thanks for reaching out. Yes you can do this by using a JQL branch with a smart value, for example:

project = "Customer" and "Customer number" = "{{issue.Customer number}}"

You will need to ensure the project & field names of course match the ones on your instance exactly. Also this will need to be a global rule, as it deals with multiple project. The complete rule would look something like this:

Screen Shot 2020-01-07 at 5.13.17 pm.png

Hope that helps.


Thank you.  

Is there a way to tell if the smart value that I choose will work?  The validate query button is grayed out for me and when I run that rule it does not trigger currently.  Trying to figure out how I can debug.  

OK, I got it working, my apologies, looks like I hadn't added it as a Global Rule but instead a project rule.  I think I need some more understanding between the difference of the two. 

Project rule will be limited in scope to a single project.

Global is for rules that involve or communicate with multiple projects.

0 votes
John Funk Community Leader Jan 08, 2020

Hey David - is the Customer number field actually defined as a number field or is a text field? If it is a number field that should work. If it is a text field, then try using the ~ instead of =

the customer number field is a Select List (single choice)

John Funk Community Leader Jan 09, 2020

So maybe try the ~


Tried the ~ and get the following error in the Audit log: 

Error searching for related issues. This is most likely because the following issues don't have a related issue of the type you specified. Try narrowing your search to only include issues that contain links to related issues:AT-4: "((project = "Customers" and "Customer Number" ~ "37258") AND (key != AT-4)) AND (project in (10026))" - The operator '~' is not supported by the 'Customer Number' field.

John Funk Community Leader Jan 09, 2020

Well, guess that answers that. But when you use the = sign, you get no error, but it doesn't return values as you would expect?

Correct, if I use the = sign I get the "No action performed" 


Image 134.png

n case you were interested in what kind of data is in the customer number custom field.  


It may also be good to know that if I put the following into an advanced JQL search in Jira, I do get the results I am looking for: 


project = "Customers" and "Customer Number" = "37258"


I want the issue in Jira, to be the Parent issue, does that make a difference in my Then: rule? I guess in either case it should be able to find the issue and link to it.  

John Funk Community Leader Jan 09, 2020

Glad it is working for you. Good to know about the Global Rule. 

Suggest an answer

Log in or Sign up to answer

Atlassian Community Events