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

Subtask automatically assigned to "Default user" instead of user passed in via issueInputParameters

Sammy August 23, 2021

Hi there,

I am using simple issueInputParameters to define my new ticket parameters as follow:

def issueInputParameters = new IssueInputParametersImpl()
issueInputParameters
.setProjectId(parentIssue.projectId)
.setIssueTypeId(subtaskIssueType.id).
.setReporterId(asUser.username)
.setAssigneeId(userSelected.getUsername())
.setPriorityId(parentIssue.getPriority().getId())

Then by using validSubTaskCreate to verify the parameters before creating a subtask issue:

def createValidationResult = ComponentAccessor.issueService.validateSubTaskCreate(asUser, parentIssue.id, issueInputParameters)
if (!createValidationResult.valid) {
log.error createValidationResult.errorCollection
return
}

There is no warning or error return from creating the validation result, but it seems like instead of having the ticket assigned to "userSelected.getUsername()" the subtask ticket always assigned to the default assignee for the project.

Any idea why will this happen?

Thanks!

Sammy

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events