Workflow transition buttons are missing from the View Issue page, or the error "You don't have permission to transition this issue" is displayed

お困りですか?

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

コミュニティに質問

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

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.

*Fisheye および Crucible は除く

問題

Some users are unable to transition a Jira issue. Depending on the Jira version that you are using, the symptoms will be slightly different:

  • On Jira versions below 9.0.0, the workflow transition buttons are missing from the issue view page:
  • On Jira versions from 9.0.0, there is a drop-down next to the current status, but when clicking on it, the error You don't have permission to transition this issue is displayed:


診断

Checking the permissions

Let's first verify that the affected user has the right permission to transition the issue:

  • Let's check that the user is granted permission to transition issues within the project, by following the steps below:
    • Go to ⚙ > System > Permission Helper
    • Select the affected user
    • Select the key of the issue that can't be transitioned
    • Select the Transition issues permission
    • Click on the Submit button
    • If the result is negative, then the Root Cause 5-a is relevant
    • If the result is positive, move on to the step below
  • Check the configuration of the workflow which is associated with the type of issue where transitions cannot be transitioned.
    • This can be checked by going to the page Project Settings > Workflows and then trying to edit the Workflow associated to the right issue type
    • Check each workflow transition that is missing from the Issue View page, to see if there is any condition associated to it. If any of the condition is not respected by the user viewing the issue, the transition button will be hidden.
    • In such case, the Root Cause 5-b is relevant

If you verified that the user has permission to transition the issue (via the project permission configuration and the workflow), then you can move on to the steps below, which are meant to check the data integrity related to the affected issue.

Checking the issue data consistency/integrity

Run the following query against the Jira database (in this example, the issue key is "TTWO-4"; table name 'os_wfentry' is case sensitive and is 'OS_WFENTRY' in MySQL)

select * from os_wfentry 
where id = (select workflow_id from jiraissue where issuenum = 4 and project = (select id from project where pkey = 'TTWO'));
  id   | name | initialized | state
-------+------+-------------+-------
 10100 | test |             |     3
(1 row) 

また、課題が有効なワークフロー ステップに関連付けられてないときに問題が発生することもあります。次のクエリで課題が返されるかどうかを確認できます。

select concat(concat(P.pkey,'-'),I.issuenum)
from jiraissue I
join project P on P.id = I.project
left join os_currentstep C on C.entry_id = I.workflow_id
where C.id is null

Check the Jira application logs and look for the error below. If you find this error associated to the key of the issue where transition buttons are missing, then it means that there is some data corruption/inconsistency in the database for that specific issue. In this case, the easiest way to fix this issue is to force a workflow remapping for that issue. Please refer to the Workaround 1 to force Workflow remapping under the Workaround section.

State of issue [ABC-123] has an action [id=2] which cannot be found in the workflow descriptor


原因

考えられる原因: 

  1. 課題に適用されたワークフロー ("name" 列の値) とプロジェクトとの関連付けが解除されている。
  2. 課題の状態がアクティブではない。("state" 列の値: 0 は Inactive、1 は Active、3 は Killed、4 は Complete)
  3. 課題が現在の既存のステップに関連付けられてない。
  4. ワークフローで利用されているマクロが不足している。Jira の課題の表示ページで課題のトランジションが表示されない」をご確認ください。
  5. 権限が不適切:
    1. The user is not granted the Transition Issues permission in the Project the Jira issue belongs to, as per the Permission Scheme associated to the project
    2. There are some condition(s) configured in the workflow used by the Jira issue that prevents the user from seeing the missing transition(s)
    3. The user does not have permission to edit an Epic Link and face either of the 2 bugs listed below:
      1. JSWSERVER-20770 - Getting issue details... STATUS
      2. JRASERVER-71884 - Getting issue details... STATUS .
  6. Corruption/inconsistency in the Jira Database around the workflow information associated to the impacted Jira issue

回避策

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

