Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Once the project has been created - is there any way I can copy the configuration of an existing pro

Hello,

 

Once the project has been created - is there any way I can copy the configuration of an existing project to the one that has been created(the new one)? I am working on v8.5.1

Is there any plugin available or can it be done by any default feature available except for using Shared project Configuration?

Regards

Priyanka

1 answer

0 votes
Leo Community Leader Jan 28, 2020

Hi @Priyanka,

ScriptRunner plugin provides "Copy Project" option during new project creation. it works just like as Shared project configuration along with that you can copy Board, releases, component/s, etc...

If you want to copy schemes after creation, you can write custom groovy script to update them

 

BR,

Leo 

Hello @Leo 

Thank you for your reply but the issue is that we already have a template and the project is created using this template from backend, so we can not touch it. Once the project is created we need to configure it manually or rather copy the configuration from one project to another. how can this be avoided?

 

Regards

Priyanka

Leo Community Leader Jan 29, 2020

Hi @Priyanka,

I recently did a small script to change Permission scheme, if you modify that script to modify other schemes too, you can achieve your requirement

Hope this gives you some idea 

import com.atlassian.jira.project.Project
import com.atlassian.jira.project.ProjectManager
import com.atlassian.jira.project.AssigneeTypes
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.util.SimpleErrorCollection
import com.atlassian.jira.mail.Email
import com.atlassian.mail.server.SMTPMailServer

//Input needs here
def projects = ["LTP","LT","LEET"] // Projects Keys list to change schemes
String permission = "Permission Scheme" //Update permission scheme available in the current server

def errorCollection = new SimpleErrorCollection();
def currentUser = ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser()
def leadkey = currentUser.getKey()

def permissionScheme = null
try{
permissionScheme = ComponentAccessor.getPermissionSchemeManager().getSchemeObject(permission)
}catch(Exception e){
log.debug(e)
preData = "Invalid Permission Scheme to Move further on Archival"
}

if(permissionScheme){
projects.each{ pro ->
def project = null
try{
project = ComponentAccessor.getProjectManager().getProjectObjByKey(pro)
}catch(Exception e){
log.debug(e)
}
if(project){
//Removing current scheme to avoid some technical issuses
ComponentAccessor.getPermissionSchemeManager().removeSchemesFromProject(project)

//Mapping permission scheme
ComponentAccessor.getPermissionSchemeManager().addSchemeToProject(project, permissionScheme)
log.info("Updated details successfully $project.key")
}
}
}

 

 You can run this script in Script Console or if you want to automate this process for project creation event listener would be best choice 

 

BR,

Leo

hello @Leo 

Thankyou for your detailed answer. I really appreciate it, but I am afraid I can not use it as we do not have a script runner plugin. Can you advice?

 

Regards

Priyanka Khare

Leo Community Leader Jan 29, 2020

Maybe you can search in marketplace to find similar apps, as per my knowledge you can't do that with native system

Suggest an answer

Log in or Sign up to answer
TAGS

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you