How can I limit the Assignee field based on the other users of the custom field group picker

Alvin
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.
October 11, 2018

Hi All, is it possible to populate assignee field to only assign the issue based on the group that is on the request using scriptrunner? example is Group ABC is the chosen group and it has 1,2,3,4,5 as users. only 1,2,3,4,5 users can be assigned . if you have sample code to start with, that would be great. thanks

2 answers

0 votes
Susan Hauth _Jira Queen_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 12, 2018

Hi Alvin,

You don't have to use scriptrunner, you can simply set the step property in the workflow to be

jira.permission.assignable.group   and then the name of the group

For more info see:

https://www.j-tricks.com/tutorials/permissions-based-on-workflow-status

Hope that helps

Susan

Alvin
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.
October 14, 2018

Hi @Susan Hauth _Jira Queen_, thank you for your help. the group should change dynamically, I think I need a listener for this one? or a behavior

Susan Hauth _Jira Queen_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 15, 2018

Hi ALvin,

That's a different question.  So scriptrunner could perhaps help with that.

Cheers

Susan

Bart Wathion
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 14, 2021

Hi @Alvin 

Did you get this working? We have like the same requirement, not on the assignee field but another custom user field that should be limited to a group that is selected just before.

0 votes
Prakhar Srivastav {Appfire}
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.
October 11, 2018

@Alvin

If you are creating and using a scriptrunner calculated custom field for Assignee, then it is possible to write such a script.

Scripts can not change behaviour of System Assignee field. 

However in Project Management for the project , you can set Assignable user permission. 

Whatever users have this permission only they can be selected as Assignee.

 

Regards

Prakhar

Alvin
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.
October 12, 2018

Hi @Prakhar Srivastav {Appfire} , can you explain further calculated custom field for assignee? and do you have sample code to start with? Thank you

Prakhar Srivastav {Appfire}
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.
October 12, 2018

@Alvin

You can start from here :

Create a scripted field.

Select type as Single User Select.

Then experiment with scripts like below :

https://scriptrunner.adaptavist.com/5.0.4/jira/scripted-fields.html#_user_fields

 

 

Regards

Prakhar

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events