Automation rule fails with the error "you do not have the permission to associate a worklog to this issue"

Platform Notice: Data Center - This article applies to Atlassian products on the Data Center platform.

Note that this knowledge base article was created for the Data Center version of the product. Data Center knowledge base articles for non-Data Center-specific features may also work for Server versions of the product, however they have not been tested. 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

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

Environment

  • Jira Server/Data Center on any version from 8.0.0
  • Automation For Jira (A4J) Server/Data Center on any version from 7.4.0

Diagnosis

  • 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
    • If either properly mentioned above is associated to this workflow status, then Root Cause 2 is relevant

Cause

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

Solution

Solution for Root Cause 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

Solution for Root Cause 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


Last modified on Jan 3, 2025

Was this helpful?

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