Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
badges earned

Your Points Tracker
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Scriptrunner behaviour for limiting assignee list

Hello everyone

This has been asked quite a lot already but I was unable to find an appropriate solution for our use case.

I really only need a behaviour which will run on all projects on all issuetypes and on every screen.

This behaviour should remove some options from the assignee field.

We cannot do this with the assignable user permission as these users should be able to be assignees but just not at every point and we would like to prevent our users from manually selecting them.

I also found the option of using a workflow validator but then again, after creation of the issue, the user could just edit the issue and then re-assign it which is why a behaviour would work best.

Can anyone help us out here on where to begin with this?


1 answer

0 votes

I don't think scriptrunner behavior setFieldOptions() method can run on the assignee (or any user fields) to limit the available list.

At best, you can react to change in the assignee field and validate the value with the behavior and use the setError() method to stop users from saving while an invalid user is selected.

def okList = ['user1','user2']
def fld = getFieldById(getFieldChanged())
if(fld.value in okList){
} else {
fld.setError("Not a valid assignee. Pick from $okList")

Suggest an answer

Log in or Sign up to answer
Community showcase

The benefits of using Jira in different departments

Jira is a great tool to use across different departments. Forget that paperwork – switch to Jira and get that tasks done smoothly. Marketing Jira allows for a complete digital transformation of you...

84 views 0 5
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you