How can i set a labels type custom field using smart values in automation?

Diane Fahr January 27, 2022

We have a labels type custom field called Market.  I am trying to copy from labels to market.  I have tried this method:  market.jpeg

and I tried ..

{
"fields": {
"customfield_12501": {{triggerIssue.labels}}
}
}

when i add a log statement for issue market: {{triggerIssue.Market}} only a blank is returned. 

How can I access this field?

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.
January 27, 2022

Hi @Diane Fahr 

The labels field is a list of values, so perhaps trying converting it into a JSON array first, like this:

{
"fields": {
"customfield_12501": {{triggerIssue.labels.asJsonStringArray}}
}
}

Kind regards,
Bill

Suggest an answer

Log in or Sign up to answer