I am in need of an automation rule that (when true) runs the following json script that does smart value lookups for custom Field and Component fields in the ticket and adds them as Labels in the ticket.
I have the following for my JSON Body
{
"update": {
"labels": [
{
"add": "{{issue.fields.customfield_10041}}"
},
{
"add": "{{issue.components.name}}"
},
}
]
}
}
I tried this variant with no luck too
{
"update": {
"labels": [
{
"add": {
"id":"{{issue.fields.customfield_10041}}"
},
{
"add": {
"id":"{{issue.components.name}}"
},
}
]
}
}
I have no problem triggering the rule, just getting the JSON action to run successfully in looking up the values. I keep getting "Error while parsing additional fields. Not valid JSON." errors. I've run these same {{issue.etc}} lookup values in other types of rules and they return the expected values. So no issues with getting them to look up values else where (just with lables). Thanks