add new permission based on User and Group custom field value

yaniv_shoshani March 16, 2015

User Custom Field Value

In the permissions scheme, I am trying to add Assignable User permissions based on User Custom Field Value.
The "choose a custom field" drop-down only allows for User Picker fields.
What is the correct way to define the users for the user picker field that will be granted the permissions?
Should it be a Single User Picker or a Multiple User Picker (I tried both with no results)?
Should the users be set as default values (I tried this with no results)?

After trying multiple combinations of the above, the users are still not enabled in the Assignee list for as Issue.

 Group Custom Field Value

I see that for group custom fields, the "choose a custom field" drop-down allows for Select List custom fields.

But also here, I have not been successful at  getting the Assignee list values for the related Issue

 

I am obviously missing something basic. Some direction here would be appreciated.

Thanks.

1 answer

1 accepted

1 vote
Answer accepted
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 17, 2015

The system must use a user type field for this sort of thing, there's no other way to usefully identify a user object.

Try this:

  • Add a user-picker field
  • Set the permission scheme to say "Assignee = <user picker field>" (alongside other rules)
  • Find (or create) a user who is NOT normally an assignable user in that project (but make sure they can see the project)
  • Create an issue and set the user-picker field to the test user
  • Save the issue
  • Click the assignee field, or go into edit mode, you will find that the user is now on the list

Note that the permission is only dynamic on the server side, not the client.  When you say "assignee can be someone in a user-picker field", it can ONLY work off the server data - so you have to have saved the user in the user-picker before the system can add it to the list of assignees.  It can't work off the data you are currently entering.

For the "group custom field", you need to have groups named exactly the same as the entries in the select list, and again, it is only dynamic on the server side.

yaniv_shoshani March 17, 2015

So if I may repeat in different words: - The <user picker field> can get a value when creating or editing an Issue and choosing a user for the field. - The value relates to that Issue only. - When the Permission Scheme grants Assignable User permission to the user picker field, it essentially allows the Assignee choice list for that specific Issue to be dynamically changed by editing that same Issue. And that would be the purpose of this option. Is my understanding correct?

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 17, 2015

Yes, that's right.

Suggest an answer

Log in or Sign up to answer