Revert unwanted field changes in Jira Cloud using Automation
Platform Notice: Cloud Only - This article only applies to Atlassian products on the cloud platform.
Summary
Currently there's no native functionality to restrict users from editing specific custom fields. We have a feature open to enable this functionality in the future:
It is possible to use Automation to revert the value of a custom field when edited by unauthorized users.
The approach in this knowledge base article might not be applicable to all field types found within Jira
Atlassian Support does not endorse this workaround in all use cases as it could cause end users to become frustrated that their changes aren't taking effect, and/or could cause a high volume of automation executions
Solution
Create the automation rule to revert changes
Let's assume that, after a work item is created, only certain Jira users should be able to edit custom field values. The authorized users would be any users in the Administrators project role, or the specific user Agent 1.
If the user is not part of Administrators project role, and is not Agent 1, then our automation rule will will revert the value of the field to whatever it was before the unauthorized change.
Create rule and add trigger
Navigate to your project and select Project Settings > Automation > Create rule
Use the Field value changed trigger
Select any custom field(s) that you want the automation to monitor for changes
Ensure the Change type is set to Any changes to the field value
In the For dropdown list, select the work item operation(s) that you want the automation to monitor for changes
In this example, we monitor the Edit work item operation
Add an "If block" with "User condition"
Under Run actions if.. we will be using At least one condition matches
In the User conditions, select User who triggered the event
For the first user condition, use is in role and select the role Administrators
For the second user condition, we will use "is" and select the user Agent 1
Please note: we are deliberately not using negative operators such as is not in role & is not. Negative operators do not work properly with multiple conditions.
Add a "Log action" under the If condition branch
When using a condition in Automation rules, we must also use an action. To meet this requirement, we'll use a simple Log action, which won't interfere with any of the field values.
In this example, we are logging the before/after changes to a field using the following smart values
1
2
3
Initial value - {{fieldChange.fromstring}}
Modified value - {{fieldChange.tostring}}
Full log message: "Value changed from {{fieldChange.fromstring}} to {{fieldChange.tostring}}"
This provides extra logging to find out what the previous value for a field was. This way, even users who have permission to edit fields can manually revert their changes if they make a mistake.
Please refer to the screenshot below for our example rule configuration so far:

Add an "Else block" with an Edit issue action
This where we define the action for users who aren't either a member of the Administrators role or Agent 1.
Under the Else branch in the rule:
Select the field(s) in Choose fields to set...
These should match what was selected in the Field value changed trigger
Enter the smart value
{{fieldChange.fromString}}
After you save and enable the rule, any unauthorized user making changes to the chosen fields will see those changes reverted to previous values if they refresh the work item in Jira.
Was this helpful?