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)}}"
}]
}
}
Have also tried this...
{
"fields": {
"customfield_10326": [{ inboundReferences(Counterparty="issue.customfield_10922", Contact_Type="Finance").get(0).Email}}"
}]
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.