How to display different options depending on issue type for one Multi Checkboxes field

laurent vanhalle March 6, 2012

I would like to do the following :

- One custom field (Multi Checkboxes)

- the available values for this field should be different depending on the issue type (but not depending of the project)

I tried to do that with context, but I can't define

- 1 context applying for all projects (global), restricted to issue type 1

- and context applying for all projects (global), restricted to issue type 2

I'm using JIRA 4.4

Any idea ?

2 answers

1 accepted

0 votes
Answer accepted
Radek Kantor
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.
March 6, 2012

It is impossible to have different options for one checkbox CF depending on issue types. Can you use two CF, eg. with the same name? Or you must define all possible values and disable some of them based on issue type with some javascript (defined in CF description field).

0 votes
MatthewC
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.
March 6, 2012

Hi Laurent,

The problem is that you can only have one global context set for any one custom field. So if you have a global context set for IssueTyepA, there is no ability to set it for IssueTypeB on a global context.

But there are two workarounds I can think of.....

1. Is to have two custom fields of the same name but different options (as xrakan says). It's simple but has problems when you do reporting (JQL: issueType in (IssueTypeA, IssueTypeB)) as if you're search has both issue types in it, then then you will not see the custom field in the search results. This is because the Issue Navigator only shows you the common set of fields. Even though the two CFs would have the same name, they are different and are outside the set on common fields between IssueTypeA and IssueTypeB so would be excluded.

2. More manual but the 2nd approach: you could get around the limitation of only one IssueType global context by specifying two contexts based on Issue type but selecting every project in your Jira instance. This means that you can set different values and the CF would appear in the Issue Navigator. The downside to this solution is that every time you add a new project, it has to be added to the context.

There are a couple of other ideas which you could do with javascript and having one CF with the combined list of values for both issue types and then removing any CF value not appropriate to the current IssueType but I won't go there as it would be a very bad design & very hard to maintain.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events