Question About Custom Fields Based on Previous Field Values

Ayush Pathak May 19, 2024

I am wondering if it's possible to make a custom field appear based on the value of a previous field(not issue type). For instance, if one field has the value "A," then a field called "A ID" will appear. Similarly, if the value is "B," a field called "B ID" will appear on the screen.

5 answers

4 accepted

1 vote
Answer accepted
Armitha Reddy Toorpu Ceema
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 20, 2024

Hi @Ayush Pathak 

 

It is possible through by using scriptRunner plugin.

 

Please do try by using that plugin.

 

Please do accept the answer if this helps for you.

 

Thanks,

Armitha.

0 votes
Answer accepted
Geethanjali Katagani
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 19, 2024

Hi @Ayush Pathak ,

It is possible by using behaviors in the ScriptRunner plugin.

 https://marketplace.atlassian.com/apps/6820/scriptrunner-for-jira?hosting=cloud&tab=overview 

Regards,
Geethanjali

0 votes
Answer accepted
Sudarsana G
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 19, 2024

If it is on DC and if you have a behaviors Plugin use the below script 

def otherFaveField = getFieldByName("Favourite Fruit (Other)")
def faveFruitField = getFieldById(getFieldChanged())
 
def selectedOption = faveFruitField.getValue() as String
def isOtherSelected = selectedOption == "Other"
 
otherFaveField.setHidden(!isOtherSelected)
otherFaveField.setRequired(isOtherSelected) 
For More Info
https://docs.adaptavist.com/sr4js/latest/features/behaviours/behaviours-examples/select-lists-with-otherFor 

0 votes
Answer accepted
Armitha Reddy Toorpu Ceema
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 19, 2024

Hi @Ayush Pathak ,

 

Could you please explain your doubt little bit clear?

 

Thanks,

Armitha.

Ayush Pathak May 19, 2024

Hey Armitha, I have a custom drop-down field on the screen with several options. The requirement is that when I select option A, another field should appear below this custom field. Similarly, if I select option B, a different field should appear based on that value.

0 votes
Jarosław Solecki _Deviniti_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
May 23, 2024

We resolved that with  Dynamic Forms for Jira.  Moreover, you don't have to write any scripts for that. The whole configuration is really simple and you can set it under the specific project or globally for all projects that are using a specific scheme. 

You also gain some additional abilities like
 Set Default Value (even description), Set Value based on condition, and required/read-only for fields

Suggest an answer

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

Atlassian Community Events