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

Tibor Tonhausen 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 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-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
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