JIRA Throws Missing Available Workflow Actions

Still need help?

The Atlassian Community is here for you.

Ask the community

Problem

Some issues do not have any available workflow actions. Any conditions preventing workflow actions from not appearing are fulfilled.

The below error might appear in the atlassian-jira.log:

Caused by: java.lang.IllegalArgumentException: No workflow action with id '701' available for issue TEST-123
	at com.atlassian.jira.workflow.WorkflowTransitionUtilImpl.getActionDescriptor(WorkflowTransitionUtilImpl.java:144)
	at com.atlassian.jira.rest.v2.issue.UserResource.getActionDescriptorById(UserResource.java:304)
	at com.atlassian.jira.rest.v2.issue.UserResource.findAssignableUsers(UserResource.java:289)
	... 193 more

Diagnosis

Run the following query in your database:

  1. Find out which workflow is associated to the affected issues:

    jira=> select w.name from jiraissue i, os_wfentry w where issuenum = <affected issue id> and project = (select id from project where pkey = '<affected project key>') and i.workflow_id = w.id;
  2. Find out the correct workflow with any issue that shows transition button:

    jira=> select w.name from jiraissue i, os_wfentry w where issuenum = <issue id> and project = (select id from project where pkey = '<affected project key>') and i.workflow_id = w.id;

Cause

This error is likely to be caused by a mismatch between the workflow step and the workflow itself.

One of the possible causes is hardcoding workflow step or action ID using custom code (for example groovy script in post function that points to an ID that doesn't exist)

Workaround

  1. If you are not a JIRA administrator or cannot run the integrity checker (see solution below), you can move the issue to another project (that has a different workflow), and then move it back to original project. The workflow actions should be available again.

  2. Clone the problematic ticket and the cloned ticket will shown the workflow actions again.

  3. Copy the current Workflow Scheme, and re-assign the copied scheme to the affected project

Resolution

Resolution 1

For all of the following procedures, you must be logged in as a user with the Jira System Administrators global permission.

Run the integrity checker via Administration >> System >> Integrity Checker. Fix the error if there is any error message being thrown.

Using the Integrity Checker

  1. From the top navigation bar select  Administration  >  System .
  2. Select Troubleshooting and Support > Integrity Checker to open the Integrity Checker page.
    Or alternatively use: Keyboard shortcut'g' + 'g' + type 'integ'

Resolution 2

Always back up your data before performing any modifications to the database. If possible, test any alter, insert, update, or delete SQL commands on a staging server first.

Run the sql query to update the workflow name:

update os_wfentry set name = '<correct workflow name>' where id in (select i.workflow_id from jiraissue i, os_wfentry w where i.workflow_id = w.id and w.name = 'jira' and i.project = <project id>);
Last modified on Mar 21, 2024

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.