How to restrict Log Work on a specific status

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform Notice: Cloud, Server, and Data Center - This article applies equally to all 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

Purpose

Sometimes it'd make sense to prevent users from logging work time while it is in a specific status.  In order to achieve this, we can make use of a workflow property called jira.permission.work.denied.
This option will disable the logging of work on specific status, as well as disallow users from editing or deleting work log in the activity tab.

(warning) Important notes:

Solution

  1. In Jira, go to Jira administration (gear icon) > Issues > Workflows.
  2. Click on the Edit link for the Workflow you want to adjust.
  3. Select the Status where you need to restrict the logging of hours, and then click on Properties.
    Example:
  4. Add 'jira.permission.work.denied ' to the Property Key in the Add New Property form.
  5. Add a Property Value as True
    Example:
  6. Go back to the Workflow Step page and Publish the changes.
    (plus) The alterations to the workflow will only be valid after publishing the changes.
  7. Note: If you observe the property is being ignored by the workflow, request you to follow the steps mentioned below:
    1. Export the workflow as XML
    2. Make sure the below snippet exists in the workflow. If it does not exists, request you to add it on the top of the workflow: 

      <validator name="" type="class">
      <arg name="class.name">com.atlassian.jira.workflow.validator.PermissionValidator</arg>
      <arg name="permissionKey">MANAGE_SPRINTS_PERMISSION</arg>
      </validator>
      </validators> 

      c. Save the xml and import it as workflow. 


Last modified on Jan 24, 2025

Was this helpful?

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