Only allow status transition if a custom field == value

DJ June 15, 2023

Hi

I have a custom workflow.

I have a Review status (sign off) and Done status

I would like to only allow the reviewer to be able to move the issue to Done only if he has selected a specific option from a custom field in the issue when in the Review status.

  • Issue moved to Review  
    • Issue cannot be moved to Done 
  • Issue dropdown field must be changed (Reviewed and Passed)
  • Status is set to Done

Can anyone give me a clue on the Automation logic steps

1 answer

1 accepted

0 votes
Answer accepted
Kris Dewachter
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 15, 2023

Hi @DJ ,

You need to add a condition to your workflow transition.

  • Edit your workflow
  • On the "Review" to "Done" transition, add a "Condition"
  • Select the "Value" field condition. If set, the transition can only be executed when the field has a specific value.

 

Best regards,

Kris

DJ June 15, 2023

Thanks Kris

When I select Value field condition as you mentioned I cannot see my custom field name in the list?

Kris Dewachter
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 15, 2023

It might not be visible intially. But it should appear when you start typing the name in the field.

Like DJ likes this
Amzad Khan May 22, 2024

Hi,

I am trying to achieve the same by using Feild required validator, but I am having different scenario

I am having Field Retrofit with the values as in the below screenshot.
retrofit 1.PNG

Now I want to add condition in the Transition to "Impact Assessment" to "In Progress" with the below conditions 

If Retrofit Type = Configuration then Field Relevant should not be blank 
if Retrofit Type = Data Migration then Feild Data Migration Enhancement should not be blank  

if Field Relevant is blank when Retrofit Type = Data Migration it should transition to next status In Progress, how can I achieve this? 
  
Is this can be achieved via automation  

Maciej Dudziak _Forgappify_
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 22, 2024

Hi @Amzad Khan

I am not sure about Automation, but it will be quite simple using any Jira expression-based validator/condition available on the Atlassian marketplace.

I am from Forgappify, and we developed Jira Expression Validator/Condition, which is part of the Workflow Building Blocks for Jira app.

The expression you need would be similar to the one below:

issue.customfield_a?.value == "Configuration" 
? issue.customfield_b != null
: issue.customfield_a?.value == "Data Migration"
? issue.customfield_c != null
: true

where customfield_a represents Retrofit Type, customfield_b is Relevant field, customfield_c is Data Migration Enhancement. 

You need to change customfield_ids to match ids on your instance. With our editor it is easy, just start typing the name of the field after "issue." , and you will get the correct suggestion.

I hope this is helpful for you, regards!

 

Amzad Khan May 22, 2024

It is possible to achieve it in behaviors, if so can you please provide me the behavior script for the same 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events