How to reorder statuses on board columns in Jira

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

    

Summary

When a column in a board has two or more statuses mapped to it, they might not appear in the desired order top-to-bottom.

This issue's been fixed on Jira 8.12:  JSWSERVER-12944 - Getting issue details... STATUS .


Environment

Jira Software up to 8.11.x. (Fixed on 8.12.0)

Both Scrum and Kanban boards are affected.


Solution

The status order in the columns are currently read from the steps' ids of the issue's workflow.

Currently, the only way to change a step id is either by recreating it or updating the database.

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.

If the board contains issues with different workflows, steps 1 and 2 must be repeated for each workflow.

1) Confirm the steps' ids

select descriptor from jiraworkflows where workflowname = 'name of the workflow';

We should see, at the end of the XML representation, the steps and their ids as in the example below:

<steps>
  <step id="1" name="To Do">
    <meta name="jira.status.id">10000</meta>
  </step>
  <step id="6" name="In Progress">
    <meta name="jira.status.id">3</meta>
  </step>
  <step id="11" name="Done">
    <meta name="jira.status.id">10001</meta>
  </step>
  <step id="12" name="Closed">
    <meta name="jira.status.id">6</meta>
  </step>
</steps>

As Done has a lower id than Closed, it should appear above on the board column:

2) Edit the steps' ids

The commands below are examples validated on Postgres database. You may need to change them to work on your specific database.

To change the steps ids, we may simply edit the content of the XML representation to swap the ids.

In the example below, we swap Done and Closed ids (11 and 12, respectively):

update jiraworkflows set descriptor = replace(descriptor, '<step id="11" name="Done">', '<step id="12" name="Done">') where workflowname = 'name of the workflow';
update jiraworkflows set descriptor = replace(descriptor, '<step id="12" name="Closed">', '<step id="11" name="Closed">') where workflowname = 'name of the workflow';
update jiraworkflows set descriptor = replace(descriptor, 'status="Done" step="11"', 'status="Done" step="12"') where workflowname = 'name of the workflow';
update jiraworkflows set descriptor = replace(descriptor, 'status="Closed" step="12"', 'status="Closed" step="11"') where workflowname = 'name of the workflow';

Validate the changes took effect by committing them and retrieving the new workflow descriptor:

select descriptor from jiraworkflows where workflowname = 'name of the workflow';
<steps>
  <step id="1" name="To Do">
    <meta name="jira.status.id">10000</meta>
  </step>
  <step id="6" name="In Progress">
    <meta name="jira.status.id">3</meta>
  </step>
  <step id="12" name="Done">
    <meta name="jira.status.id">10001</meta>
  </step>
  <step id="11" name="Closed">
    <meta name="jira.status.id">6</meta>
  </step>
</steps>


3) Restart Jira and validate

We'll have to restart Jira for the caches to be rebuilt. If Data Center, you may need to bring the full cluster down or wait for the cache to be refreshed over time.

When moving the same issue which the workflow was edited, we shall see the statuses reordered as expected.

In the same example, now Closed (id 11) appears above Done (id 12):




Last modified on Dec 21, 2022

Was this helpful?

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