You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
Using following code, am trying to close epic and it is resulting in the below error, can anyone help here..
def issueService = ComponentAccessor.issueService
def issueInputParameters = issueService.newIssueInputParameters()
issueInputParameters.setComment("This Epic closed automatically because all the issues in this Epic are closed.")
issueInputParameters.setSkipScreenCheck(true)
def transitionOptions = new TransitionOptions.Builder()
.skipConditions()
.skipPermissions()
.skipValidators()
.build()
def loggedInUser = ComponentAccessor.jiraAuthenticationContext.loggedInUser
def transitionValidationResult = issueService.validateTransition(loggedInUser, epicIssue.id, actionId, issueInputParameters, transitionOptions)
ERROR:
[c.o.s.jira.workflow.AbstractScriptWorkflowFunction] Script function failed on issue: ATOTSS1-1205, actionId: 61, file: null
groovy.lang.MissingMethodException: No signature of method: com.atlassian.jira.bc.issue.DefaultIssueService.validateTransition() is applicable for argument types: (com.atlassian.jira.user.DelegatingApplicationUser, Long, String...) values: [XX2249(JIRAUSERXXXXX), 1967508, 61, com.atlassian.jira.issue.IssueInputParametersImpl@6d380f4b, ...]
Possible solutions: validateTransition(com.atlassian.jira.user.ApplicationUser, java.lang.Long, int, com.atlassian.jira.issue.IssueInputParameters, com.atlassian.jira.workflow.TransitionOptions), validateTransition(com.atlassian.jira.user.ApplicationUser, java.lang.Long, int, com.atlassian.jira.issue.IssueInputParameters)
Hi,
The error indicates that the types don't match.
Try replacing
def loggedInUser = ComponentAccessor.jiraAuthenticationContext.loggedInUser
with
ApplicationUser loggedInUser = ComponentAccessor.jiraAuthenticationContext.loggedInUser
and add an extra import
import com.atlassian.jira.user.ApplicationUser
Next the method want an int for the actionId and you seem to be passing in a String. Convert actionId to its int value and use that instead.
Let me know if this works!
Regards,
Jeroen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.