Whenever the transition executed, the issue will be assigned to a user in the specified role.
It is configurable to assign the issue to a random user in the project role or to the user in the role that has been assignee of the issue before.
Please bear in mind that if you use this post function within "Create Issue Transition", post function should be placed right after Creates the issue originally statement.
To add Assign to a user in a role validator, go to the transition of your workflow, switch to Post Functions tab and click on Add post function link.
Select JEP - Assign to a user in a role post function and click Add button
Select the project role and enable Last Active User In Role whether you want to assign the issue to the user who was the latest assignee (according to the project role) for that issue.
That's it
Do not forget to publish the workflow!