#895  Prioritise staff in Assignee list
Closed
Quin opened 2 years ago

When I create a new issue, all the users are within the Assignee list.

I don't like having my clients within that list, especially when I'm creating an issue outside of their project.

Is there a way to either show only staff members, or at least prioritise/group them?

Robin Shen commented 2 years ago

You may use groovy script to return list of users applicable for issue assignment, for instance, member of certain group. etc. To do it:

  1. Switch to Administration / Groovy Script and add a script to returned desired users. For instance below script returns list of users from dev group:
import io.onedev.server.OneDev
import io.onedev.server.entitymanager.GroupManager

def assignees = []
for (member in OneDev.getInstance(GroupManager.class).find("dev").members) {
	  assignees.add(member.name)
}
return assignees
  1. Switch to Administration / Issue Setting / Custom Field and configure the Assignee field to specify Available Choices as Evaluate script to get choices and choose script created in step 1.
Robin Shen changed state to 'Closed' 2 years ago
Previous Value Current Value
Open
Closed
issue 1 of 1
Type
New Feature
Priority
Normal
Assignee
Issue Votes (0)
Watchers (3)
Reference
onedev/server#895
Please wait...
Page is in error, reload to recover