Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 19:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Create 2 field dropdown , for target a group for selection

Salim Hammar
Contributor
January 24, 2022

Hello everyone

I'm need help beacuase i would like have a 2 field : the first field it's a cascading field (single select) in this field have a 2 values "text" for example "team 1" and "team2".  I would like when i select a "team 1"  in the seconde field he display a list for groups who exist in crowd , for when i create a issue i can select who can look this issue.

So when i select "team 1" in the second field he display me a groups (crowd) and same for "team 2"

 

I need the script example , beacause i'm new administrator in Jira and i learn a js (groovy)

 Thanks in advance !

5 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

2 votes
Answer accepted
Tom Lister
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 24, 2022

Hi @Salim Hammar 

A cadcading select would be the simplest solution to define the data. I’m  assuming you would like the result to be stored in a group picker field. 

A triggered script to copy the value on issue update in an option.

is this for server or cloud?

Salim Hammar
Contributor
January 24, 2022

Hi , Thanks for your answer

it's in the server

 

 

Paul A Wright
Contributor
January 24, 2022

I agree, a cascading select custom field would be the best approach.

I would avoid using bolt ons (like Bundled Fields) as reporting can be difficult to master if you're new.

With this custom field you can search but need to know the cascadeOption values.

The easiest way I've found to do this (and it's a little 'lazy') is to write a query using the basic view and then switch to advanced.

You'll then see the JQL written for you.  Example:  Categorisation in cascadeOption(12184, 12158)

Hopefully this additional information may be of use to you.

Good luck!

Tom Lister
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 24, 2022

Hi @Salim Hammar 

As suggested by others, you could not perform any complex field manipulation without a scripting plugin to support it whilst you are on server versions of Jira.

The real question is what you are actually try to solve / display for your users? There may be many other options.

Could you explain further?

Tom

Like Alexey likes this
Salim Hammar
Contributor
January 24, 2022

Yes i would like do a casacding field depending on the options of field 1, show values ​​in the field 2 but the values are the groups jira 

2 votes
Borys Chernetskyi January 24, 2022

Hi!

Using js is a bad idea, recommend plugin Scriptrunner 

https://docs.adaptavist.com/sr4js/latest/features/behaviours/behaviours-examples

1 vote
Alexey
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.
January 24, 2022

There are numerous ways how to handle your needs, not just by custom fields.

If its just a visibility issue, not security, i.e. you just want to make a comfortable working environment for your teams and do not mind if members of another team can possibly see tickets of different teams, then you can:

  • simply create different Kanban boards for each team with custom JQL, since you know all assignees of each team.
  • Or we use components for this, we have a Banking team that is an owner of the Banking component so all boards, dashboards, filters, widgets are bound to this field and teammates can easily drill down to their team's tasks. There is a way to select the default assignee (team leader) for each component.

For cases where security is an issue (let's say outsource contractors), you can use custom user groups and/or different Jira projects.

You can use also automation which is bound to specific fields or content: if a newly created task has 'ABC' in summary, then assign it to person X.

You can be really creative and there are no right and wrong approaches, but my suggestion is to keep custom fields as few as possible to keep the performance of the database high, look around and see which things you can re-use for new processes and logic. 

Salim Hammar
Contributor
January 24, 2022

Hi , thanks for your answer

But i would like a create 2 field dropdown when i select a values (text) in the field n°1 in the field n°2 he should show me a groups (jira) and when i select other value in the field n°1 in the field n°2 he update for show me groups (jira) .

So the field n°1 he must are single select and the field n°2 he must are multi select

0 votes
Nic Brough -Adaptavist-
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.
January 24, 2022

This is the same question you asked before, over at https://community.atlassian.com/t5/Jira-Service-Management/Create-2-fields-dropdown-who-get-a-groups-crowd/td-p/1914816 - could you please follow up the answers you got there as well?

0 votes
Jennifer Iglesias Morales January 24, 2022

Hi,

As the colleagues indicate, there are multiple options to do what he explains, but given his explanation and without knowing the details, I would opt for the cascading field that a colleague already mentions, depending on the options of field 1, show values ​​in the field 2

Best regards! 

Salim Hammar
Contributor
January 24, 2022

Exactly 

Salim Hammar
Contributor
January 24, 2022

Hi @Jennifer Iglesias Morales 

You have a idea for script or no ? because i don't find the script worked for i do ?

Jennifer Iglesias Morales January 24, 2022

Hi @Salim Hammar 

 

Go to Jira admin -> Issues -> Custom fields -> Create custom field -> Select list (cascading) and give your field a name and apply it on the desired screens.

 Cascading.jpg

We look for our created field -> options on the left -> Contexts and default value

Cascading 1.jpg

We look for our created field -> options on the left -> Contexts and default value

 Cascading 2.jpg

Within each option for example Team 1 -> Configure

Cascading 3.jpg

Now create the options that will be seen when marking Team 1

Cascading 4.jpg

 You already have your cascade field to test it. Any doubt, let me know :)

 

Best Regards!

Salim Hammar
Contributor
January 24, 2022

Yes and for a second field ?

Jennifer Iglesias Morales January 24, 2022

With the cascade field you have two fields, what you asked for based on field 1 that field 2 appears with the options. A third cascading field cannot be added natively.

Like Paul A Wright likes this

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

TAGS
AUG Leaders

Atlassian Community Events