Automation for Jira cannot publish an Automation rule with an error: "additional fields contains invalid field(s) in ‘update’ or ‘fields’ section: <Field_Name>"
Platform Notice: Data Center - This article applies to Atlassian products on the Data Center platform.
Note that this knowledge base article was created for the Data Center version of the product. Data Center knowledge base articles for non-Data Center-specific features may also work for Server versions of the product, however they have not been tested. 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
When configuring an automation rule in Jira, and trying to publish it - the following error may appear under Actions such as Edit Issue>More options>JSON payload, not allowing the rule to be published:
"additional fields contains invalid field(s) in ‘update’ or ‘fields’ section: <Field_Name>"
This error indicates that the field, which name appears in <Field_Name>, is not accessible to the Actor user set on the automation rule.
Diagnosis
An automation rule may have an Action to edit an Issue, and instead of indicating a field and a fixed value, one can use "More information" in the Action configuration, to set the value using a JSON payload, for example:
{ "update": { "Approvers" : [ { "add": {"name":"{{<smart_value>}}"} } ] } }
When attempting to publish the Automation rule, the error will show for the Action, and won't allow publishing it:
"additional fields contains invalid field(s) in ‘update’ or ‘fields’ section: Approvers"
If setting a different Jira user as Actor (the user to execute the rule by), the error may not show for one user but will show for another, even when both users have the exact same Permissions (including Application Access, Group membership, Project roles, Assets roles etc.)
The error is not showing any additional details in the application logs.
Cause
When an Automation rule is being published, the Action will be validated using the Actor user set on as rule's executor.
If the custom field, mentioned in the JSON, cannot be found by the Actor, the error will show:
- If there was a typo in the custom field's name, e.g. "Aprovers" instead of "Approvers" - in this case, the error will show for any user.
- If the Actor has a language preference set on their profile (e.g. Spanish), and the custom field has was translated to Spanish, the error will show, as "Approvers" is not a valid field for the Actor, due to translation.
Solution
There are 3 possible solutions:
Solution 1 (Recommended)
Solution:
- Identify the Custom Field ID of the Approvers field as explained in this KB article
- Go back to the automation rule
- In the JSON payload, use the generic "customfield_XXXXX" (XXXXX being the Approvers Custom Field ID identified in the 1st step)
Advantage of using this solution:
- This solution will work for any rule actor, regardless of their set language
Solution 2
Solution:
- Log into Jira as the Automation Rule actor,
- Navigate to the User's profile
- Set the User's language to English, so "Approvers" will be a valid field
Drawback of using this solution:
- The error may still appear for other fields, and existing rules may fail now.
Solution 3
Solution:
Use the translated field name in the JSON payload.
Drawback of using this solution:
- The error may appear for other fields, or, if the actor if changed later to another user who is using a different language in their profile