Forums

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

I want to set another field as a required item based on the value of a field

koutarou ishibashi
Contributor
September 19, 2023

Due to my limited proficiency in English, I might be mistaken, but I'd like to change the transition settings for an issue based on the content of a certain field, making another field mandatory for input. For instance, if the 'process' field has a value of 'SWE2-2,' I would like to ensure that you cannot transition without a value in the 'SubSystem' field.

2 answers

1 accepted

1 vote
Answer accepted
Raja Shekher
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.
September 19, 2023

Hi @koutarou ishibashi 

You need to use Script Runner Behaviour.

 

For example: Make Comment Mandatory based on Component Change.

 

import com.atlassian.jira.bc.project.component.ProjectComponent


def currentComponent = underlyingIssue?.components?.toString()
def components = getFieldById(getFieldChanged())
def commentField = getFieldById("comment")


if ((components.value as String).toString() != currentComponent.toString()) {
commentField.setRequired(true)
}
else {
commentField.setRequired(false)
}
koutarou ishibashi
Contributor
September 22, 2023

Thank you for your answer, I'll try this

0 votes
Vishal
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.
September 19, 2023

Hi @koutarou ishibashi 

This is not possible out of the box in jira, but plugins like scriptrunner or other on atlassian marketplace would be able to do what you are looking for.

Thanks 

koutarou ishibashi
Contributor
September 22, 2023

Thank you for your response
Roger

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Product Admin
TAGS
atlassian, atlassian government cloud, fedramp, webinar, register for webinar, atlassian cloud webinar, fedramp moderate offering, work faster with cloud

Unlocking the future with Atlassian Government Cloud ☁️

Atlassian Government Cloud has achieved FedRAMP Authorization at the Moderate level! Join our webinar to learn how you can accelerate mission success and move work forward faster in cloud, all while ensuring your critical data is secure.

Register Now
AUG Leaders

Atlassian Community Events