Select list options based on project

Kevin Klesz January 10, 2020

Hello everyone,

 

is it possible(via script) to set the available options of a custom field select list, based on the project an issue is being created in?

E.g. field selectlistA.

If we are in Project A, selectlistA should have options: 1,2,3,4.

If we are in Project B, selectListA should have options: 2,4,6,8.

Many thanks in advance

Kevin Klesz

2 answers

1 accepted

2 votes
Answer accepted
Jorden Van Bogaert
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.
January 10, 2020

Hi @Kevin Klesz 

You don't need to do this specific use case via scripts. You can simply use custom fields contexts.

This way, you'd create a context and map it to project A, where the dropdown values are 1,2,3,4 and another context mapped to project B where the values are 2,4,6,8

You can find more info here: https://confluence.atlassian.com/adminjiraserver/configuring-a-custom-field-938847235.html#Configuringacustomfield-add_schemeAddinganewcontext

 

Hope it helps!

Kind regards
Jorden

Kevin Klesz January 10, 2020

Thank you Jorden, I didn't even know about this!

Like Jorden Van Bogaert likes this
Jorden Van Bogaert
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.
January 10, 2020

I understand that completely! It's not Atlassian's most obvious feature ;)

0 votes
Brian Oconnell March 26, 2020

That support link is only for Server and it does not have a linked article for Cloud.

Which is pretty much the story of Atlassian support in general.

Suggest an answer

Log in or Sign up to answer