I am building an automation to link issues with the same external ID to across projects in Jira. I tried using the Lookup issues action. I started with
But it fails to find anything. From the Audit Log:
I replaced the {{issue.REDCap ID}} with an actual value, 1102, and still received that "result". The JQL with a set value works when used in Issue Search and it returns one record like it should.
Do I need to use the custom field id number in the automation JQL? Any other ideas why it isn't returning results?
Hello @Aron Kuch As @Mark Segall has suggested do try surrounding it in quotes... But one other thing, You mention you are searching across projects, please also make sure your rule scope has "MAIN" project included. If you dont have scope, you wont have hits.
Ah, rule scope. I had set it to one project because I just wanted the one project to link back to the first. But appears to have limited the JQL search to just that project.
I changed to Global scope, multiple projects could also have worked, and it ran. Thank you.
I assumed that issues in MAIN would now trigger it when there REDCap ID field was populated, so I created an condition component to filter to just issues on the project that I want the run to trigger on. When I tested with a MAIN issue, the rule started, but terminated when the " issues did not match the condition".
Thank you again, this solves this part of the automation.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Aron Kuch
For a question like this, please post an image of your complete automation rule, images of any relevant actions / conditions / branches, an image of the audit log details showing the rule execution, and explain what is not working as expected. Those will provide context for the community to offer ideas. Thanks!
Until we see those...
Smart values are name, spacing and case-sensitive. And, often the smart value does not match the displayed field name on the views. When the incorrect smart value is used, it often fails silently, as you see with no issues found for the lookup issues action.
To confirm that JQL is using the correct smart value for your field, please use this how-to article. Essentially, you use an example issue with your field, call a REST API function with a browser, and search for your field on the page to find the correct smart value (or custom field id).
https://support.atlassian.com/cloud-automation/docs/find-the-smart-value-for-a-field/
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Aron Kuch - I believe what you have will work, but you need quotes. Try this:
project = MAIN AND "REDCap ID" ~ "{{issue.REDCap ID}}"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This lookup wont work, you are telling jira "look for a project = main and a field called "REDCap ID with a literal text value {{issue.REDCap ID}}. Thats why your second print works.
Heres some documentation:
https://support.atlassian.com/jira-software-cloud/docs/jql-operators/#CONTAINS----
https://support.atlassian.com/jira-software-cloud/docs/search-for-issues-using-the-text-field/
https://confluence.atlassian.com/automation074/text-functions-1141481322.html
Using vanilla JQL, i dont think its possible to compare strings. Firtst idea that comes to mind is that you will need to create a variable (create var component) and compare it using a string function.
Create var = REDCapId
{{issue.REDCap ID.match("REDCapId")}}
That would take some testing.
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.