I have the following query in the lookup objects in automation:
objecttype = "Contact" and "Team" = {{"vAssignedTeam"}}
that works when the variable vAssignedTeam does not have a space in the name. When the team has a space in the name, it does not return anything, can someone verify that my syntax is correct?
Hi @WB
If that is a variable, please try putting the quotation marks around the smart value instead:
objecttype = "Contact" and "Team" = "{{vAssignedTeam}}"
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.
Would you please post images of your complete rule and the audit log details showing the execution? That may provide context for what you are seeing. Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am hosted so can not export the log. I split out the automation rule that is not working into a this simple manually triggered automation rule:
Here's the Query:
Here's the log:
Here's the comment, you can see that the variable printed out "Network Services" while the lookup object returns nothing.
Here's the object it should've returned from the Asset schema:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Just to confirm, you are using Jira Cloud, correct?
Would you please show your Create Variable component in the rule? That may explain what is happening with the lookup.
Next, I wonder: smart values are case-sensitive and I suspect the JSM objects are as well. Perhaps change the lookup query to this:
objectType = "Team" AND "Name" = "{{vAssignedTeam}}"
And, after the lookup would you please write these two things to the audit log:
Number of objects found: {{lookupObjects.size|0}}
List of the object names: {{#lookupObjects}}{{Name}}{{^last}}, {{/}}{{/}}
The second one will list just the Names of any objects found, with a comma separator.
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.
Yes, we are cloud. Using your suggestion to log the number of found, I was able to resolve the isssue. It appeared that I just need to add a " " to my variable statement. So, my original variable statement was: {{description.substringBetween("Team:",";")}}.
This was changed to: {{description.substringBetween("Team: ",";")}}, with a space after Team:
This fixed my issue. Thanks for your help in suggesting to log the object found.
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.