How to bulk import Components into Jira Projects and Issues
Platform Notice: Cloud Only - This article applies to Atlassian products on the cloud platform.
Summary
This article discusses how you can use the CSV issue import to update components for issue tickets.
- Please note that this solution only works when using the CSV import available from the page ⚙ > System > Import & Export > External System Import, which only Jira Administrators can access.
- If you use the CSV import available from the page Filters > View All Issues > Three dots icon > Import Issues from CSV, the suggestion from the KB article will not work, and components will not be imported due to the error "The component <Component 1> doesn't exist in this project and can't be added".
Make sure that Jira Components, instead of Compass Components, are selected in the project before proceeding.
Solution
The in-built CSV Issue Import functionality can be used to bulk-import components into JIRA. This method will only import the Component Names. If you need to add a Component Description as well, you could use the Jira Cloud API - POST Create component.
Option 1
- Login as a Jira Administrator user.
- Select the required Jira project.
Create a temporary issue that you would use for the import. You can provide a summary like "Issue for importing components".
Create a CSV file with multiple lines using the same Issue Key, Summary can be left blank, and different Component Names on different lines.
issuekey,summary,component DT-2,,component1 DT-2,,component2 DT-2,,component3
- Use the CSV importer from the page ⚙ > System > Import & Export > External System Import to import the CSV file.
Map the fields as required and complete the import.
- Delete the temporary issue with the Summary as in the CSV file.
Option 2
Create a CSV file having a single line with the multiple components as this example. In this case it would create a new issue with all the components.
summary,component,component,component Issue for importing components,component1,component2,component3
- Use the CSV importer from the page ⚙ > System > Import & Export > External System Import to import the CSV file
Map the fields as required and complete the import.
- Delete the temporary issue with the Summary as in the CSV file
At the end of the import, the following message will be shown. The Components will still be imported, but without a component lead.
If you'd like to add a component lead:
- Access the project where the components have been imported.
- Go to the Components page.
- Click on the three dots icon > edit and select a component lead.