Add components to Jira issues using automation
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs 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
Learn how to use Automation for Jira to add Components to issues.
Solution
Use Advanced field editing and JSON to add more components to the issues without overwriting the existing ones.
Use JSON in automation to include components
In your automation rule, use the Edit issue action.
Click More options to expand the Additional fields section.
Use JSON in the following format:
To add a single component
{ "update": { "components": [{ "add": {"name": "Name of the Component"} }] } }
To add multiple components
{ "update": { "components": [{ "add": {"name": "Name of the Component"} }, { "add": {"name": "Name of another Component and so on"} }] } }
The JSON is case-sensitive. Make sure the name of the existing component matches the components in your project.
Find more details at Advanced field editing using JSON.
When adding Components using multiple Edit issue actions in an automation rule, use the Re-fetch work item data action before each to ensure all edits are applied. Otherwise, only the last issue edit action will work.
Was this helpful?