Add components to Jira work items using automation
Platform Notice: Cloud Only - This article only applies to Atlassian products on the cloud platform.
Summary
Learn how to use Automation for Jira to add Components to work items.
Solution
Use Advanced field editing and JSON to add more components to the work item 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
1 2 3 4 5 6 7
{ "update": { "components": [{ "add": {"name": "Name of the Component"} }] } }
To add multiple components
1 2 3 4 5 6 7 8 9 10
{ "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?