Forums

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

Make Field required during workflow transition based on another field value

Gnana Bhaskar Pradheep July 31, 2025

Hi All,

I need assistance on the below scenario:

  • We have a custom field TEAM which is a mandatory field while creating an issue.
  • We have another field Category which is added to a workflow transition screen.

Ask is- 

  1. When I provide TEAM=Delivery, I want to make CATEGORY field required during transition from one to another.
  2. If I select TEAM=other field values, I want to make CATEGORY field hidden and optional in the transition screen.

We already have behaviours configured earlier for the TEAMS field and CATEGORY fields(set.Hidden & set.Required). But the requirement is changed and we need to add the CATEGORY field to transition screen.  Earlier CATEGORY field was added to Create, Edit & view issue screens. Now I have to remove and add CATEGORY field to transition screen. How to achieve it ? Kindly assist

 

2 answers

1 vote
Archana Achar
Contributor
July 31, 2025

Hello @Gnana Bhaskar Pradheep 

Thanks for reaching out to the community!!

If I understand your question correctly, the behavior of the Category field is dependent on the value of the TEAM field. I assume the ScriptRunner behavior is already in place for the field and is working well on the Create Issue screen.

Since you will be moving the Category field to the workflow transition screen, the existing behavior will require a slight modification as follows:"

final String screenName = 'Tranistion Screen Name'

def TEAM = getFieldById('TEAM_ID') // By ID or Name anything can be used

if(fieldScreen.name == screenName){

if(getFieldById('TEAM').getValue() == "Delivery"){

Make category field required/show

}

else {

Make category field hide/optional

}

}

NOTE: Since the behaviour of the Category field is dependent on the TEAM field, both the Category and TEAM field should be present in workflow transition screen. You can make the TEAM field readonly by enabling the toggle as shown below: 

image.png

 

Regards,
Archana

0 votes
Tinker Fadoua
Community Champion
July 31, 2025

@Gnana Bhaskar Pradheep 

From your description you have ScriptRunner in your Jira instance

How about adding a script validator to the transition you are referring to?

Best,

Fadoua

 

Suggest an answer

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

Atlassian Community Events