Nesting fields

I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 14, 2024

Below is our requirement 

1. In the screen have a drop down custom field called Customer Name

2. Have one new list box filed next to it called "Add a new Customer Yes/No with Default value as No

3. If the user selects Yes to the above, popup a new screen to add a new customer name to the above drop down...

4. After new Customer name is added refresh the Customer name dropdown bring up that added new value to the field...



Please let us know the possibility 

1 answer

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.
March 15, 2024

Welcome to the Atlassian Community!

There is no way to do this in Jira.  It deliberately keeps field entry very simple and does not do dependent fields (other than the cascading select).

You can do most of what you want here with an app though.  I work for Adaptavist, so the only one I can talk about is Scriptrunner.  This has a "behaviours" module which lets you modify the way fields work on screen.  The three most popular usages of behaviours are modifying the available options in a select-list, showing or hiding fields, and making fields optional or mandatory, based on the selections made in other fields.

Popups are generally a bad thing to inflict on people, and neither Jira nor SR do them, but with Behaviours, you can get close to what you want.  

There are a few ways I would think about doing this.  You need to add the fields Customer Name (as a select list) and "New Customer Name" (as text) as a minimum.  Then you could do one of:

educate your users that if they choose "none" in customer-name, they will have to fill in "new customer name"

add a "new customer" as an option in customer-name (probably at the top so it appears first in the list) and educate the users that this option means they have to fill in the "new customer name".  This option lets you make the customer-name field mandatory

add a third field as a check-box as you describe in step 2 and work off that

The most simple implementation of a Behaviour for this would be to have one that hides "new customer name" when any existing customer is selected in customer name, and shows it when "none" or "new customer" are selected.  Or if you go for the third field, base the show/hide on what is selected there.  

If you go for the third field option, recommend a more complicated Behaviour to make the UI smoother for people.  When unticked, show the customer-name field and not new-customer.  When ticked, do the opposite (and change the selection in customer-name to "none" automatically).  I really wouldn't want to implement this check-box, it's clumsy, harder to code for, and adds a field you don't have any use for into your system.

Those Behaviours address your requirement on the front-end, but it leaves you with a problem in that your user has created a new customer entry that is not on the customer-name list.

You have plenty of options there too, but there are broadly only two options.  I'd write a script that notifies an admin that someone has created a new customer.  And then, if you trust your users not to enter bad customer data, a script that adds the new customer to the field options, and sets it on the newly created issue (still notify the admins that someone has added a new customer though - you don't want lots of duplicate options with slepping mistakes in them!)

Suggest an answer

Log in or Sign up to answer