Hello Expert,
Can you please support me for script for auto assignment from jira groups.
I don’t even find the solution anywhere.
Thanks,
Mathavan M
Based on what you mentioned above, you would like to assign an issue after issue creation.
That means the best way to go is a post function in the workflow.
In a post function you have access to some variables. Therefore, you can use the "issue" variable to get the current issue.
The rest can be achieved by the following code. I used the first group and user, but this can be adjusted according to any kind of algorithm. Be sure to put the custom script post function AFTER the "Issue Created" event so that it can be correctly be handled in Jira:
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.event.type.EventDispatchOption
def groups = ComponentAccessor.groupManager.getAllGroupNames()
def users = ComponentAccessor.groupManager.getUsersInGroup(groups.first())
issue.assignee = users.first()
ComponentAccessor.issueManager.updateIssue(ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser(),issue, EventDispatchOption.ISSUE_UPDATED,true)
Hello @Stefan Stadler
I am looking for the script Round Robin Auto Assignment.
Use Case:
We have multiple services and Each service has different support team, Each support team has a Jira group.
When ticket is created one of the service, it should assigned to respective team in round robin method.
We tried Jira Automation but, bit slow for assignment.
Can you help with this?
Thanks,
Mathavan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mathavan,
maybe this post can help here.
As I said, the logic can be changed according to the needs, so this might be seen as a starting point for your own modifications:
Updating assignee field using Groovy script Postfu... (atlassian.com)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Mathavan
there is also some documentation on Round Robin using ScriptRunner:
Round Robin Assign Issue to Users in a Certain Project Role - Adaptavist Library
You may put together both posts and get your solution :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Auto assignment “round robin” method from jira ldap groups.
When issue created we need to assign the ticket to person from ldap groups.
looking forward to hearing from you.
Thanks,
Mathavan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Mathavan for auto-assignement with round-robin from users in group you can use standard jira automation. It allows such functionality.
Using scriptrunner is possible, but not sure how to make "round-robin" with it. You'll need to save, who was assigned previously.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.