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,466,904
Community Members
 
Community Events
176
Community Groups

How to set a label based on a 'custom field single drop down'

Hello

 

I have created a single drop down list.

I would like to automate so whatever value is selected in the drop down list - is automatically created as a label.

this is a global setting for the project, not specific.

2 answers

0 votes
Curt Holley Community Leader Apr 05, 2022

Hi @Rickhi.Seecharan 
Certainly @Mark Segall has covered off the automation beautifully, but what I am interested in is the Why?

If you have a custom field on the screen of the issues that require it.... Why do you need a copy of that as a label? as it would be visible, searchable etc. as is.

The only reason i can think of would be to keep a kind of history of any changes to the selection, so that all chosen (over a period of time) end up as labels. In which case you wouldn't want to do what Mark suggests "consider adding logic for situations where the dropdown has changed so that the old label is removed."

Hi Curt.

I would like it to show up on the ticket in 'Board' view...if its a label, then it shows up  Secondly, its a way of restricting people from creating new labels.

Like Rob Wilson likes this
Curt Holley Community Leader Apr 07, 2022

Right, a Jira Work Management restriction workaround. 
Of course if you were doing this in a Jira Software project you could have the custom field on the cards....and to that end,  being able to create and control custom fields (without the need for automation to create a matching label) is an even better way to discourage the overuse/creation of labels.

Is there any reason not to use a Jira Software project for this particular purpose?

@Curt Holley I can say that a team I operate on behalf of is trying to keep things as simple as possible and that is using a team-managed business project. Unfortunately, since you cannot add additional "Quick Filters" on the Board view, the workaround is to replicate whatever the value is in their custom field to a label so they have a way to filter the board and view their issues.

Like Rickhi.Seecharan likes this

This is also what I am trying to accomplish.  Thanks Dylan.

0 votes
Mark Segall Community Leader Apr 05, 2022

Hello @Rickhi.Seecharan and welcome to the community!

You can do it with something like this:

2022-04-05_08-54-29.png

2022-04-05_08-57-55.png

 

Note - I created the variable because I like the ability to tweak the smart value as needed.  Whereas if I applied the smart value directly to the edit issue action, it has to be deleted/retyped.

Secondly, the smart value takes spaces into consideration and replaces with an underscore because labels don't support spaces.

For copy/paste purposes, here's the smart value:

{{issue.Test Selector.value.replace(" ","_")}}

You may also want to consider adding logic for situations where the dropdown has changed so that the old label is removed.

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events