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.
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:
- Download and install the Jira Scripting Suite plugin. See the Installation&Upgrade Guide.
- Create a draft of your workflow so you can change it. See Configuring Workflow - Editing an active workflow.
- Go to the "Assign to Me" transition and add a "Jython Condition". In the "Add Parameters To Condition" screen, paste the following lines of code and click "Add".
- Publish the changes to your workflow.