Filter User Picker Multi Select Value Based on Current User Role or group

GG March 18, 2023

Hi,

 

Is there a way to filter the Multi Select User Picker field  based on the Current user's group or role in a screen?

 

Regards

GG

1 answer

0 votes
Oday Rafeh
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.
March 18, 2023

Hi @GG 

Currently, Jira does not support filtering the Multi Select User Picker field based on the current user's group or role natively.

You can try to achieve this functionality using third-party Jira apps available in the Atlassian Marketplace.

One such app that can help you with this requirement is the "Jira Suite Utilities (JSU)" app.

Regards

Oday

GG March 18, 2023

Could you please help me how can I do it in JSU plugin?

Oday Rafeh
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.
March 18, 2023

Hi @GG , Sure 

Follow these steps to set up a filtered user picker using Jira Suite Utilities:

  • Install the Jira Suite Utilities app from the Atlassian Marketplace.
  • Navigate to your project settings and go to the screens configuration section.
  • Edit the screen where you want to add the filtered user picker.
  • Add a new custom field of type "JSU User Picker" to the screen. You can find this field type under the "Jira Suite Utilities" section when creating a new custom field.
  • Configure the custom field by setting the appropriate filtering criteria based on the user's group or role.
  • Save the configuration, and now the new user picker field will only show users based on the configured criteria.

I hope this will help you 

GG March 19, 2023

Hi

Thanks for your response. I want this field to be dynamically filtered based on the current user role or group. For example, Manager 1 can only see the assignees of his group and not other assignees for assign request. At the same time, when Manager 2 log in Jira, can only see the assignees  of her group.

Is it possible?

Oday Rafeh
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.
March 20, 2023

Hi @GG , 

Yes, it is possible to create a dynamically filtered user picker based on the current user's role or group using Jira Suite Utilities. Please follow the steps again :

Install the Jira Suite Utilities app from the Atlassian Marketplace if you haven't already.


Navigate to your project settings and go to the screens configuration section.


Edit the screen where you want to add the filtered user picker.


Add a new custom field of type "JSU User Picker" to the screen. You can find this field type under the "Jira Suite Utilities" section when creating a new custom field.


Configure the custom field by setting the appropriate filtering criteria based on the user's group or role. To make the field dynamic, you can use the "Current User's Groups" or "Current User's Roles" options in the filtering criteria. This will filter the user picker based on the current user's group or role.


Save the configuration, and now the new user picker field will only show users based on the configured criteria.


Now What should happen, is when Manager 1 logs in to Jira, they will only see assignees in their group, and when Manager 2 logs in, they will only see assignees in their group. This way, the user picker field will be dynamically filtered based on the current user's role or group.

Hope this will help 

Like GG likes this
GG March 22, 2023

I added JSU multi-user field then edit Groovy Formula option and then I selected the Issue Option and selected created field. But, I don't know how to use  "Current User's Groups" or "Current User's Roles" options in the filtering criteria. I would be very grateful if you could help me.

Oday Rafeh
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.
March 22, 2023

To configure the "Current User's Groups" or "Current User's Roles" options in the filtering criteria for the JSU User Picker field:

Go to the Jira project where you want to add the dynamically filtered user picker field.


Click on "Project Settings" from the bottom of the left sidebar, then click on "Screens" from the left sidebar.


Find and click on the screen that you want to add the JSU User Picker field to, then click on "Configure Fields" button in the top-right corner.


Click on "Add Field" button to create a new field, select "JSU User Picker" from the list of field types and then click on "Next".


Give the field a name and then click on "Create".


In the "Custom Field Configuration" screen, click on the "Filtering" tab.


Under the "User Picker Configuration" section, select "JQL Filter" as the filtering type.


Enter the JQL query for filtering the users based on the current user's group or role. For example, to filter the users based on the current user's group, you can use the following query:



issuetype = User AND assignee in membersOf("jira-software-users")


In this example, "jira-software-users" is the group name. You can replace it with your own group name.

Save the field configuration.

GG March 22, 2023

Thanks a lot. I can't find it. Is it possible to send a screenshot of the field and steps?

Like Oday Rafeh likes this

Suggest an answer

Log in or Sign up to answer