I am using the following code to assign user in a postfunction depending on a condition:
for(Issue subtask: issue.getSubTaskObjects()){
mutableIssue = issueManager.getIssueObject(subtask.getId())
if(mutableIssue.summary=='SomeSummary'){
ApplicationUser usera=userManager.getUserByName("SomePerson")
mutableIssue.setAssignee(usera);
issueManager.updateIssue(user, mutableIssue, com.atlassian.jira.event.type.EventDispatchOption.DO_NOT_DISPATCH, false);
}
After creation, it is assigned to SomePerson. I also have a Kanban board which has a filter of displaying the issues which are only assigned to SomePerson. This issue doesn't show up there. When I go to the issue and manually assign it to some other user and then back to this user (SomePerson), this issue shows up on the kanban board. So I am assuming this is due to some error in assigning the issue programmatically. What is the problem here?