It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

In Select List(Single Choice) custom filed I need to add other Text Filed is that Possible??? Edited

Hi All,

I have Custom Filed type Select List(Single Choice) in that I have added options

A,B,C,D and Others.  so here when i choose the option "Other" need  to populate a Text field box to enter manually information.  

Select List(Single Choice) customfiesd ID-10012

Text Fied CustomField Id-10026

 

Can you please give any Suggestions.

Thanks,

Phani 

3 answers

1 accepted

0 votes
Answer accepted

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" //instead of Other 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

1 vote

Hello,

You would need a plugin for it.

For example you could use the Power Scripts plugin:

https://marketplace.atlassian.com/apps/43318/power-scripts-jira-script-automation?hosting=cloud&tab=overview

You could create a Live Fields SIL script like this:

if(argv["customfield_10100"] == "Others" && argv["customfield_11100"] == "") {

  lfShowFieldMessage("customfield_11100", "the Text Field is required", "WARNING");

  lfDisable("editSubmit");

} else {

  lfHideFieldMessage("customfield_11100");   

lfEnable("editSubmit");

}

 

In this script:

customfield_10100 is the id of the Single Select field

customfield_11100 is the id of the Text field box.

You could find more info about Live Fields here:

https://confluence.cprime.io/display/JJUPIN/Live+Fields

Hi @Alexey Matveev -cPrime-  thanks for your suggestion i will install that plugin and i will try and is there any possible to do with Script runner plugin ???? 

or any other way to do without the add-on.

 

Thanks,

Phani

You can do it with ScriptRunner, but I do not have a script.

Hi Team,

 

Can anybody tell me how to resolve this ???

 

Thanks,

Phani

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Jira Service Desk

[ Survey ] What does the future of ITSM look like? Take our survey today!

Hi all! We’re interested in learning more about your ITSM practices - what’s the current state of your ITSM practices? What are your aspirations for your IT team in the future? Which ITSM trends ar...

213 views 0 5
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you