How to add values to the Label in Behaviou Initialiser Functions

I 'm trying to make a script to initialize a field type label , it is important to be type label
as I can add more values, only with the method setFormValue
 
thanks

2 answers

Hi Julio Please correct me if I am wrong, but you want to add labels in a custom field of type labels through a behaviour ? Can I ask if the labels already exist or you want to create them during initialisation ? regards Thanos

Sorry I have not explained well

I created a custom field type label, This field will be used in different projects, and It has no values

I need to use the Jira functionality "Behaviours" to preload values in creation form

this is a part of the information that Jira offers

"Initialiser Functions
Initialisers run once when the form is loaded, and is a good place to put code which sets default values, or sets options for instance."


I currently use the plugin scriptRunner https://marketplace.atlassian.com/plugins/com.onresolve.jira.groovy.groovyrunner/server/overview

And I can't find information on how to preload data Grooby and Jira API

Is complicated, need to use functionality like field label but preload values like a list box

Hi Julio, Could you please tell me which your ultimate goal is? You cannot preload 'labels' using behaviours. I (think) understand what you are trying to achieve but what is the point ? I mean you create a custom field that get labels but you want to add plain text, if that is the case then simply use another type of custom field. Is your goal to eventually generate labels with names the strings you added to the label custom field ? Kind regards Thanos

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Jul 10, 2018 in Marketplace Apps

If you’re an Atlassian app developer, you’ll want to know about Atlas Camp!

This September 6-7, hundreds of Atlassian App developers will flock to Barcelona Spain to build skills, discover product roadmaps, meet face-to-face with the Atlassian team, and learn how to extend t...

182 views 0 4
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you