Restrict field editing to specific user
Platform Notice: Cloud - This article applies to Atlassian products on the cloud platform.
Summary
Many times necessity arises where field editing needs to be restricted to specific users only. While there is no direct way of doing so, we can achieve it to some extent via Workflows.
Enforce editing permissions on workflows
Let us assume a simple situation where we want a field named "CODE" to be filled by user who are added in project role DEVELOPERS. For rest of the users it should be visible but they should not be able to edit it. To achieve this, we can create a transition that will be visible to only members of the Developer project role and when they use it, a screen will pop up with the field "CODE" which they can fill.
Let us consider a simple workflow that looks like this:
We will make changes to this workflow so that when a ticket is transitioned by Developers from Open to In progress, they get a screen to edit the CODE field.
Here are the steps that can be followed:
- Remove the custom field - "CODE" from Edit and Create screen. Keep it only on 'View Screen'. (This can be done from project settings > Screens).
- Create a New Screen and add the "CODE" field to it.
- Create a new transition from OPEN to In-Progress and add a condition - "User Is In Any Project Role" and then choose "Developers" project role in it. This way it will be visible only to the Developer's project role and not to anyone else.
- In the transition that we created in the first step, add this screen (created in step 3).
- Once this workflow is published, Developers will start seeing another transition and once they use it, a pop will show up with a CODE field that they can fill.