Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Set Assignee when creating Issue with scriptrunner

Krishnanand Nayak
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.
February 17, 2020

how do i set the assignee when creating the issue with scriptrunner. The current code looks like this:

manualInputParameters.with {
            projectId = project.id
            summary = "${event.version.name} | Regression | Manual"
            description = "Auto Generated Test Plan for ${event.version.name}. This Test Plan will have all the Manual and Powershell Test Cases"
            issueTypeId = newIssueTypePlan.id
            reporterId = user.name
        }        
manualInputParameters = manualInputParameters.setComponentIds(
11700)        manualInputParameters = manualInputParameters.setFixVersionIds(vers.getId()
manualInputParameters = manualInputParameters.setPriorityId("3")        
manualInputParameters = manualInputParameters.addCustomFieldValue(
"customfield_12618",bDate)        
manualInputParameters = manualInputParameters.addCustomFieldValue(
"customfield_12619",eDate)
manualInputParameters = manualInputParameters.setAssigneeId(userManager.getUserByName("username").getKey())

 

1 answer

0 votes
Marc Minten (EVS)
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.
February 18, 2020

why do you pass the key, why not the id ?

Krishnanand Nayak
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.
February 18, 2020

tried everything. still it doesn't work

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, jira product discovery, jpd premium, product management, idea management, product discovery, jira premium, product planning, atlassian community, product development, roadmap planning, product prioritization, feature management

Introducing Jira Product Discovery Premium ✨

Jira Product Discovery Premium is now available! Get more visibility, control, and support to build products at scale.

Learn more
AUG Leaders

Atlassian Community Events