Missed Team ’24? Catch up on announcements here.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

scriptrunner post action jira

Giora Katz March 15, 2017

Hi.

I need a sample scriptrunner workflow post action for JIRA

My post action need to set the assignee of the ticket based on the issue type

Should be simple

 

2 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Vasiliy Zverev
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 16, 2017

Try to adopt this one

import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.user.util.UserManager

UserManager userManager = ComponentAccessor.getUserManager();

switch (issue.getIssueTypeObject().getName()){
    case "Bug": issue.setAssignee(userManager.getUserByName("userName").directoryUser)
    case "Bug": issue.setAssignee(userManager.getUserByName("userName").directoryUser)
    case "Bug": issue.setAssignee(userManager.getUserByName("userName").directoryUser)
}
0 votes
Thomas Schlegel
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 15, 2017
Thomas Schlegel
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 15, 2017

just a little bit of googleing...

TAGS
AUG Leaders

Atlassian Community Events