Cascading Select custom field

Hello
I need to add specific custom field with multiply select list, the closest custom field I found is "Cascading Select".

E.g.:
Cascading Select type field with name "Languages":

Parent select liest-> Values
-----------------------------------
EN -> value1, value2, value3, etc.
DE -> value1, value2, value3, etc.
FR -> value1, value2, value3, etc.
< OTHER> -> value1, value2, value3, etc.

The problem is that user who works on issue can not write his own custom value in parent select list <OTHER>
How can I realize this function? Is there any other suitable custom field for this?

Best regards,
Fyodor

2 answers

1 accepted

2 votes
Mizan Community Champion May 08, 2013

User cant enter his own value in a cascade select or select list .. You can provide anthor customfield type i.e labels type . here user can add a new value if it is not present there

Refer this doc about labels customfield

https://confluence.atlassian.com/display/JIRA/Adding+a+Custom+Field

can we add values to select list by plug-in code?

I mean is there a way to create select list and populate it programatically.

Mizan Community Champion Apr 14, 2014

What are you trying to do ? you should create a new question describing your issue in detail.

I did that but people marked by question duplicate and close it :)
anyways, I want to create a select list that can be editted dynamically. For example I want to add values to the select list when a issue is marked as resolved.

here is my problem statement -

"user will request to add new customer to the system. he will enter a jira issue. when admin resolved that issue, a listener plug-in will be invoked and it should populate select list (that will have customer names) with new value."

Mizan Community Champion Apr 14, 2014

ok .. then i guess you are in the right direction .. all you need to do is add options to the customfield based on the new customer . I dnt think there is any direct method to that . You can use sql procesor to directly add the option to the select list customfield . refer https://docs.servicerocket.com/pages/viewpage.action?pageId=35389466

Mizan, thank you so much for your answer.

Fortunately I am able to update that field but those doesn't reflect on UI. I have to do following to make it help -

1. make some changes like change name of custom field that will ask for reindexing jira

2. then I have add one more option to that custom field and then my add values is reflected.

Do we have anyway so that programatically we can reindex the jira and that value reflects?

here is my code for reference -

org.ofbiz.core.entity.jdbc.SQLProcessor sqlProcessor = null;
            ResultSet rs = null;
            try{
                sqlProcessor = new org.ofbiz.core.entity.jdbc.SQLProcessor("defaultDS");
                sqlProcessor.prepareStatement("insert into customfieldoption (Id,CUSTOMFIELD, CUSTOMFIELDCONFIG, PARENTOPTIONID, sequence, customvalue, optiontype, disabled )  select (select max(id) from customfieldoption)+1 Id ,CUSTOMFIELD,max(CUSTOMFIELDCONFIG)  CUSTOMFIELDCONFIG,max(PARENTOPTIONID) PARENTOPTIONID,max(sequence)+1 sequence, 'adnan11' customvalue,max(optiontype) optiontype,max(disabled) disabled from customfieldoption where CUSTOMFIELD=10011  group by CUSTOMFIELD ");
                int result = sqlProcessor.executeUpdate();
                sqlProcessor.close();
            } catch (Exception ex) {
                try {if (rs!= null) rs.close();} catch (SQLException e) {}
                try {if (sqlProcessor != null) sqlProcessor.close();} catch (GenericDataSourceException e) {}
            }



Mizan Community Champion Apr 17, 2014

Try using commit

still changes didn't reflected on UI. I have to and refresh the custom field by clicking options like "sort alphabetically"

Anything else that I can try?

Also there is problem when I add value from jira UI. jira doesnt update the sequence and takes the older value. Even if I update SEQUENCE_VALUE_ITEM table.

You can also have Text Field for users to fill the other option.

Show this text field only when others is choosen in the Cascade select, this you can control with java script.

@Chaithra N... how do you do that? can you point us to where this is documented?

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

3,323 views 14 20
Join discussion

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot