How to reorder statuses on board columns in Jira

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

プラットフォームについて: Server と Data Center のみ - この記事は、サーバーおよびデータセンター プラットフォームのアトラシアン製品にのみ適用されます。

    

要約

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 .


環境

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

Both Scrum and Kanban boards are affected.


ソリューション

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.

データベースの変更を行う場合は必ず事前にバックアップを取得してください。可能な場合は、まずステージング サーバーで SQL コマンドの変更、挿入、更新、または削除を行うようにします。

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';

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):




最終更新日: 2020 年 10 月 19 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.