clone Project with JIRA command line interface

fjodors
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.
September 2, 2013

Hello

How can I clone project with ALL schemes, roles, etc...?

I am not able to clone project with all schemes using one command in jira command line.

e.g.

1) This command creates project from target with components, version, roles, notification, permission schemes, but issue type scheme and workflow scheme of created project are default!

jira --action cloneProject --project "Source" --toProject "Target" --name "Project from template" --copyVersions --copyRoleActors --copyComponents --permissionScheme "permission scheme" --notificationScheme "notification scheme" --issueTypeScheme "issue type scheme" --workflowScheme "WF scheme"

2)this command returns error:

parameter "project" can not be declared more than once

jira --action cloneProject --project "Sorce" --toProject "Target" --name "Project from template" --copyVersions --copyRoleActors --copyComponents --permissionScheme "permission scheme" --notificationScheme "notification scheme" --updateProject --project "Target" --issueTypeScheme "issue type scheme" --workflowScheme "WF scheme"

Is there any solution?

Thanks,

Fyodor

4 answers

1 accepted

1 vote
Answer accepted
Jim Birch
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.
September 3, 2013

I've just run into the same problem. I expected cloneProject to clone the issue types, workflow, screens, and field config with an option on the project actors, and (maybe) the issues. As in "I want a new project that works like existing project X" In our environment, the default schemes are what came with the product and we don't use them.

If Bob Swift is listening in he might like to comment on this.

An alternative is to use create project. This requires project (key) and lead, and, can set: name, description, url, defaultAssignee, permissionScheme, notificationScheme, issueSecurityScheme, workflowScheme, issueTypeScheme, issueTypeScreenScheme, fieldConfigurationScheme.

It's not as nice as a one-stop clone operation but you could set up some createProject scripts with perhaps some added copyActors operations.

Jim Birch
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.
September 3, 2013

Thanks Bob, you beat me to it.

I've created an improvement request: [https://bobswift.atlassian.net/browse/JCLI-420]. Add your votte

Bob Swift OSS (Bob Swift Atlassian Apps)
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.
September 3, 2013

You suggestion to create a run script is good. It provides the most flexibility for creating a new project based on the current support. Under the covers, cloneProject does some of that, so either cloneProject, updateProject, and some other actions or just start from scratch with create.

0 votes
fjodors
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.
September 5, 2013

Hi All

Thank you for advices, I think in my situation the best solution will be Script runner plugin, it provides the same action.

0 votes
Bob Swift OSS (Bob Swift Atlassian Apps)
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.
September 3, 2013
  1. Those 2 schemes are not currently supported on the cloneProject action. You can open an issue for an improvement. In the meantime, just run an follow-up updateProject action.
  2. You have 2 --project parameters on the action, remove one of them.
0 votes
Mizan
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.
September 2, 2013

You can also try Script runner plugin which provides a copy project feature .

https://jamieechlin.atlassian.net/wiki/display/GRV/Built-In+Scripts#Built-InScripts-CopyProject

Suggest an answer

Log in or Sign up to answer