Forums

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

How to block any transition when custom field has a defined value ?

Nath April 16, 2019

Hi,

In Jira server, I want to block any transition when a custom field has a certain value.
I want also that in his case, the user haven't button proposing the transition.
I think that I have to use script runner to achieve that. But I can't find the place where I have to put a script wich could act on all possible transitions in the project.
I need some help to create the script too.
Thank you in advance.

Nath

1 answer

0 votes
Tarun Sapra
Community Champion
April 16, 2019

Hello @Nath 

If you don't want the user to see the transition button, then just add the script in the condition section. And that's it. Use "Simple scripted condition" option in the script runner's conditions options.

Tarun Sapra
Community Champion
April 16, 2019

This is for custom field value

cfValues['Some Custom Field'] != 'Some Value'

If the custom field is not the value "some value" only then the user be allowed to see transition button otherwise user will not see the transition button if the value of the field is "some value"

Nath April 16, 2019

Hi Tarun Sapra,

Is there a solution to execute this condition for every transition, without put it for each ?

Nath

Tarun Sapra
Community Champion
April 16, 2019

Hello @Nath 

You can add the code in the script and refer that file/script in the conditions section of all  transitions.

Suggest an answer

Log in or Sign up to answer