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

Validators: one, the other or both fields mandatory on transition

Hello,

I need to request either "Stellungnahme Gruppen" or "Stellungnahme Personen" from users on transition with validators, but also the case when both fields are filled will be fine.

With our current addons and in native JIRA I can't find a way to do it, so perhaps I can get it done in script runner? Anyone willing to help a bit with the code? 

Cheers,

Rok

PS: the closest thing I found so far (One field xor another is required) -> https://jamieechlin.atlassian.net/wiki/display/GRV/Validators

2 answers

1 accepted

2 votes
Answer accepted
nic Community Leader Nov 19, 2015

Script Runner has moved on a bit - see https://scriptrunner.adaptavist.com/latest/jira/builtin-scripts.html#_simple_scripted_condition

You should be able to do it on one line now -

cfValues['MySelect1']   || cfValues['MySelect2'] 

would this also work for the "Comment" field. Something like: 

cfValues['MyCustomField'] || cfValues['Comment']

Awesome, thanx man smile

nic Community Leader Nov 19, 2015

I should have said you've found a script which is pretty close already, it should actually still work (if you changed the XOR to OR and possibly made some updates to the calls, as the JIRA APIs have changed) But SR has functions that simplify the need for such code, so I thought you should try them first

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted in Jira Core

How to manage many similar workflows?

I have multiple projects that use variations of the same base workflow. The variations depend on the requirements of the project or issue type. The variations mostly come in the form of new statuses ...

875 views 7 0
Join discussion

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