Hello,
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.
Thanks.
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:
Hope that helps.
Cheers,
Scott.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm in cloud version and I dont have that "For JQL" option? How do I get that?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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 =
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
the customer number field is a Select List (single choice)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
So maybe try the ~
:-)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Correct, if I use the = sign I get the "No action performed"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
n case you were interested in what kind of data is in the customer number custom field.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Glad it is working for you. Good to know about the Global Rule.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.