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

Advanced Workflow Configuration Add Validator for Active Sprint

Hi,

I am trying to add a validator in a transition to check whether the issue is linked to an active sprint.

I can't find how to do it. I have even looked into "ScriptRunner" option but the documentation does not look enough to perform this task.

Does anybody how to do it?

Regards,

Ruben

2 answers

1 accepted

1 vote
Answer accepted

Hi Ruben,

hank you for your question.

I can confirm that validators in ScriptRunner for Jira Cloud use the Jira Expression Framework as described in the Atlassian documentation here which means you cannot write normal groovy code to write the validator expression.

We have created the Knowledge Base article located here which explains in more detail how validators work and how to check the syntax required to write them and you will be able to use this as a reference guide to help you create the validator that you require.

I can also confirm that we have collated some example validators here and one of the examples shows how to only allow an issue to be transitioned when the issue being transitioned is in an active sprint and this will be a useful reference to help you to create the validator expression which you require.

I hope this information helps.

Regards,

Kristian

Amazing Answer. I finally figure out, as you had it in your examples.

issue.sprint.state == 'active'

 The documentation does not look sufficient to develop effective ScriptRunner applications. I am missing a tool to be able to test it.

Hi Ruben,

I can confirm that Conditions and Validators are development features inside of ScriptRunner for Jira Cloud currently which means we are still working on the full set of features for them.

This means that we will have documentation coming out for these shortly and plan to add the ability to test expressions in future.

In the meantime, we would advise reading the Atlassian documentation on the Jira Expression Framework which we have linked to above in order to help you to see how validators can be created.

Thanks,
Kristian

Like Ruben Rubio likes this

Hi Ruben.

I can confirm that we have now released some documentation for the conditions and validators features which you can find as child pages below the page in the documentation here.

I hope this helps.

Thanks,

Kristian

Unfortunately is hard for to justify the company to pay a monthly retainer to JMWE plugin in order to have and use this small feature.

Is there any chance that we could use the existing ScriptRunner instead?

I cannot provide you an answer about this.

Let us wait for an Atlassian Member for additional informations.

Suggest an answer

Log in or Sign up to answer
TAGS

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