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
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I cannot provide you an answer about this.
Let us wait for an Atlassian Member for additional informations.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.