Causes 1 - 3, 5c, 6:

  • 問題を修正するために整合性チェッカーを実行してください。

  • In case the integrity checker is not able to fix the issue, let's try to fix the workflow inconsistency for the impacted issue by forcing a workflow remapping:

    • Workaround 1 to force Workflow remapping:
      • Check the list of workflows configured within the project that the impact Jira issue belongs to (via the page Project Settings > Workflows)
      • Identify an issue type other than the one the impacted Jira issue belongs to impacted, and that is associated to a different workflow
      • Open the impacted Jira issue, click on More > Move and move it to the issue type that you identified in the previous step. Moving it to a new issue type will force the workflow remapping
      • Move the issue again to its original issue type
      • Check if you are now able to see the missing transitions
      • If this workaround did not help, or if you could not find an issue type associated to a different workflow, try the Workaround 2 below instead.
    • Workaround 2 to force Workflow remapping:
      • Open the impacted Jira issue, click on More > Move and move it to another project
      • Move this issue back to its original project and issue type
      • Check if you are now able to see the missing transitions
      • (warning) The downside of this workaround is that this issue will end up with a new issue key after it is moved back to its original project
      • If this workaround did not help, try the Workaround 3 below instead.
    • Workaround 3 to force Workflow remapping:
      • Clone the impacted Jira issue (and close the original one)
      • Check if you are now able to see the missing transitions
      •  The downside of this workaround is the fact that this issue will end up with a new issue key after it is cloned.
    • Workaround 4 to force Workflow remapping:
      • Copy the workflow and replace it on the project's workflow scheme. It'll trigger a workflow remap. You may reassign the original workflow back if you want right after.
  • 課題の状態の不一致 "Killed" が整合性チェッカーで取得されていない ( JRA-26454 - Getting issue details... STATUS ):

    • データベースに対して次のクエリを実行してください。以下の例では課題は "TTWO-4" であるとします。

      update os_wfentry set state = 1 where id = (select workflow_id from jiraissue where issuenum = 4 and project = (select id from project where pkey = 'TTWO'));
  • 課題の状態の不一致 "Inactive" (整合性チェッカーが実行されない場合)。「Jira Server のワークフロー整合性チェックと同等の SQL」をご確認ください。 
    • Inactive 状態を利用しているすべての課題を検索します。 

      SELECT jiraissue.id issue_id,
             jiraissue.workflow_id,
             os_wfentry.*
      FROM   jiraissue
      JOIN   os_wfentry
      ON     jiraissue.workflow_id = os_wfentry.id
      WHERE  os_wfentry.state IS NULL
      OR     os_wfentry.state = 0;
    • すべての破損状態を更新します。  

      UPDATE os_wfentry
      SET state = 1
      WHERE id IN (SELECT os_wfentry.id
                   FROM jiraissue
                            JOIN os_wfentry
                                 ON jiraissue.workflow_id = os_wfentry.id
                   WHERE os_wfentry.state IS NULL
                      OR os_wfentry.state = 0);
  • Workaround for cause 3:

    • Run the following SQL query to generate the inserts for all issues missing the valid workflow step entry

      select concat(concat('insert into os_currentstep values ((select max(id)+1 from os_currentstep),',workflow_id),',1,0,'''',now(),null,null,''open'',null)') 
      from jiraissue where workflow_id not in (select entry_id from os_currentstep)
    • すべての結果をコピーし、Insert 文を実行して不足している行を追加します。

原因 5a, 5b

  • The impacted user does not have the right Permission to execute the transition: 
    • Check configuration of the Permission Scheme associated to the project
      • This can be checked by going to the page Project Settings > Permissions
      • Review the Transition Issues permission, and make sure that the impacted user is part of the users/groups which are associated to this permission
      • If the user is missing, then modify the configuration of the Transition Issues permission, so that this user can be included
    • Check the configuration of the workflow which is associated to the type of the issue where buttons are missing
      • This can be checked by going to the the page Project Settings > Workflows, and then trying to edit the Workflow associated to the right issue type
      • Check each workflow transition that is missing from the Issue View page, to see if there is any condition associated to it. If any of the condition is not respected by the user viewing the issue, the transition button will be hidden
      • For example, when adding a condition like Only the assignee of the issue can execute this transitionThe transition button will not appear when a user other than the assignee edits the issue:

説明 課題がクローズ ステータスではないにもかかわらず、課題の表示ページでワークフローのトランジション ボタンを利用できなくなった。
製品Jira
プラットフォームServer
Last modified on Mar 5, 2024

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

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