According to some topics here, I created workflow. When an issue is created, assignee is automatically the creator.
The issue is, that it also does this thing when I assign the assignee by myself. However, I want to set it automatically only in case I leave it blank.
Is there a way how to make this work?
Hi @Mario Bumbera ,
1. If I'm right you might have added post-function in your workflow to assign the ticket to creator which will basically ignore the assignee field value if there is any and will assign to creator based on the function you configured
2. if you set default assignee to project lead/component lead(in project settings not in workflow post function) will assign only if the assignee is empty
3. You can go with scriptrunner's post-function and ask your script to assign to current user if assignee is empty, below may snippet may help you(NOTE: this one I wrote for server not sure about cloud)
def issueManager = ComponentAccessor.getIssueManager()
def issueService = ComponentAccessor.getIssueService()
def userManager = ComponentAccessor.getUserManager()
def currentUser = ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser()
Thank you for your answer.
I tried the solution you described in poitn no. 2, but it does not do what I need. It automatically set the assignee to Project Lead which is one specific person.
I want the following:
1. Create an issue and set the assignee to creator if assignee is empty
2. If the assignee is filled set it to entered perosn
Have you configured the 2nd point through workflow post-function? if so you should remove that function and go to users role--> Edit default--> Default assignee to Project lead
this will assign the unassigned ticket to project lead if you provide assignee details during creation it wont' assign to project lead
To achieve your requirement you may need to go with other add-ons like scriptrunner and so on... which will check your condition if assignee is empty will assign to current user that's what my above script is doing..
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events