Documentation for JIRA 4.1. Documentation for other versions of JIRA is available too. 
![]()
This solution is particularly useful when your workflow has a restriction on assigning issues. For example, certain users can only assign an issue to themselves by executing a transition, and you want the "Assign to Me" action to be visible only if the Current User is not yet the Assignee of the issue.
The content on this page relates to platforms which are not supported by JIRA. Consequently, Atlassian can not guarantee providing any support for it. Please be aware that this material is provided for your information only and using it is done so at your own risk.
Let us consider the assigning scenario. To show the "Assign to Me" transition only when the Assignee is different from the Current User, execute the following steps:
import com.atlassian.jira.ComponentManager curr = ComponentManager.getInstance().getJiraAuthenticationContext().getUser() assig = issue.getAssignee() result = (curr != assig)
This was tested in JIRA 4.0.2.
See also [ARCHIVED] How to Allow Users to Assign Issues Only in a Specific Transition.