Hello,
On checking the already answered questions, I found we need to write a REST API script to copy components from one project to other - https://community.atlassian.com/t5/Jira-Core-questions/Is-there-a-way-to-copy-components-from-one-Jira-project-to/qaq-p/154879
But, we do not have any technical admins managing Jira in our organization. Is there any other simpler way to perform this activity. For now, the requirement is to copy 335 components from one project to other.
Thank you in advance.
We've used an alternative method before. You had to be a Site Admin to do this, but it worked as required - see this link here.
To get the list of components you could either:
Ste
Hi Stephen,
Thank you for your response. I will try this.
Also, Is it possible to Move Backlog items of Next Gen project to Classical Project in Bulk.?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can move issues between projects using the bulk issue editor - to do this:
As you're moving from Next-Gen to Classic there is sometimes some duplication (eg. having to confirm the target project multiple times for the same issue type). Just go through and select for each and it'll be fine.
Ste
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Stephen,
Thank you. It worked.
Regards,
Nandhini Chandrasekar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Since this post is the #1 result in google for "copy components Jira Cloud" I figured I would post a script you can run in Scriptrunner for Jira cloud.
This is by no means perfect, but it will copy name, description, lead (if there is a lead)
Dont forget to get the proper Project ID!
StringBuilder output = new StringBuilder()
//copy the component TO this project
def jiraProject = "JRA"
//get list of components FROM, you will need the project ID instead of 10101
// this can be retrieved from the URL in Project/Details
def components = get('/rest/api/3/project/10101/components').asObject(List).body
//placeholder for rest results
def result
// go through each component in the list
components.each { component ->
//check if the Lead has a value
if (component.lead!=null){
result = post('/rest/api/3/component')
.header('Content-Type', 'application/json')
.body( [
name: component.name,
description: component.description,
leadAccountId: component.lead.accountId,
project: jiraProject
])
.asJson()
} else {
result = post('/rest/api/3/component')
.header('Content-Type', 'application/json')
.body( [
name: component.name,
description: component.description,
project: jiraProject
])
.asJson()
}
output << component.name + " : " + result.status + ", "
}
//output for Result instead of in Logs
output.toString()
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This works very well, Only we need to provide To and From.
I feel this should be included in default built inscript of script runner or could be added in library script by Adaptavist.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.