Advanced Workflow Configuration Add Validator for Active Sprint

Ruben Rubio January 22, 2020

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
Kristian Walker _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.
January 23, 2020

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

Ruben Rubio January 23, 2020

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.

Kristian Walker _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.
January 24, 2020

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
Kristian Walker _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.
January 28, 2020

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

0 votes
Cristian Ionescu
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.
January 22, 2020
Ruben Rubio January 22, 2020

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?

Cristian Ionescu
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.
January 23, 2020

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