How to restrict Log Work on a specific status
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
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.
- This option is only applicable for JIRA version 8.0 and above.
- Due to - JRASERVER-70504Getting issue details... STATUS , log work during an incoming transition will silently fail (ie. The hours logged when transitioning to the modified status will not be registered to the issue, and no error message will be displayed, however, the transition will complete successfully).
- In Jira, go to Jira administration (gear icon) > Issues > Workflows.
- Click on the Edit link for the Workflow you want to adjust.
- Select the Status where you need to restrict the logging of hours, and then click on Properties.
- Add '
jira.permission.work.denied' to the Property Key in the Add New Property form.
- Add a Property Value as True
- Go back to the Workflow Step page and Publish the changes.
The alterations to the workflow will only be valid after publishing the changes.
- Note: If you observe the property is being ignored by the workflow, request you to follow the steps mentioned below:
- Export the workflow as XML
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.