to get current status of issue
to get available actions for the issue
IssueWorkflowManager issueWorkflowManager = ComponentAccessor
Collection<ActionDescriptor> actions = issueWorkflowManager .getAvailableActions(issue);
Remember - you can NOT just "set a status".
Status is NOT a field, it is an indicator of where the issue is in the workflow. To change status, you MUST move the issue through transitions to the new status.
The only time you can "set" a status without transition is when you are adding issues to Jira.
>But i can change the transition rgt?
To try to clarify: You can NOT "change the transition". A transition moves an issue through the workflow. To change the status of an issue, you MUST use a transtion that goes from your old status to the new status.
> & when transition is done the status gets updated rgt?
Correct, because the whole point of a transition is that it changes the status.
No. You are not grasping this.
To change a status, you must use a transition
You cannot get around this. Groovy can tell Jira to do these transtitions. You can detect and automate them. You can protect them so that only certain users or automation can perform them and no-one else sees them.
But. You must have a transtion from A to C if you want to change status from A to C.
Unless you're happy to go from A to B to C, in which case you need transitions from A to B and from B to C.
It's not "the obvious answer", it is the "only answer". You must have that transition.
This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.Read more
Atlas Camp is our developer event which will take place in Barcelona, Spain from the 6th -7th of September . This is a great opportunity to meet other developers and get n...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs