java.lang.IllegalArgumentException: No workflow action with id {ID} available for issue {ID}

This error is caught when trying to make a trasition using JIRA API (JIRA 6.2.4). 

ErrorCollection errors = null;
JiraAuthenticationContext authenticationContext = ComponentAccessor.getJiraAuthenticationContext();
if(!status.getName().equals("")){
try{
  authenticationContext.setLoggedInUser(reporter);
  WorkflowTransitionUtil workflowTransitionUtil = (WorkflowTransitionUtil)          JiraUtils.loadComponent(WorkflowTransitionUtilImpl.class);

  workflowTransitionUtil.setUsername(reporter.getName());
  workflowTransitionUtil.setIssue(issueToSetStatusOn);
  workflowTransitionUtil.setAction(actionId);
  errors = workflowTransitionUtil.validate();
  workflowTransitionUtil.progress();
}catch (Exception e){
  addError("Cannot change issue state", e);
  addError("validateTransition parameters: " + "reporter = " + reporter + ", issue.getId()   = " + issue.getId() + ", actionId = " + actionId);
 if (errors != null){
  addError("errors" + errors);
}
}
}

The transition with the given ID exists.

Later incoming mail log includes [The anonymous user does not have permission to perform action on given issue.]

1 answer

0 vote

You can get that error when the transition exists, but it's not a transition from the issue's current status.  I think it also happens when you don't have permission to use that transition.

Hmm, the issue is in the needed status and AFAIK the user has persmission to make the transition. What is weird is that on JIRA 6.4.11 the code works perfectly, on testing environment with JIRA 6.2.4 and inner DB it also works, but on the production environment with JIRA 6.2.4 and external DB it does not work. 

Can't there be any synchronization issue between the incoming email code and the actual actions processed by JIRA itself?  

Ok, what happens when the user logs in and tries the transition on-screen?

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Fadoua M. Boualem
Published yesterday in Trello

Using Trello to manage events

As a Jira power user, I was at first doubtful that Trello could benefit my workflow. Jira already uses boards (ones you can customize!), so why would I even need to use Trello?! In this post you will...

447 views 6 7
Read article

Atlassian User Groups

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!

Find my local user group

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

Groups near you