You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
There is a known bug about looking up Assets (Insight) objects in Jira automation when the AQL contains an “&” character throws an error and returns no results: https://jira.atlassian.com/browse/JSDCLOUD-11142
Create an object with a Name containing an & (e.g. "A & B")
Create an automation rule (schedule trigger, lookup objects action)
Add an IQL like "Name = "A & B"
Execute the automation rule
The IQL is executed and the object with the name "A & B" is returned in the results
An error is returned like "IQL has invalid syntax... token recognition error at..."
Create a new attribute (Alternative Name) as the alternative attribute for Name.
Set the alternative value without “&” to the new attribute Alternative Name for all objects that contain the “&” character. For example: If the Name is "A & B", the Alternative Name should be set to “A and B”.
Via automation rule, create a formatted search input to replace the “&” character by “and” word:
{{searchInput.replace("&", "and")}}
Update the AQL with the formattedSearchInput instead.
BEFORE:
key IS NOT EMPTY AND Name = "{{searchInput}}"
AFTER:
key IS NOT EMPTY AND (Name = "{{formattedSearchInput}}" OR "Alternative Name" = "{{formattedSearchInput}}")
(The part "key IS NOT EMPTY" is just a test AQL to remind using the parentheses () after this test clause - without the parentheses () it will not work as expected).
Test result:
Pros
The original attribute value with “&” is preserved and can be found via AQL.
Cons
Have to add a new alternative attribute.
Have to populate the alternative attribute for all affected objects.
However, we might automate this step if there are too many objects:
Branch on AQL through all objects.
Check if {{object.Name}} contains "&".
Edit the object to set the Alternative Name = {{object.Name.replace("&", "and")}}:
UPDATE: You no longer need this workaround since Atlassian has fixed the bug.