It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to make 2 fields mandatory on a worfklow transition using scriptrunner

Jodi Hoffmann Apr 02, 2019

Hello,

I am trying to make 2 fields mandatory on a workflow transition using a validator.  We don't have JSU, instead we use Scriptrunner.  I am using a simple scripted validator.  Below is the code I am using:

cfValues['Digital Initiatives', 'Innovation']

 

When I update the fields I still get the error message that the fields are required and it won't let me go any further.

 

1 answer

0 votes
Peter-Dave Sheehan Apr 30, 2019

Try the following instead:

cfValues['Digital Initiatives'] && cfValues['Innovation']

If you want each field to report that they are required separately, create 2 separate simple scripted validator, then you can customize the message and field for each.

The downside to using only scriptunner simple scripted validator is that by default users will not know the field is required until they submit it. Try using a behaviour at the same time to provide a visual clue. 

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published in Opsgenie

Introducing Postmortems for Opsgenie

When incidents happen, it is crucial to diagnose and solve the problem as fast as possible. Equally important to this, teams need a way to reflect on why the incident occurred and how they can improv...

235 views 3 6
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you