Forums

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

Condition - Hide Transition from User based on Value from Multi Select List

Tibor Tonhausen
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 2, 2017

Hey, 

 

I am having two transitions which I want to allow depending on the values of a Multi Select Field with these values:

  • a
  • b
  • c
  • d

Working Condition for Transition 1

Any of the following conditions:

  • cfValues['MyField'] != null && cfValues['MyField']*.value.contains("b") ^ cfValues['MyField'] == null
  • cfValues['MyField'] != null && cfValues['MyField']*.value.contains("c") ^ cfValues['MyField'] == null
  • cfValues['MyField'] != null && cfValues['MyField']*.value.contains("d") ^ cfValues['MyField'] == null

Now I want to show Transition 2 only if value "a" is the single value of that field.

How could i do that?

Appreciate any help.

Many thanks...

2 answers

4 votes
Ethan Foulkes
Contributor
November 6, 2017

Hi Tibor,

You can do this using the Power Scripts add-on. Sounds like you are using ScriptRunner though so that may not be an option. If it is an option let me know and I can post code and/or video on how to setup.

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.
November 6, 2017

Of course you can do this with ScriptRunner, it's exactly what it was written for.

You just need a pair of conditions:

cfValues['MyField']*.value.contains("a") and  cfValues['MyField']*.size == 1

Suggest an answer

Log in or Sign up to answer