Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,554,380
Community Members
 
Community Events
184
Community Groups

How do I properly use strings in a "For JQL" automation rule when using smart values?

Edited

Jira/Apps Versions:

  • Jira Server: 8.8.1
  • Automation for Jira: 7.1.14
  • JQL Search Extensions: 3.1.3

Description of the automation which I want to accomplish:

  • Trigger: On change of "Customer Name" field
  • For JQL: "Customer Name" ~ {{issue.Customer Name}}
  • Then: Edit issue and copy "Customer Name" from "Trigger issue"

The automation is triggering properly, and it's correctly finding the "Customer Name" field, which in my test case, contains the string "ACME INC, Co."  This breaks the automation because there are spaces in the name (see error below).  Since the field I'm wanting to match is a free text field, it will always contain a string (name) with a varying number of spaces, special characters, lengths, etc.

Below is my error, which to me is obvious that I need to somehow create the "For JQL" search to treat the "Customer Name" as a string, but for the life of me I cannot find any documentation on how to accomplish that:

  • TIX-439: "(("Customer Name" ~ ACME INC, Co.) AND (key != TIX-439)) AND (project in (redacted))" - Error in the JQL Query: Expecting either 'OR' or 'AND' but got 'INC'. (line 1, character 31)

How do I make the Jira automation wrap ACME INC, Co. in quotes so it treats it as a text string?  TIA!

1 answer

I found a colleague who had the same issue but figure out the solution, so I'm putting it here for others, and it's quite simple:

Wrap your smart value in quotes, OUTSIDE the braces.  FWIW, I did everything BUT that... Not sure why this isn't clearly documented anywhere, my colleague had the same issue finding an answer, and stumbled upon it by brute force trial and error...

Example: "{{issue.Customer Name}}"

This was something I was banging my head on for so long. Thank you for sharing!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events