The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

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

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

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 Champions.
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 ???

TAGS
AUG Leaders

Atlassian Community Events