Hi,
Our workflow creates 'Design' and 'Development' sub tasks. I set the development task assignee the same as the design task assignee in a post-function script for 'Design' task workflow.
def dsnAssignee = issue.getAssigneeId()
def subTasks = issue.getParentObject().getSubTaskObjects()
subTasks.each {
if (it.issueType.name == "Development"){
it.setAssigneeId(dsnAssignee)
}
}
This does not set the assignee of 'Development' task to the 'Design' task assignee. What else do I need to do in the above script?
Thanks
Updating issue consist of two steps:
Storing changes into database. Use this to do it
ComponentAccessor.getIssueManager().updateIssue(ComponentAccessor.getJiraAuthenticationContext().getUser().getDirectoryUser(), issue, EventDispatchOption.ISSUE_UPDATED, false)
The reason to do it: you make a lot of changes and store it to database at once.
if that does not work, try it.store(). You probably also want to reindex the issue.
ComponentAccessor.getIssueIndexManager().reIndex(it);
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks a lot Vasilliy and Jeff. My issue is resolved.
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.