Hi there,
I am trying to lookup work items with the same value in a custom field as in the same customfield in the triggerIssue of the automation.

Step 1: Create smart value
I first create a smart value called {{LookupOrder}} which contains {{triggerIssue.customfield_18631.value}}

Step 2: Branch
Then within the branch step I am using this JQL Query:
{{issue.customfield_18631.value}} ~ {{LookupOrder}} AND parent = 'ACMEINC-104'

When I execute the manually triggered rule on the trigger issue I get this error in the audit log:
--------------------------------------------------------------------------------------------------
Branch rule / related work items05/07/2025, 17:08:04
Unable to find related work items. Try to only include work items containing links to related work items in your search:ACMEINC-104: "( ~ AND parent = 'ACMEINC-104') AND (key != ACMEINC-104)"
- Error in the JQL Query: Expecting a field name but got '~'. You must surround '~' in quotation marks to use it as a field name. (line 1, character 3)
--------------------------------------------------------------------------------------------------
What can I do to retrieve the work items with the same value in the specified customfield as in the trigger issue. How can I add some more JQL conditions, like the found work item key should be different than the triggerIssue - work item - key, and the parent should be a specific work item.
In the next steps I want to do some update and comment actions on the looked up issues.
Thank you very much for your insights! 🙏