Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,459,990
Community Members
 
Community Events
176
Community Groups

convertToSingleSelect behaviour - label problem

Hello,

I use behaviour and REST endpoint. Similar to https://scriptrunner.adaptavist.com/latest/jira/behaviours-conversions.html

My REST returns list in format:

items: [{value: "xyz", label: "abc", html: "123"}]

html - represents what the user see in dropdown

value - represents value to save in field

label - I think it is string presented to user when some element is chosen. But is not working.

What is the destination of the label field? How to show user something different to value?

1 answer

1 vote

The way I've used this, label and html are functionally equivalent.

html allows you to provide the label with some formatting (to highlight the matching text for example).

After the selection is complete, the label is what you see in the field.

Note that in other screens (view screen, issue navigator) the "value" is all you can display and "value" is also used in indexing and searching. I would not attempt to use some internal ID for this. 

In most cases, you will likely want "value" and "label" to be the same.

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events