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.
I have placed the following code in the Create post-function after the "Issue Created" event is fired:
def IssueService issueService = ComponentAccessor.getIssueService() def user = ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser() def actionId = 11 IssueService.TransitionValidationResult transitionValidationResult = issueService.validateTransition( user,issue.id, actionId,new IssueInputParametersImpl([:]) ) if(! transitionValidationResult.errorCollection.hasAnyErrors()) { issueService.transition(user,transitionValidationResult) }
However, the validateTransiton call returns the following error.
Errors: {} Error Messages: [It seems that you have tried to perform a workflow operation (Planned) that is not valid for the current state of this issue (TASKTEST-28). The likely cause is that somebody has changed the issue recently, please look at the issue history for details.]
Note, that all of the conditions and validators are satisfied after the issue is created.
Whereas, the above code works fine if I place it somewhere else like in a IssueUpdated event listener
Thanks.
Hi Thanos, I will give a try to TransitionOptions.The script runner Fast-track transition works fine.
Regards
Hi Roberto,
Did you check your logs for any more informative error messages ?
I would suggest to try use TransitionOptions (and skip any validators, conditions etc) during the the transition
Also did you try to use script runner's built in Fast-track transition an issue and it failed (I see that you mention "without using sr built in script" but if with the built in script does not fail this may give us a clue) ?
regards, Thanos
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.