How to allow or restrict transitions based on a field value?

SHANTANU SARDESAI April 16, 2019

I need to allow additional transitions if an issue is marked to be Found By Customer=true. Essentially, we need additional rigor and status transitions to be displayed and followed when the issue is found by the customer in the field. We do not want to create another issue type as most of the fields and process is the same.

In house issue:

A -> B -> C -> D

Field issue:

A -> B -> X -> C-> Y-> D

4 answers

1 vote
Daniel Davkovski November 6, 2020

Hi @SHANTANU SARDESAI I came across this as I was searching for a solution to a very similar need I have. This is what you can: 

 

1. Create all the statuses and add them to your existing workflow. 

2. Once the statuses are added, open the workflow in an edit via a Diagram view (this will help you to easily locate the ones you need to adjust)

3. In your specific case, you'll need to enable transitions to statuses X and Y only if `a field = Value`, then do the following --> 

- Click on status X -- Conditions -- Add a condition -- Value Field (the last) -- locate the field -- Condition would be = --> Value - type in the value from the field -- comparison type: select String for text or Number for numbers -- Ad

- Do the same for the status Y

What this will do is basically show the statuses X and Y as available based on the field (in your case Found By Customer=true). 

It will hide/not show those statuses if a value other then true is present in that field. 

Let me know if this helps! 

Celine Penaredondo May 4, 2022

Hi @Daniel Davkovski , I was trying to do this and nothing returns true. 

Transition was hidden. 

I was doing "Request Type" = "SomeString" 

Comparison Type = String

I get nothing in return, do you think I'm doing it wrong? 

Viktoryia K. October 5, 2023

@Celine Penaredondo Hello! This condition doesn't work for me either. Did you manage to solve the problem?

Lillian Shibata-Salley December 15, 2023

Hello - so there is no option to just say not equal to?  I have a lot of options and I just want to exclude 1 value. 

Am I missing anything?

Thanks!

1 vote
Jack Brickey
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 16, 2019

I have not tried this but suggesting you do so to see if it can work. I think it should but needs to be validated.

Create one workflow but place Conditions onto the necessary transitions as shown by the dotted lines below. The conditions will be based upon the value of the custom field value.

conditins.jpg

0 votes
Kumar
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.
April 16, 2019

Hi  @SHANTANU SARDESAI  if you have a script runner add-on  you can use JQL query Condition .

 if you want to display the transition based on field value you can do by applying the scripted condition in that choose Jql query condition

Example : Custom Field = xyz 

 if you aplly this JQL query condition on the transition it will show when the Issue custom field have that Givenn value or else it will Hide

Hope it Helps,

Thanks,

Kumar

0 votes
Elifcan Cakmak
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.
April 16, 2019

Hello,

You need an additional add-on if you want to achieve this without adding another workflow to your project. If you are using Jire Suite Utilities, you can use this condition to restrict transitions based on a custom field:

Value Field (JSU) : Allows to execute a transition if the given value of a field is equal to a constant value, or simply set. You need to create the second workflow you mentioned:

A -> B -> X -> C-> Y-> D

You need to allow transition from B to X if the field value is set to what you want and allow transition from B to C if it the value is not set. Also the same applies for C to Y and C to D. This should work.

Hope this helps.

Regards.

Suggest an answer

Log in or Sign up to answer