Get the next status from JIRA worklflow action without processing the action.

huntermike November 16, 2017

Hey i want to get the next status from an issue workflow action.

I dont want to process the status.

But i have no idea how to solve that.

My approach would be like this:

 WorkflowManager workflowManager = ComponentAccessor.getWorkflowManager();
List<Status> statuses = workflowManager.getWorkflow(issue).getLinkedStatusObjects();

List<String> allActionNames = new ArrayList<>();
for (Status status : statuses) {
StepDescriptor currentStep = workflowManager.getWorkflow(issue).getLinkedStep(status);

List<ActionDescriptor> actions = currentStep.getActions();
for (ActionDescriptor actionDescriptor : actions) {
allActionNames.add(actionDescriptor.getName());

}
}

 I need something like this actionDescriptior.getNextStatusObject().

 

Or  is there any other approach?

 

1 answer

1 accepted

2 votes
Answer accepted
Alexey Matveev
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 16, 2017

Hello, 

Are you looking for

workflowManager.getNextStatusIdForAction(Issue issue, int actionId)
huntermike November 16, 2017

thx

Suggest an answer

Log in or Sign up to answer