Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to only show users of specific groups in scripted user picker based on custom field?

Deleted user November 13, 2019

Hello, we need to restrict a user picker field to only show specific users based on a custom group field. Should be like this:

Every issue contains a group field GROUP which gets automatically set on its creation. Only people of these specific groups can access and transition an issue over all workflow steps. Every issue contains one group but there are ~50 different groups overall an issue can contain.

In one transition people need to chose a single user from the (scripted) user picker PROCESS OWNER based on the GROUP field above. So the (scripted) field should only show users that are part of the specific group, which is set in the issue.

Thanks in advance.

1 answer

1 accepted

0 votes
Answer accepted
PD Sheehan
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 14, 2019

Normally, I'd recommend Behaviours and setFieldOptions() for something like this.

But that will only work on select fields. It doesn't work on User Picker fields.

There is no way that I'm aware of to tap into the built-in user picker fields.

So, one way to achieve this would be to have a plain text field and use a custom Select List Conversions with a custom REST api to return the list of users.

Another, simpler, approach would be to simply add a validator and check the user selection after the fact. Let the users pick from the full list, but if they pick someone not from the group, show a warning that "this user is invalid, please pick a user that belongs in the "xxx" group."
If the number of users is not too big, you could include a list of valid users in the validation error message.

Deleted user December 2, 2019

Ok thanks for reply. That "hint" option will fit this request for the beginning.

Nishant Paraskar December 16, 2020

If the same we want to achieve in case of jira cloud. Then how it will possisble ???

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, atlassian community, loom ai, atlassian loom ai, loom, atlassian ai, record recaps of meetings, meeting recaps, loom recaps, share meeting recaps,

Loom’s guide to great meetings 📹

Join us to learn how your team can stay fully engaged in meetings without worrying about writing everything down. Dive into Loom's newest feature, Loom AI for meetings, which automatically takes notes and tracks action items.

Register today!
AUG Leaders

Atlassian Community Events