Setting a default value for a drop-downs based on selected issue-type

Dinesh
Contributor
February 4, 2019

I have a Project with custom Issue types(A, B and C) and I have a drop-down(Drop-down1) present in Create screens of all these Issue types.

Drop-down1 Values ----- Mango, Banana, Apple.

So when Issue type A is selected I would like to set the Default value of Drop-down1 to Mango and for other issue types I would like it to be "None"

 

I tried setting up a different context for same project twice but it does not allow me to do so.

Can this be achieved  ?

 

Thanks for the help!

2 answers

1 vote
Kian Stack Mumo Systems
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 4, 2019

Dinesh, 

You cannot do this using custom field contexts. I understand the desire, but it isn't possible with the base functionality.

 

Thanks, 

Kian

Dinesh
Contributor
February 5, 2019

Thank you 

0 votes
Alexey Matveev
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 4, 2019

Hello, 

You would need a plugin for it.

For example, you could use the Power Scripts add-on:

https://marketplace.atlassian.com/apps/43318/power-scripts-jira-script-automation?hosting=cloud&tab=overview

You could add a Live Fields with a code like this:

if(issueType == "Epic") {    

  lfRestrictSelectOptions("customfield_10703", {"1", "2", "3", "4", "5"});

}

You can read more about Live Fields here:

https://confluence.cprime.io/display/JJUPIN/Live+Fields

Dinesh
Contributor
February 5, 2019

Hi Alex,

 

Thanks for your response.

Currently we don't have Power Scripts add-on installed in our system. Is it possible to implement this functionality using Script Runner?

 

Thanks!

Suggest an answer

Log in or Sign up to answer