How do you copy components from one project to another?

Sondra Menthers
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 12, 2024

We want to set up several projects with the same components, how can we do this?

5 answers

1 vote
emre
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 16, 2024

     Hi @Sondra Menthers 

     We have an app that provides this feature you want. 

     In the application, all components are automatically added to the Subcomponents page as content. To move these components to another project, you can press the export button and download the json file to your computer. The picture below is an image of the subcomponents page in the Configuration Management Toolkit app in one of my projects and you can do the export as in the photo.

export-components.jpg

     Then, to open a new project and import that json file, you need to click on the subcomponents page in the new project and press the import button. Then you should upload the exported file there. Then you will see this image when you load it. import screen.jpg

    Then when you press the import button, all your components will be added to the existing project and saved in Jira. 

     For more details about app: https://thestarware.atlassian.net/wiki/spaces/CBSVC/pages/2287698054/Importing+Exporting+Subcomponents 

     Application (add-on) link: https://marketplace.atlassian.com/apps/1211825/software-configuration-management-toolkit?hosting=cloud&tab=overview 

     Disclaimer: I work for the vendor who built this app.

 

1 vote
Kalyan Sattaluri
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 12, 2024

Hello @Sondra Menthers 

If ask is using automation, you could, using Send Web request and Advanced Branching to copy these over.

  1. Trigger = Scheduled
  2. Action - Send Web request and get components from source project
  3. Create a variable and store destination project KEY
  4. Advanced Branch over {{webResponse.body}}
  5. Action-Send Web request and create components to destination project

Repeat above steps for each project by change #3's variable for destination project. 

Havent tried doing this but seems logical, do try and let us know if issues or are stuck.

Guy Anela April 18, 2024

Created an Automation Rule for this today and it worked like a charm! :) Thanks, @Kalyan Sattaluri!

 Here's a screenshot of the Rule...

CopyComponentsExample.png

Here's the configuration for the For each; Advanced branching step...

CopyComponentsExample2.png

 

Anyhow, hope someone else finds this helpful. Cheers!

Thanks again, Kalyan!

Like # people like this
Kalyan Sattaluri
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 18, 2024

Awesome and thanks for sharing the rule. do consider accepting answer so that your solution surfaces in google searches and others can benefit in the future. Thanks!

0 votes
Deniz Oğuz
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 17, 2024

Hi,

You can use our Jira CLI too, AtlasCLI for Jira to copy all project components from one project to another. You can use the tool for synchronization too, because it will just skip over the existing components and continue to create missing ones.

jira project-component get-all --project=OLD_PROJECT_KEY | awk 'NR>2 {print $2}' | xargs -I {} jira project-component create --name="{}" --pKey=NEW_PROJECT_KEY

Just replace OLD_PROJECT_KEY and NEW_PROJECT_KEY with actual names of your projects. If you want, you can also override information for each component by passing other flags to "jira project-component create" command. Of course, you can also manipulate the component name and a project specific prefix/suffix if you want. To find out all the accepted parameters you can use the following command.

jira project-component create --help

 

Disclaimer: I work for the vendor who built this app.

0 votes
Ste Wright
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 12, 2024

Hi @Sondra Menthers 

There's a few options here...

Ste

0 votes
Victor Law
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 12, 2024

Hi @Sondra Menthers

Jira does not support component clones natively across multiple projects.

However, it is possible to bulk-create the same set of Components via the ScriptRunner app:

 

https://library.adaptavist.com/entity/bulk-create-components-in-a-project

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events