Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Automation JSON error

Karen Kelly
Contributor
October 19, 2022

I am struggling to get the code right on a script runner Automation. 

I want to populate the TO (TXT) field with the email addresses of Finance Contacts for a Company selected in field Counterparty (IF) an Insight field.

 

customfield_10326 = To (TXT)

customfield_10884 = Counterparty (IF)

 

The structure of The insight schema is as follows:

Counterparty = on its own with an inbound reference Contact, Attributes: Email and Contact_Type where I specify Finance as a Contact Type and Counterparty

 

If Contact Person is a finance contact, belonging to Counterparty x then populate email address in To (TXT) Field

 

{
"fields": {
"customfield_10326": [{ "Counterparty": "customfield_10884": "Contact_Type" : "Finance" :
{{issue.customfield_10326.Email.get(0)}}"
}]
}
}

1 answer

0 votes
Karen Kelly
Contributor
October 21, 2022

Have also tried this...

 

 

{
"fields": {
"customfield_10326": [{ inboundReferences(Counterparty="issue.customfield_10922", Contact_Type="Finance").get(0).Email}}"
}]
}
}

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events