Automation rule: How to set the Category field in Jira business Project

For Atlassian eyes only

This article is Not Validated and cannot be shared with customers.

Platform Notice: Cloud - This article applies to Atlassian products on the cloud platform.

Summary

In Jira business projects, users can organise and break down the team's work by grouping issues into categories using the "Category" system field. More details can be found in the following documentation: Categorize items in your list view 

This article provides guidance on how to set the Category field to a specific value or copy it from the trigger issue using an automation rule in Jira.

Solution

To set the Category field, you need to use the Advanced field editing using JSON. Since the category field is  a Single Select field you can update it using the "id" or "value" property. The field 'Category' is no longer directly supported in the Advanced Edit in Jira Automation, hence we have to use the custom field ID to carry out the update operation under Advanced field editing using JSON.

Scenario 1 : Set the Category to a specific value

For example setting the Category field to have the value "Marketing" as shown in the below screenshot:

The below expression can be used:

{
"fields": {
"customfield_xxxxx": {"value": "Marketing"}
}
} 

Replace customfield_xxxxx with the actual ID of the "Category" field by navigating to https://sitename/secure/admin/ViewCustomFields.jspa

Scenario 2: Copy the category field from the trigger issue.

In this example, we will use the "id" property to copy the Category field from the trigger issue:

{
  "fields": {
    "customfield_xxxxx": {
      "id": "{{triggerissue.category.id}}"
    }
  }
} 

Replace customfield_xxxxx with the actual ID of the "Category" field by navigating to https://sitename/secure/admin/ViewCustomFields.jspa


(warning)  Please note that if you have a custom field named "category" or "Category" in your Jira instance, you might encounter issues when setting the system "Category" field using automation. To resolve this, consider renaming the custom field you created to avoid conflicts or you can use the custom field id instead as described in the following documentation Formatting smart values in jira automation:

{
"fields": {
"customField_10035": {"value": "Marketing"}
}
}



Last modified on Feb 3, 2025

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.