Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,555,610
Community Members
 
Community Events
184
Community Groups

In Select List(Single Choice) customfield selecting an Option text field should pop-up.

Edited
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.
Oct 17, 2018

Hi Team,

I have field called "Source" select list (single choice) type custom field

in that i have added options A,B,C,D&Other.

Now when i select the option D and Other . A text field has to view on create and edit screen when i select the A,B,C that text field suppose to hide

Select List(Single Choice) custom-field ID-10012

Text Field Custom-field Id-10026

could you explain me  guys step by step  how can I achieve this .

 

Thanks,

Phani

1 comment

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.
Oct 18, 2018 • edited

Hi All ,

 

I have Resolved this issue my self by using script runner plugin  Behavior  

here is the thing what to do admin settings----->Add-ons--->Behaviors---->Add a Behavior give an name----->Click On Fields--> in that select workflow of project in "Guide workflow" option------>In a fields tab "Add Field"  Select List custom field------>after that click on "Add server-side script".   here is the script that you have to use 

def otherFaveField = getFieldByName("Name Of TextField") //Give a text field custom field name that you have created 
def faveFruitField = getFieldById(getFieldChanged())

def selectedOption = faveFruitField.getValue() as String
def isOtherSelected = (selectedOption == "Other" || selectedOption == "D") //instead of Other/D You can give another option that you want

otherFaveField.setHidden(! isOtherSelected)
otherFaveField.setRequired(isOtherSelected)

 

and then Save it ---->go back to Behaviors--->you will see "Add Mapping" on the side of "Fields" ------>click it and map to "Choose projects(required)" and "Choose issue type" click on Add Mapping

thats it its all got to go

 

when creating/Editing an ticket in the project while creating when you choosing the Select List custom field selecting the "Other"  option it will automatically display the Text Field that you have created and if select another option it wont display the text field

 

Thanks,

Phani

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.
Oct 22, 2018

Hi All,

Here is another script this one when you edit the ticket and change the option the text field gonna be empty and disappear

example: the above script when you select the option "D" or "Other" a text field should be appear will enter the text and we created ticket 

after creating ticket if you want to edit the selected list filed with another options like "A or B or C" the above  script still shows the text field that you have entered while you selected option "D" or "Other".

So now with this new script when you edit the selected list filed with options like "A or B or C" the text field also disappears 

 

//customfield_12003 - Data Change Exception
//customfield_12004 - Other Description
if(getFieldById("customfield_12003").getValue().equals("D")
|| getFieldById("customfield_12003").getValue().equals("Other")){
getFieldById("customfield_12004").setHidden(false)
getFieldById("customfield_12004").setRequired(true)
}else{
getFieldById("customfield_12004").setFormValue(null)
getFieldById("customfield_12004").setRequired(false)
getFieldById("customfield_12004").setHidden(true)

} 


 I hope it helps sombody

 

Thanks,

Phani

Like Michiel Schuijer likes this

Thanks. This helped me more than the script example from ScriptRunner!

Comment

Log in or Sign up to comment