@PublicApi
public interface AssigneeService
ApplicationUser
objects.
Assignees may be filtered on a search string or on recent issue or user history.
Modifier and Type | Method and Description |
---|---|
Collection<ApplicationUser> |
findAssignableUsers(String query,
Issue issue,
com.opensymphony.workflow.loader.ActionDescriptor actionDescriptor)
Get assignable Users based on a query string and issue.
|
Collection<ApplicationUser> |
findAssignableUsers(String query,
Project project)
Get assignable Users based on a query string and project.
|
List<ApplicationUser> |
getAssignableUsers(Collection<Issue> issues,
com.opensymphony.workflow.loader.ActionDescriptor actionDescriptor)
Get all
ApplicationUser s that may have all of the given Issue s assigned to them, for a
given workflow state. |
List<ApplicationUser> |
getAssignableUsers(Issue issue,
com.opensymphony.workflow.loader.ActionDescriptor actionDescriptor)
Get all
ApplicationUser s that may have an Issue assigned to them, for a given workflow state. |
Set<String> |
getRecentAssigneeKeysForIssue(Issue issue)
Returns the keys of Users that the given Issue has recently been assigned to.
|
Set<String> |
getRecentAssigneeKeysForUser(ApplicationUser remoteUser)
Returns the keys of
ApplicationUser s that have recently been assigned to issues by the specified com.atlassian.jira.user.ApplicationUser. |
Set<String> |
getRecentAssigneeNamesForIssue(Issue issue)
Returns the names of Users that the given Issue has recently been assigned to.
|
Set<String> |
getRecentAssigneeNamesForUser(ApplicationUser user)
Returns the names of
ApplicationUser s that have recently been assigned to issues by the specified com.atlassian.jira.user.ApplicationUser. |
List<ApplicationUser> |
getSuggestedAssignees(Issue issue,
ApplicationUser loggedInUser,
com.opensymphony.workflow.loader.ActionDescriptor actionDescriptor)
Returns a list of suggested Assignee
ApplicationUser s for a given Issue and logged-in com.atlassian.jira.user.ApplicationUser. |
List<ApplicationUser> |
getSuggestedAssignees(Issue issue,
ApplicationUser loggedInUser,
List<ApplicationUser> assignableUsers)
Returns a list of suggested Assignee
ApplicationUser s for a given Issue and logged-in com.atlassian.jira.user.ApplicationUser. |
List<ApplicationUser> |
getSuggestedAssignees(Set<String> suggestedAssigneeNames,
List<ApplicationUser> assignableUsers)
Converts a set of suggested assignee name Strings to a list of suggested
ApplicationUser objects. |
boolean |
isAssignable(Issue issue,
ApplicationUser user,
com.opensymphony.workflow.loader.ActionDescriptor actionDescriptor)
Determines if a user is assignable to an issue.
|
boolean |
isAssignable(Project project,
ApplicationUser user)
Determines if a user is assignable to an issue in a project.
|
Map<String,Boolean> |
makeUniqueFullNamesMap(Collection<ApplicationUser> users)
Converts a collection of Users to a Map where the key is the com.atlassian.jira.user.ApplicationUser full name and the value is true or false.
|
boolean isAssignable(@Nonnull Issue issue, @Nonnull ApplicationUser user, com.opensymphony.workflow.loader.ActionDescriptor actionDescriptor)
issue
- the issue.user
- the user to check.boolean isAssignable(@Nonnull Project project, @Nonnull ApplicationUser user)
project
- the project.user
- the user to check.List<ApplicationUser> getAssignableUsers(Issue issue, @Nullable com.opensymphony.workflow.loader.ActionDescriptor actionDescriptor)
ApplicationUser
s that may have an Issue
assigned to them, for a given workflow state.
The ActionDescriptor
may be used to check for workflow states that only allow a subset of
normally-assignable users.
issue
- the Issue to find assignable users foractionDescriptor
- workflow action descriptor to filter users onList<ApplicationUser> getAssignableUsers(Collection<Issue> issues, @Nullable com.opensymphony.workflow.loader.ActionDescriptor actionDescriptor)
ApplicationUser
s that may have all of the given Issue
s assigned to them, for a
given workflow state.
The ActionDescriptor
may be used to check for workflow states that only allow a subset of
normally-assignable users.
Note: This method is exactly equivalent to getAssignableUsers(Issue, ActionDescriptor)
,
but returns only those users that are assignable for all of the issues. This is
significantly more efficient than calling getAssignableUsers(Issue, ActionDescriptor)
multiple times and filtering the lists yourself.
issues
- the Issues to find assignable users foractionDescriptor
- workflow action descriptor to filter users onCollection<ApplicationUser> findAssignableUsers(String query, Issue issue, com.opensymphony.workflow.loader.ActionDescriptor actionDescriptor)
Matches on the start of username, Each word in Full Name & email.
Results are sorted according to the UserCachingComparator
.
query
- String to search for.issue
- Issue to check Assignee permissions againstactionDescriptor
- an ActionDescriptor
describing the context in which the Assignee is being searchedApplicationUser
objects that match criteria.Collection<ApplicationUser> findAssignableUsers(String query, Project project)
Matches on the start of username, Each word in Full Name & email.
Results are sorted according to the UserCachingComparator
.
query
- String to search for.project
- Project check Assignee permissions againstApplicationUser
objects that match criteria.List<ApplicationUser> getSuggestedAssignees(Issue issue, @Nullable ApplicationUser loggedInUser, @Nullable com.opensymphony.workflow.loader.ActionDescriptor actionDescriptor)
ApplicationUser
s for a given Issue and logged-in com.atlassian.jira.user.ApplicationUser.
This version accepts a pre-populated list of assignable Users to filter.
issue
- Issue to get suggested Assignees forloggedInUser
- the user getting the suggestions, whose Assignee history may be queriedactionDescriptor
- workflow action descriptor to filter users onApplicationUser
objects deemed relevant to the given Issue and com.atlassian.jira.user.ApplicationUser, sorted by UserBestNameComparatorList<ApplicationUser> getSuggestedAssignees(Issue issue, ApplicationUser loggedInUser, List<ApplicationUser> assignableUsers)
ApplicationUser
s for a given Issue and logged-in com.atlassian.jira.user.ApplicationUser.
This version accepts a pre-populated list of assignable Users to filter.
issue
- Issue to get suggested Assignees forloggedInUser
- the user getting the suggestions, whose Assignee history may be queriedassignableUsers
- a list of ApplicationUser
s to filterApplicationUser
objects deemed relevant to the given Issue and com.atlassian.jira.user.ApplicationUser.Map<String,Boolean> makeUniqueFullNamesMap(Collection<ApplicationUser> users)
The value will be true if no other user with that exact full name exists. The value will be false if at least one other user with that exact full name exists.
users
- a collection of Users that may contain multiple users with the same full nameList<ApplicationUser> getSuggestedAssignees(Set<String> suggestedAssigneeNames, List<ApplicationUser> assignableUsers)
ApplicationUser
objects.
Suggested user names may not be returned as suggested users if they are not in the assignable user list.
suggestedAssigneeNames
- the names of the users to returnassignableUsers
- a list of Users to filter by the suggested assignee namesSet<String> getRecentAssigneeNamesForIssue(Issue issue)
The current assignee should be included in the returned list.
issue
- Issue to get recent assignees forgetRecentAssigneeKeysForIssue(com.atlassian.jira.issue.Issue)
Set<String> getRecentAssigneeNamesForUser(ApplicationUser user)
ApplicationUser
s that have recently been assigned to issues by the specified com.atlassian.jira.user.ApplicationUser.user
- com.atlassian.jira.user.ApplicationUser to check for assignees in history managerSet<String> getRecentAssigneeKeysForIssue(Issue issue)
The current assignee should be included in the returned list.
issue
- Issue to get recent assignees forgetRecentAssigneeNamesForIssue(com.atlassian.jira.issue.Issue)
Set<String> getRecentAssigneeKeysForUser(ApplicationUser remoteUser)
ApplicationUser
s that have recently been assigned to issues by the specified com.atlassian.jira.user.ApplicationUser.remoteUser
- com.atlassian.jira.user.ApplicationUser to check for assignees in history managerCopyright © 2002-2018 Atlassian. All Rights Reserved.