Automation rule fails with the error "you do not have the permission to associate a worklog to this issue"
プラットフォームについて: Data Center - この記事は、Data Center プラットフォームのアトラシアン製品に適用されます。
このナレッジベース記事は製品の Data Center バージョン用に作成されています。Data Center 固有ではない機能の Data Center ナレッジベースは、製品のサーバー バージョンでも動作する可能性はありますが、テストは行われていません。サーバー*製品のサポートは 2024 年 2 月 15 日に終了しました。サーバー製品を利用している場合は、アトラシアンのサーバー製品のサポート終了のお知らせページにて移行オプションをご確認ください。
*Fisheye および Crucible は除く
要約
The error below is observed in the audit logs of an automation rule when the Log Work action is executed:
you do not have the permission to associate a worklog to this issue
環境
- 8.0.0 以降の任意のバージョンの Jira Server/Data Center
- Automation For Jira (A4J) Server/Data Center on any version from 7.4.0
診断
- Open the rule configuration and take not of the user configured as the the rule actor
- Log into the Jira application as this rule actor, open the Jira issue for which the rule failed, and click on the More menu.
- If the option to log time called Log Work is missing from this menu, then it is an indication that the rule actor is not allowed to log work on Jira issues
- In such case, either Root Cause 1 or Root Cause 2 could be relevant
- Log into the Jira application as a Jira Admin
- Open the permission helper tool via ⚙ > System > Permission Helper
- Select the Issue Key for which the rule failed, the rule actor, and the permission Work On Issues and click on submit
- If the Permission helper tool fails as illustrated below, then Root Cause 1 is relevant
- If the Permission helper tool succeeds (the rule actor is granted the Work On Issues permission), move on to the next step
- Open the Jira issue for which the rule failed
- Take note of the workflow it is using, and the status it is currently in
- Edit the workflow associated to this issue type via the page Project Settings > Workflows
- Click on the Status the issue is in, and click on Properties
- Check if either property listed below is associated to this status:
- The property jira.permission.work.denied
- The property jira.permission.work.user
- The property jira.permission.work.denied
- If either properly mentioned above is associated to this workflow status, then Root Cause 2 is relevant
- Take note of the workflow it is using, and the status it is currently in
原因
Root Cause 1 - The rule actor is not granted the "Work On Issues" permission in the permission scheme
For the automation rule to work (and add logged time to the Jira issue), the rule actor needs to be granted the Work On Issues permission in the permission scheme configuration. Without granting such permission, the rule will fail with the error "you do not have the permission to associate a worklog to this issue".
Root Cause 2 - A workflow property was added to a status to block users from logging work for a specific status
When adding a property starting with the string jira.permission.work to a specific status, the ability to log work on a Jira issue that is in this status will be limited:
- When using the property jira.permission.work.denied, all users will be denied the permission to log work in this Jira issue
- When using the property jira.permission.work.user, only the user specified with this property will be allowed to log work in this Jira issue
ソリューション
根本原因の解決策 1
- Grant the rule actor the Work On Issues permission in the project(s) where the rule is supposed to run
- Or change the rule actor with a user who is granted such permission
根本原因の解決策 2
- Remove the property(ies) from the workflow status that block users from logging work on issues
- Or include only the property jira.permission.work.user, and add the username of the rule actor as the property value