Forums

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

Updating custom Label field

Lisa Mendonsa April 4, 2025

I am trying to add 2 values to a custom Label Manager as part of an automation. Its not available in the Edit dropdown list so I tried the Additional Fields section but I cannot seem to get the syntax working. 

I have tried update, fields, set etc and nothing seems to work. It says Success but no value in the field

The field is called "UDF Free Text 1" and the values should be these 2 labels which are pre-defined in the Label Manager:  

Team_Phoenix, Team_Interstellar

Tried:

1) { "fields": { "UDF Free Text 1" : [{ "Team_Phoenix" , "Team_Flamingo" }] } }

 

2) { "update": {UDF Free Text 1": "set" : { "Team_Phoenix" , "Team_Flamingo" } }}

and various combinations of [{ }] but cannot get it working.

1 answer

0 votes
Dick
Community Champion
April 4, 2025

Hi @Lisa Mendonsa Welcome to the Atlassian Community

I think you're mixing things up into quite a spaghetti here. :)

It all starts from your UDF Free text 1 definition. If it is a text field you cannot put arrays of values in it (that simply doesn't compute).

  • So start by sharing the custom field definition to check if it has the correct definition.

You mention the plug-in Label Manager. I take it you were able to predefine the labels there.

You should adapt the syntax to change an array using json to the documentation provided by Atlassian

{

    "update": {

        "UDF Free Text 1": [{

            "add": "Team_Phoenix",

            "add": "Team_Flamingo"

        }]

    }

 }

Kind regards,
Dick

 

Lisa Mendonsa April 4, 2025

Hi Dick

Thanks very much for the syntax, its now working partially in that it sets the value to the second label. So while it does allow me to manually populate that field with multiple values (We have all the New Jiras with both values), in automation, it isn't able to set multiple values.

The documentation I have does not specify whether it is an array field, so I'm going to check with the Jira admins.

Dick
Community Champion
April 8, 2025

Hi @Lisa Mendonsa 

The way you and I treat the field (with the square brackets)  is how one should address an array field. Normal fields like text fields do not require these.

Kind regards,
Dick

Suggest an answer

Log in or Sign up to answer