Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to restrict custom fields dropdown values based on issuetypes?

Manoj
Contributor
June 5, 2023

Hi Community,

Greetings!

I have project in which i want to restrict the list of dropdown values appearing based on the selection of issue types. 

for example, i have issue types IRB1 and IRB2 and custom field called finance service and budget handler and both fields are interdependent. (with approx 10 drop down values)

So if users select IRB1 then they would get to see only the fields values under IRB1 only and samething for IRB2

but i have to bifurcate the finance service for IRB1 and IRB2 so that the people belongs to IRB1 issue type does not get to see the list of IRB2 issue type.

kindly suggest.

 

Thanks

M

3 answers

0 votes
John Funk
Community Champion
June 5, 2023

Hi @Manoj 

You can try to create different Contexts for the custom field based on issue types. Meaning that you create a Context for one issue type and have a list of values for the field. Then create another Context for the same custom field but with a different issue type, then provide a separate list of values for that context. 

Manoj
Contributor
June 5, 2023

@John Funk hi, Thanks, Theoretically, i understand this but how do i initiate this, could give me some hint to start with pls.

Thanks

John Funk
Community Champion
June 5, 2023

Ah, it looks like this is not available in Server as it is for Cloud. Here is the request you should vote for and follow:

https://jira.atlassian.com/browse/JRASERVER-66849

You might be able to do this with the ScriptRunner Behaviours add-on.

Manoj
Contributor
June 5, 2023

@John Funk Thanks, i will be looking into this, yes i have ScriptRunner Behaviours add-on

0 votes
Aditya Verma
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.
June 5, 2023

Hi @Manoj ,

This is not possible natively in Jira. Here is Feature request for this.

But it can still be done out of the box with help of Scripting plugins.

One of the workaround would be to use a cascading select field in which first drop-down have values IRB1 and IRB2 and based on the first selection you can have other values in cascading drop-down fields.

Thank,

Aditya

Manoj
Contributor
June 8, 2023

@Aditya Verma Hi, do you know how this can be achieved in using script runner?

Aditya Verma
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.
June 8, 2023

Hi @Manoj ,

You can get a good direction on groovy script by answer provided by @Kian Stack Mumo Systems here.

Do check this article as well.

Thanks,
Aditya

0 votes
Manoj
Contributor
June 5, 2023

@Fabio Racobaldo _Herzum_

@John Funk 

Hello Leaders, kindly guide to achieve. 

Suggest an answer

Log in or Sign up to answer