Create Multiple Projects using a script

Jo-Anne MacLeod
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 22, 2011

I have a requirement to create a lot of projects in JIRA. Too many projects to be able to do them manually. I have a source file that has all the project information (name, key, notification scheme, security, workflow, project lead, category, etc). Using the CVS importer I cannot populate all of the fields that I need to. It looks like Jelly may do more of what I want, but it still doesn’t allow all of the fields in the project to be populated. I’m wondering if I am approaching this from the wrong angle. Does anyone else have thoughts on how I may be able to automate the creation of all of these projects, without having to do a ton of manual cleanup afterwards. Please note, that this is a one time action so it doesn’t have to be anything too elegant.

Thoughts?

1 answer

0 votes
JamieA
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 22, 2011

Personally I would write a groovy script but if that's not your thing you could do with the JIRA CLI. Quite possibly that won't let you set the schemes you need to but Bob would have a better idea. Worth a look.

Jo-Anne MacLeod
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 22, 2011

Ya, I had looked at the CLI, but it also doesn't do everything that I am looking for. I'm not familar enough with Groovy to figure out if that would work. I did look at it hoping that there may be an example. Didn't see one though. Looks like I may have to learn Groovy.

Thanks for the suggestions though

JamieA
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 22, 2011

Writing a groovy script is an option, but creating a project is a hard place to start because it involves lots of maanger classes for all the schemes. If you're looking for "not elegant" I'd think just take a look at using curl/wget - do it before upgrading to 4.4 because it's 10 times more clicks to create a project in 4.4.

Jo-Anne MacLeod
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 22, 2011

I've never done that before, but if its simplier than a groovy script then I'll certainly take a look at it. Thanks for the tips.

Bob Swift
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 22, 2011

For the JIRA CLI , create an issue with what you think it is missing. Eventually it will improve as the JIRA APIs cover more stuff. Currently it only supports a few of the schemes for a project. You can also create the project with the CLI and then update it with a groovy script or similar to get at things that aren't supported yet.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events