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

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

Rickhi.Seecharan April 5, 2022

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

1 vote
Mark Segall
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 5, 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.

0 votes
Curt Holley
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 5, 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."

Rickhi.Seecharan April 7, 2022

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
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 7, 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?

Dylan Kogut June 17, 2022

@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
Rickhi.Seecharan July 14, 2022

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

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events