Single Select List with one option of Text Field?

Tayyab Bashir
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.
November 18, 2016

Hi, 

A little background on what I am trying to achieve. 

We have about 4-5 Project Categories. And mostly all project fit into these categories, and occasionally there would be a need to create a new category to fit in a new project. 

When a "Create New Project" ticket comes in, the single select list offers them to choose from the already existing categories. 
But lately more projects are coming in that need new categories.

For that purpose I want an option of "Other/Suggest new category" in the Single Select List.
And upon selecting that option, there should appear a text box next to it, which would take in the value for newly suggested category.

What we tried and why it didn't work.
We removed our single select list and placed a simple text field in its place (hoping people would just type in already existing category names) and occasionally type in a new category.

But people just seem typed in their own new category every time. 

Hence, I would like the option of adding a text field into a single select field.

Many thanks in advance.
Tayyab 

 

3 answers

1 accepted

1 vote
Answer accepted
Daniel Bajrak
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.
November 18, 2016

Hi,

There is plugin called Dynamic Forms which contains several dynamic customfields (select, multiselect, cascading select, checkboxes and radiobuttons) which can show/hide other customfields. You can just migrate your select to dynamic select and add related field for option "other/suggest", or you can add new custom field dynamic select.

Here you can find documentation: https://intenso.atlassian.net/wiki/display/DF/Dynamic+Custom+Fields

 

I hope I've helped you.

Best Regards

Tayyab Bashir
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.
November 22, 2016

I did it with the help of Dynamic Forms. 
Much easier to configure.

Many thanks.  

0 votes
Ruth Ariel January 8, 2020

Hi @Tayyab Bashir

I'm also trying to solve a similar problem.

Can you please tell me how did you do that  it will change during the creation of the issue - "We removed our single select list and placed a simple text field in its place ..." ?

 

I tried to do that by writing a JS code in the descriptuon of the field but it's not work.

 <script type="text/javascript">
source = document.getElementById('customfield_10068');
if (source) {
target1 = document.getElementById('customfield_10069');
target2 = document.getElementById('customfield_10070');
target3 = document.getElementById('customfield_10071');
source.onchange = function() {
if (this.value == 10685)
{
target3.style.display='none';
target1.style.display='block';
target2.style.display='block';
}

else
{
target3.style.display='block';
target1.style.display='none';
target2.style.display='none'; }

}
}
</script>

 I also sow that it can be solved through Announcement banner but this is not exist in the new JIRA Experience (https://jira.atlassian.com/browse/JRACLOUD-67554).

can you help me please and tell me how did you do that?

Thank you very much,

Ruth

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 8, 2020

I think he used Dynamic forms.  Not sure that is available to Cloud. Injected javascript will not work on Cloud at all (and I suspect the issue you reference will never be implemented - I wouldn't want to support a system that the customer can break and then demand I fix)

Ruth Ariel January 8, 2020

Thanks Nic Brough.

The Dynamic forms is not available to Cloud :(

What do you maen in that the customer can break the system?

Don't you know any solution for showing specific fields dependent on another fields (not by Select List (cascading), I need free text) ?

Ruth Ariel January 8, 2020

Or the Script Runner add-on is the solution you recommend?

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 9, 2020

If you get your injected javascript wrong, you can render your system unusable, needing support to undo the damage.  Rather than set it up to ask for unnecessary work and downtime, it's better to simply disable the ability for someone to do that damage. 

There is no way that I can find of doing dependent select/text fields in Cloud.

Like Heather R likes this
0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 18, 2016

Two options spring to mind

  1. Write a new field type add-on that can handle the select/text combination
  2. Add a new standard text field, install the Script Runner add-on and use a Behaviour to hide the field until the user selects "new category" in the select list

(Of course, there are other ways to do option 2 with your own coding, but the Behaviour is far easier)

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events