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,369,808
Community Members
 
Community Events
168
Community Groups

Using conditional execution with customer single-select custom field

I'm configuring a "create issue" post function with a "conditional execution" added so that the Create Issue should only run if/when custom field (a Single Select List) is set to "XYZ"

I've tried 

{{ issue.fields['Products Impacted'].value == "XYZ" }} but this is always returning false no matter whether null, set to XYZ or set to something else 

Thanks for the help!

1 answer

1 accepted

0 votes
Answer accepted

Hi @Simon Tilbury ,

Can you please check below points on this.

  • Test the condition against an existing issue for all the scenarios.
    test01.png

  • If you still get false for all the scenarios, navigate to Settings > Issues > Custom Fields > Search for 'Products Impacted' >  Click on .. against it and click 'contexts & default value > check for XYZ value > Edit it and check if you have any spaces before or after XYZ. If any space exists please remove the spaces & save. Try the scenario.
    Screenshot 2021-11-09 at 11.10.01 PM.png
  • Alternatively, you can make use of below code. In below code, instead XYZ as value you can give the option id of the selected value.

    {{ issue.fields[
    'Products Impacted'].id == 10001}}

  • Please note that you will be able to see option id once you click on Edit against select option. Please refer below screenshot.
    Screenshot 2021-11-09 at 11.16.00 PM.png

 

Thanks,
Avinash

Brilliant! 

I had originally used

issue.customfield_17082.value == "XYZ" 

I then changed to (but didnt work)

issue.customfield_17082.id == 16942

I then changed to and this worked

issue.fields['Workstream'].id == 16942

 

Many thanks for the helpful/clear explanation. Much much appreciated! :) 

Thanks @Simon Tilbury , Glad to know that configurations are working as expected.

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events