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

Dropdown options smart value

Daniel Bostock July 13, 2020

Hi,

I am trying to setup an automation work flow based on a Jira Service Desk issue created. One of the issue fields is a dropdown selection which allows the issue creator to determine which environment this request is applicable for. At this stage there are only two possible choices, but I plan to increase this in the future.


There are a lot of other fields which I can easily extract and have setup an automation workflow to email to me. However for some reason I cannot get it to work with providing me what was chosen by the creator in this drop down box.

 

For the sake of this example the dropdown box is labelled Environment and has a display name of Environment

 

For example, the drop down box has the following 2 choices.

 

Environment A

Environment B

 

When the email is sent off I am trying to get it to input that the chosen option into this line of text.

 


This request is for {{issue.fields.Environment}} environment.

 

A successful end result would be seeing something like this.

 

This request is for Environment A environment.

 


I have tried a few different smart value variables but maybe I am missing the magic one that makes it work.

 

Appreciate any and all help in advance!

2 answers

2 votes
Petter Gonçalves
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 17, 2020

Hello @Daniel Bostock

Welcome to the Atlassian Community.

Per your description, I understand that you created an automation rule to send a notification containing the option selected for a drop-down list called "Environment", however, you are not being able to reference the field value selected using Smart values. Is that correct?

By default, Jira already has a system field called "Environment", so I believe the smart value you created {{issue.fields.Environment}} might be wrong and referencing that field instead of the custom field you created.

In order to reference the correct smart value for custom fields, we recommend you to use the custom field ID instead of the name. These would be the steps to do it:

  1. Click in the cog icon of your Jira application at the top right corner > Issues
  2. In the left menu, select Custom fields and search for "Environment" in the search bar
  3. Then, click in the three dots menu > Contexts and Default value:
    Screen Shot 2020-07-17 at 17.25.55.png
  4. Copy the Custom field ID at the end of the URL of the new page displayed:
    Screen Shot 2020-07-17 at 17.26.55.png
  5. Navigate to your automation rule and add the smart value with the following structure, where "XXXXX" is the custom field Id you just collected:
    {{issue.customfield_XXXXX}}

For more details about the steps provided, please check the documentation below:

How to use Smart Values in Automation for Jira 

Let us know if those steps worked for you.

1 vote
mohapatra.c May 18, 2021

Hi Atlassian Team,

Is there any possibility to capture custom value from a drop down field without Id.

 

Thanks,

Chiranjib

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events