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

Cascading Select custom field

Fyodor May 08, 2013

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

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,

2 answers

1 accepted

2 votes
Answer accepted
Mizan Ali Sayed 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

Mohammad Adnan Apr 13, 2014

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 Ali Sayed Apr 14, 2014

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

Mohammad Adnan Apr 14, 2014

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 Ali Sayed 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

Mohammad Adnan Apr 15, 2014

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;
                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();
            } catch (Exception ex) {
                try {if (rs!= null) rs.close();} catch (SQLException e) {}
                try {if (sqlProcessor != null) sqlProcessor.close();} catch (GenericDataSourceException e) {}

Mizan Ali Sayed Apr 17, 2014

Try using commit

Mohammad Adnan Apr 20, 2014

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.

0 votes
Chaithra N May 08, 2013

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.

Jason Horn Jan 27, 2014

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

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published in Next-gen

Introducing subtasks for breaking down work in next-gen projects

Teams break work down in order to help simplify complex tasks. This is often done iteratively, with tasks being broken down into smaller tasks and so on until the work is accurately captured in well-...

8,170 views 25 36
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