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 need this information to write a workflow postfunction.
The issue status itself has not been updated yet.
(a workaround is to move the postfunction after the
'Set issue status to the linked status of the destination workflow step.')
Is there some property somewhere - associated to an action - which details out what the target status is - or target step ?
Community moderators have prevented the ability to post new answers.
In the transientVars is the action ID.
From the workflowDescriptor you get an Action object using the action ID, then you have the destination step:
def stepId = action.getUnconditionalResult()?.step
getWorkflowDescriptor().getStep(stepId)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
action.getUnconditionalResult() doesn't always return the destination step/status info. I've seen it where the transition is to say "Review" and it returns status name of "Done"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
After some digging ...
List<ChangeItemBean> cibs = (List<ChangeItemBean>) transitionVars.get("changeItems"); String targetStatusName = null; // find the destiny transitionname for (ChangeItemBean cib:cibs) { if (cib.getField().equals("status") && cib.getFieldType().equals("jira")) { targetStatusName = cib.getToString(); } } if (targetStatusName == null) { log.error("Transition without know target status"); return null; }
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Mostly you need to use WorkflowService, do a getWorkflow evaluate the steps - http://docs.atlassian.com/software/jira/docs/api/latest/com/atlassian/jira/bc/workflow/WorkflowService.html#getWorkflow(com.atlassian.jira.bc.JiraServiceContext, java.lang.String)
Looks complicated. But can you explain what are you trying to achieve by getting the status name?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
We are working on a new plugin, where the actions on the future status are required.
I did some digging and found some solution.
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.