Transition condition: restrict transition based on custom field value

Pete 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.
June 20, 2017

Hello, I have a custom field called "Code Reviewed" with a value of "Yes" or "No", defaulting to "No".  I want to prevent a transition from occuring based on the value of the custom field.  I don't want to hide the transition, but I don't want it to work until the "Code Reviewed" value is set to "Yes".

My pertinent workflow:

Status: Dev Completed
--- Transition: DEV Complete
Status: In QA

How can I add a condition to the "DEV Complete" transition that checks the value of my custom field and only allows the workflow to advance when "Code Reviewed" value is set to "Yes"?

1 answer

2 votes
josh
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 20, 2017

Rather than a yes/no drop down select, you could make the Code Reviewed a Checkbox with only one option: yes.

Then use a workflow validator to require that field be set to execute that transition.

Using conditions will always hide the transition until the criteria is properly met.

 

Pete 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.
June 20, 2017

Thanks Josh, the only problem I have with your suggestion is that the Yes/No is already in production and we have hundreds of issues that already have a value "No". 

I will see it I can get the workflow validator you mentioned to work with the yes/no control. 

josh
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 20, 2017

Yes retirement of custom fields is always a problem. Another thing you could try is to "disable" the No option on the custom field and remove the default so that the old data would remain, but you could implement the new behavior for future issues.

Pete 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.
June 20, 2017

Thanks for the suggestion, much appreciated :)

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events