Package com.atlassian.greenhopper.rest
Class AssigneeUserPickerSearchService
java.lang.Object
com.atlassian.greenhopper.rest.AssigneeUserPickerSearchService
@Service("gh-assigneeUserPickerSearchService")
public class AssigneeUserPickerSearchService
extends Object
Encapsulates assignee discovery logic.
NOTE: This implementation simply fetches the PermissionContext for the current issue/status. The original code was based on the current
OperationContext, which would return a different PermissionContext in case of Workflow transitions (in which case the target status and not the
current status is used). Whether this has any impact on the assignee field values is unknown to me, but in case of GH we refer to JIRA for workflow
transitions so we happily ignore this case.
ADDED NOTE: That doesn't work if there's no issue yet because we're just creating one. So now, we support a project parameter as fallback as well.
Code is a mix of AssigneeSystemField and DefaultUserPickerSearchService.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
canPerformAjaxSearch
(com.atlassian.jira.user.ApplicationUser currentUser) boolean
canShowEmailAddresses
(com.atlassian.jira.user.ApplicationUser currentUser) List
<com.atlassian.jira.user.ApplicationUser> findAssignableUsers
(com.atlassian.jira.user.ApplicationUser currentUser, com.atlassian.jira.issue.Issue issue, com.atlassian.jira.project.Project project, String query) boolean
Checks whether unassigned is allowed.
-
Field Details
-
SERVICE
- See Also:
-
-
Constructor Details
-
AssigneeUserPickerSearchService
public AssigneeUserPickerSearchService()
-
-
Method Details
-
findAssignableUsers
-
canPerformAjaxSearch
public boolean canPerformAjaxSearch(com.atlassian.jira.user.ApplicationUser currentUser) - See Also:
-
canShowEmailAddresses
public boolean canShowEmailAddresses(com.atlassian.jira.user.ApplicationUser currentUser) - See Also:
-
isUnassignedIssuesEnabled
public boolean isUnassignedIssuesEnabled()Checks whether unassigned is allowed.
-