Forums

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

Is it possible to apply a validator across an entire workflow

Erik Macias
Contributor
May 2, 2019

Hi,

tl;dr: Is it possible to apply one validation across all workflow transitions (without applying said validation to each individual transition manually)?

I was wondering if it is possible to apply a validation (validator, condition, or post function are all valid options I suppose) across an entire workflow with multiple transitions?

We have 3 custom "Number Field"s that must contain a value of 0 or greater. I am aware of validators on workflow transitions, however, as the same validator would be used across all the transitions, rather than adding the same validator to each transition, I was wondering if it was possible to apply one validator across all transitions? 

I have used scriptrunner in the past, but would like to avoid that for now as it seems overkill for this (but I am not opposed to that idea). 

Also, are there any built-in validators for ticket updates? In the "Number Field" example, if someone updates the value without going through a transition, is there a way to validate the the value was not changed to a non-valid value? (I have used scriptrunner in the past for something similar, but if Jira has a built-in approach, that would be nice).

I am open to plugin suggestions as well.

Thanks,

Erik

 

P.S. Jira v7.6.7

1 answer

1 accepted

3 votes
Answer accepted
Nic Brough -Adaptavist-
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.
May 6, 2019

Frustratingly, no, we have to add validators, triggers, conditions and post-functions manually, one at a time.  (Other than the "mandatory field" and "user has transition permission" ones, done automatically or by the field configuration)

There is no built-in function for "non valid", you need something like Scriptrunner to provide that sort of thing.

Erik Macias
Contributor
May 6, 2019

Thank you @Nic Brough -Adaptavist-, I appreciate the response. 

Like Gokari likes this

Suggest an answer

Log in or Sign up to answer