Stop users from logging work in Jira based on issue status
Platform Notice: Data Center and Cloud By Request - This article was written for the Atlassian Data Center platform but may also be useful for Atlassian Cloud customers. If completing instructions in this article would help you, please contact Atlassian Support and mention it.
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
Based on your project workflow, you may wish to stop users from logging time on issues once they reach specific statuses. In order to achieve this, we can make use of the workflow property jira.permission.work.denied
.
This property prevents logging time on issues, and also prevents users from editing or deleting work logs in the activity tab.
Important notes
This option is only applicable for Jira version 8.0 and later
Due to JRASERVER-70504, logging work during an issue transition will silently fail if the property is set on the destination status
Solution
Add jira.permission.work.denied
to workflow
In Jira, go to Jira administration (gear icon) > Issues > Workflows
Select Edit for the Workflow you want to adjust
Select the Status where logging should be restricted
Select Properties in the modal box that appears
Add '
jira.permission.work.denied
' to the Property Key in the Add New Property formSet the Property Value as True
Return to the Workflow editor and Publish the changes
Note: If you observe the property is being ignored by the workflow, try the steps below:
Export the workflow as XML
Make sure the below snippet exists in the workflow
1 2 3 4 5
<validator name="" type="class"> <arg name="class.name">com.atlassian.jira.workflow.validator.PermissionValidator</arg> <arg name="permissionKey">MANAGE_SPRINTS_PERMISSION</arg> </validator> </validators>
If this snippet is not included in the XML, include it at the top of the file
Save the XML file and re-import it to Jira
Was this helpful?