Forums

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

I want to hide a transition based on a Radio button custom field value

Sriharsha
Contributor
November 18, 2025

Hello everyone,

I have a radio-button custom field with the options A, B, C, and D.

I would like to hide a workflow transition when the field’s value is either B or D. Could anyone advise me on how to achieve this? Any help would be greatly appreciated.

We are using ScriptRunner on Jira Data Center v10.3.10.

Best regards

2 answers

2 votes
Trudy Claspill
Community Champion
November 18, 2025

Hello @Sriharsha 

There are a few workflow Conditions you can get from ScriptRunner that you could add to the workflow Transition.

The JQL Query Matches condition might be the easiest to understand.

Sriharsha
Contributor
November 18, 2025

Hi @Trudy Claspill , thank you for your response! 

I can still see that transition after adding the workflow condition suggested by you.

Trudy Claspill
Community Champion
November 18, 2025

Please show us the details of the Condition that you added.

Note that the link I provided is to an example. You would have to come up with the correct code for your JQL condition.

Sriharsha
Contributor
November 19, 2025

I used this - project = XYZ AND "New Hire Computer Type" != "B"

Trudy Claspill
Community Champion
November 19, 2025

Hello @Sriharsha 

With that JQL the transition will be available for

  1. issues in the XYZ project that use this workflow, and
  2. that are currently set to the starting status(es) for this transition, and
  3. where any radio button besides "B" is selected for "New Hire Computer Type"

What is the selected value for the radio button in the issue where you see the transition is available, in the XYZ project? And is the type for that issue associated to this workflow?

Are there any other transitions that go from that issues current status to the same destination status as the transition you are trying to hide? Can you show us the workflow diagram for this workflow and point out the transition you are trying to hide?

Sriharsha
Contributor
November 26, 2025

@Trudy Claspill - This condition is working fine - 

!(cfValues['New Hire Computer Type']?.value in ['Laptop', 'Desktop'])
Like Trudy Claspill likes this
0 votes
Stefan Stadler
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 Champions.
November 19, 2025

Hi @Sriharsha 

actually, Scriptrunner Condition on the transition is the way to go. You will have to check for the value of the field. The condition works that the transition will be shown, if the condition returns True. Therefore, you could use a "Simple Scripted Condition" or a "JQL query matches condition". Both are offered by ScriptRunner and both conditions can be tested in the setup screen. As already mentioned, JQL might be easiest, but if you are familiar with Groovy code, the "Simpled scripted condition" is more powerful.

Let me know, if there is any further assistance needed.

Regards,

Stefan

Sriharsha
Contributor
November 19, 2025

Hi @Stefan Stadler , I tried using a simple scripted condition, but had no success.

These are the simple scripted conditions I tested:

cfValues['New Hire Computer Type'] != 'B' OR 

cfValues['My Select List']?.value == 'My value'

These work correctly for single-select list fields, but they do not work for radio button custom fields.

Stefan Stadler
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 Champions.
November 19, 2025

Hi @Sriharsha 

I have just tried the second example in a workflow and used the review function to verify it is working as expected.

In my example, there is a radio button field "Test protocol" with values "Ja", "Nein", "Nicht erforderlich". The issue DWHT has the value "Nein" set. 

As you can see in the screenshot, the evaluation returns true:

cfValues['Test protocol']?.value == 'Nein'
20-11-_2025_08-57-46.png
This implementation means, that the transition is visible only if the value is set to "Nein". Otherwise it will be hidden.
Regards,
Stefan
Sriharsha
Contributor
November 20, 2025

Hi @Stefan Stadler , I tried before but no luck. Let me check and get back to you! Thank you!

Sriharsha
Contributor
November 20, 2025

@Stefan Stadler - Please find the attached screenshot. The second one is not getting executed. The ticket that I was testing has the value "Laptop" but it's not hiding the transition.New Hire Computer Type.png

Stefan Stadler
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 Champions.
November 20, 2025

Hi @Sriharsha 

can you try to disable the first rule? You selected „any condition“ which means there is no need to execute if one already passed…

hope this helps!

Sriharsha
Contributor
November 26, 2025

Hi @Stefan Stadler , this is working after using this condition - 

!(cfValues['New Hire Computer Type']?.value in ['Laptop', 'Desktop'])

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
TAGS
AUG Leaders

Atlassian Community Events