Hi all,
I have a transition that provokes to create a subtak, and inside the subtask I am trying to put a Post Script function to provoke the new subtask to move State automatically.
I have tried in two different ways trying a workflow transition or setting the status by id but I cannot achive it anyway.
My code is:
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.user.ApplicationUser
import com.atlassian.jira.bc.issue.IssueService
import com.onresolve.scriptrunner.runner.util.UserMessageUtil
import com.atlassian.jira.issue.IssueInputParameters
def iip = IssueInputParameters.newInstance()
iip.setStatusId("19")
ApplicationUser user = ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser()
IssueService issueService = ComponentAccessor.getIssueService()
issueService.validateUpdate(user, 19, iip)
but it doesn't work. The status I want to move has id ="19" but it is also permitted by workflow but I cannot do the transition neither,
Any help will be highly appreciated!
Thanks in advance,
Kind Regards,
Manuel.