Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Scriptrunner custom workflow validator

Harrison Ponce
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.
June 11, 2025

A bit new to Scriptrunner, so reaching out to the community here to see if this is possible and if so, how to pull it off.

We are on Jira Cloud and we have a team-managed business project using a multi-select user picker custom field.

We would like for the custom field to store no less than 2 users. So if it has 1 or 0 users, it should display a custom error message on all issue actions (create, edit, etc.)

Any ideas?

2 answers

0 votes
Kristian Walker _Adaptavist_
Community Champion
June 12, 2025

Hi Harrison,

Yes, that is correct. Validators can not be used in Team Managed projects, as Team Managed projects in Jira do not support customising the workflow. 

You should be able to set up approvals in Company-Managed projects, and the Atlassian page here provides a guide on how to do this. 

I hope this helps.

Regards,

Kristian

Harrison Ponce
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.
June 12, 2025

Thanks so much, @Kristian Walker _Adaptavist_ , unfortunately this is for a business project, not a service project, which I believe still does not support approval workflows.

0 votes
Lucas Knorr
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.
June 11, 2025

Hi @Harrison Ponce

Yes, this is definitely possible using ScriptRunner. You can find example code snippets in their documentation here: ScriptRunner Jira Expression Examples

You can combine these snippets to fit your specific use case. 

Additionally, the Adaptavist AI can assist you in crafting the necessary Jira expressions if you’re not sure where to start — it’s available directly in the interface when adding a validator or condition.

Harrison Ponce
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.
June 11, 2025

Thanks @Lucas Knorr! I think I've figured out why I was having such a hard time finding this for my use-case. It seems like these custom validators and other scripts uses are not available for use with team managed projects. Does that seem right to you?

We are using a team-managed project to leverage approval functionality in the workflow. Company-managed projects seem to still not support approval workflow features...and I can't seem to find a way to build an approval feature using Scriptrunner.

If you have any ideas for this specific scenario, I'm all ears! :-)

Suggest an answer

Log in or Sign up to answer