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

How to show only few values in custom field based on user picker field value

kedar
Contributor
August 20, 2024

Hi ,

I do have one custom field multi selection called Roles with vales a,b,c,d,e

Another custom field user picker called requestor.

When I select requestor as "raju@gmail.com"

The roles field should show only a,b values and it should hide c,d,e values.

Can you give any solution and I have this requirement in Jira cloud

2 answers

0 votes
Shikha Verma
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.
August 20, 2024

Hey @kedar You can try this. Hope this will help!

def requestorField = getFieldByName("Requestor")
def rolesField = getFieldByName("Roles")

if (requestorField.getValue().toString().equals("raju@gmail.com")) {
rolesField.setFieldOptions(["a", "b"])
} else {
rolesField.setFieldOptions(["a", "b", "c", "d", "e"])
}


kedar
Contributor
August 20, 2024

This script was with behavior right ?

kedar
Contributor
August 20, 2024

I want this functionality in Jira cloud 

0 votes
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 20, 2024

Hello @kedar 

That requirement cannot be met with native Jira Cloud functionality.

Are you will to consider using a third party app?

kedar
Contributor
August 20, 2024

Yes I do have behaviors and script runner can you help with it.

kedar
Contributor
August 20, 2024

Hi Trudy 

Can you check and give me a solution that we can achieve

With script runner or behaviors plugin.

Thanks 

Kedar

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 20, 2024

Have you reviewed the vendor documentation for ScriptRunner Behaviours and watched the demo videos?

To what type of project do you want to apply this? Get the project type information from the View All Projects page under the Projects menu.

kedar
Contributor
August 20, 2024

I want to apply this with Jira software company managed project 

I tried but it was not working for me.

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 20, 2024

What did you try? Show us what you constructed and tell us what you observed after you activated it.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events