Forums

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

scriptrunner condition for a specific custom field value

wajih zouaoui
Contributor
February 19, 2019

Hello,

 

can you please give me ideas about creating a condition in a spoecific transition.

This condition is about forcing only one user to execute a transition if a custum field have a specific value .

 

Like if the value of the custum field is A so the user B will be the only one allowed to execute the transition.

 

Thanks in adavance.

 

 

3 answers

2 accepted

1 vote
Answer accepted
wajih zouaoui
Contributor
February 19, 2019

HI sreenivasaraju P,

 

Yep i found how to set a value for a custum field but i dont know how to add the part of the user to execute the transition.

Ben Poulson
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.
February 19, 2019

You can add a validator to the workflow that checks the condition and fails the transition otherwise. You will have to compensate for allowing the transition if the value of the field is not the specific value, though. Pseudocode for how I believe the logic would work:

 

if custom field = value
if user = alloweduser
return true
else
return false
else
return true
wajih zouaoui
Contributor
March 1, 2019

Thanks sreenivasaraju P,

 

i forgot to ag this post with answered question.

wajih zouaoui
Contributor
March 1, 2019

Thanks sreenivasaraju P,

 

i forgot to tag this post with answered question.

0 votes
Answer accepted
Sreenivasaraju P
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.
February 19, 2019
0 votes
Sean Edler January 31, 2020

I am trying to do something similar with a Custom Field I named "Region Created" There are 3 choices, No, Empty, Yes

 

I want the transition to be hidden if the answer is Yes

Suggest an answer

Log in or Sign up to answer