Forums

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

Multiselect customfield filtering on create screen

Sai Krishna Katta January 4, 2024

I have two multi select custom fields 

 

Multiselect Customfield-A with values

  • Test A
  • Test B
  • Test C
  • Test D

Multiselect Customfield-B with values

  • Result 1A
  • Result 2A
  • Result 1B
  • Result 2B
  • Result 1C
  • Result 2C
  • Result 1D
  • Result 2D

If Test A is selected from Multiselect Customfield-A then 

Result 1A, Result 1B, Result 1C values should be visible in Multiselect Customfield-B

 

If Test B is selected from Multiselect Customfield-A then

Result 2A, Result 2B, Result 2C values should be visible in Multiselect Customfield-B

 

This in Jira Work Management company managed project

2 answers

0 votes
Nic Brough -Adaptavist-
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 5, 2024

As @Trudy Claspill says, you may be able to do something with Behaviours, but the code you'll need to right is going to be very complex, and you'll need to decide how you want it to work in different places.

Let's say you create an issue.  The code will need to hide the options that do not match the selections in the first field from the second field, and run every time someone selects another item in the first one.  That's not much of a problem, it's one of the things Behaviours was created to do.

But, with a multi-select, it's going to get horribly complex on edit.  Let's say you create an issue with A-A1, A-A2, and C-C2 as the six selections.

Now Bob edits the issue and removes A from the first field.  You now have an issue that has A1 and A2 on it, despite not having A on it. 

Behaviours can not deselect the options A1 and A2 because it has removed them from the list.  Even if you could, you now have the problem when Bob changes their mind, and puts A back in the first field, A1 and A2 would not be selected.  Behaviours cannot store the initial data for comparison between runs.

Either way, your data is now inconsistent.

I would look again at what data you are trying to capture with this field, and see if there is a different way to do it.  If, for example, you know people are never going to select more than three options in the first field, maybe add three cascading select lists.

Sai Krishna Katta January 5, 2024

This is for create screen only

Nic Brough -Adaptavist-
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 5, 2024
0 votes
Trudy Claspill
Community Champion
January 4, 2024

Hello @Sai Krishna Katta 

Welcome to the Atlassian community.

Are those the literal values that are available in the fields?

How do you know that Test A corresponds to Result 1*?

What would you expect to be available in Customfield-B if in CustomfieldA you select both Test A and Test B?

There is no native functionality that will provide that capability. Are you open to purchasing a third party app (if one exists that could provide this functionality)?

Sai Krishna Katta January 4, 2024

If Add-on Solves this. I'm able to buy

Trudy Claspill
Community Champion
January 4, 2024

Take a look at ScriptRunner - Behaviours from Adaptavist.

https://marketplace.atlassian.com/apps/1228522/behaviours-scriptrunner-for-jira-cloud?hosting=cloud&tab=overview

While that app itself is free, it requires that you also have the not-free ScriptRunner app from Adaptavist.

https://marketplace.atlassian.com/apps/6820/scriptrunner-for-jira?hosting=cloud&tab=overview

Sai Krishna Katta January 4, 2024

I have scriptrunner and behaviours

Can you please help me with the script for the above usage

Trudy Claspill
Community Champion
January 9, 2024

Have you tried to construct the script using the vendor's documentation materials? What do you have so far? Is there a specific portion with which you are struggling?

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events