Update Value based on Lookup Table Key referenced by Variable

Celina Kincaid November 15, 2024

We link our service desk tickets to our product tickets 

Our product tickets have a checkbox field called Clients.

I have the trigger working the way I want but it can't find the lookup value correctly.

Here is what I want to happen:

  • Read the project key from the linked issue.
  • Create a variable from the project key.
  • Use that variable value to reference the lookup table key, to then find the value to set on the Clients field.

 

 

{
"update": {
"Clients": [{ "add": {"value": "{{ClientRefAthroughM.get({{linkedproject}})"}}}}]
}
}

 

ClientRefAthroughM = lookup table name

linkedproject = variable

1 answer

0 votes
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 15, 2024

Hi @Celina Kincaid 

Once a smart value expression is inside a set of double-curly brackets, you do not need to add more.  There also appear to be some extra brackets in your expression.

For example:

{
"update": {
"Clients": [
{ "add": { "value": "{{ClientRefAthroughM.get(linkedproject)}}" } }
]

}
}

As a tip, when writing JSON expressions for rules, try first creating them in an editor which shows if the brackets, parentheses, etc. match up.  Once they do, copy-and-paste the expression into your rule for use and testing.

Kind regards,
Bill

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events