It is not possible to clear (set to null) the Team custom field (customfield_11900) using Jira Cloud automation rules. When you try to set the field to null in an automation action (for example, using the advanced JSON editor), the value is not removed and the field remains unchanged. This is a current limitation of Jira Cloud automation, especially for certain custom fields like Team, and may also depend on your project configuration.
As a result:
The only way to clear or update the Team field to null is by using the Jira Cloud REST API (PUT /rest/api/3/issue/{issuekey}) with a payload like:
{
"fields": {
"customfield_11900": null
}
}
Note: This will only work if the field is not required in your field configuration.
To use the Jira Cloud REST API, you must generate a personal API token linked to your Atlassian account.
By default, API tokens expire after one year (365 days) and you will need to renew and update your scripts or integrations with a new token each time.
All changes made via the API are attributed to the user who owns the API token. There is no way to hide or change the author in the issue history.
Hello @Mohamed-Bachir LEMZAOUI
Welcome to the Atlassian community.
Are you referring to the native Team field?
If so, your conclusion is incomplete. This JSON code works to clear the field in an Automation rule for a Company Managed Software space in the Edit Work Item action on Jira Cloud.
Hello @Trudy Claspill ,
yes it is indeed the field Team jira native
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I see your simple use case.
In order to debug what is happening we need to see the entire rule.
Can you confirm for us that you are trying to change the native Team field, and not another custom field that is also named "Team"?
What is the Space type to which this rule applies; Business or Software or Service, Team-managed or Company-managed?
Can you use an Edit Work Item action instead of the Send Web Rest action, with the JSON code I provided? Then run the rule again and share with us all the details from the rule execution audit log?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This is a company-managed project. The purpose of the automation is to check whether the user selected in a User Picker field belongs to a specific Team, and then automatically populate the Team field with the correct value. We have around 200 users in this project and it’s difficult to manually identify which team each user belongs to, so this rule helps us assign the right team automatically.
When the Team field is empty, I can successfully set it via Automation (Advanced JSON) with:
{
"fields": {
"customfield_11900": "f968e26...2b0051e786"
}
}
This works without calling the REST API.
However, I’m not able to clear the Team field (set it to null) using Automation. I tested:
{
"fields": {
"customfield_11900": null
}
}
////////////////////////////////////////
{
"fields": {
"Team": null
}
}
In all cases, the automation audit log shows success, but the Team field remains unchanged. The only way I’ve been able to clear it is by using the Jira Cloud REST API.
Below the screenshot
Thank you
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Mohamed-Bachir LEMZAOUI
Thank you for the additional information.
You said the project is company-managed. The other aspect to the project type is if it is Business, Software, or Service. Which of those is this project?
Can you show us the rule execution audit log details for a run where you expected the field to be cleared, which the Edit Work Item action being used instead of the Send Web Request action?
I created a very simple rule to just clear the Team field, and with my JSON code it is working successfully.
Can you try creating the same rule and test it against a non-production issue in the same project you are currently working with?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for sharing your experience with the community. Atlassian now provides the option to create service accounts. Instead of using a person account the automation can now execute as the service account.
Additional information can be found in the link below:
https://support.atlassian.com/user-management/docs/understand-service-accounts/
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
here is my simple use case but not possible to do it without passing the Rest API
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Trudy ClaspillI found that the Field configuration Team are required ( Yes) !!!! :D
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I posted my last response with a copy of my simple rule before seeing your response that you found the root cause.
I'm glad you figured it out!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.