Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Creating Projects via JSON Import

Josh Janusch June 30, 2021

I'm trying to build a tool that will export our Redmine data and process it into a format that can then be easily imported into Jira. I've built the script for exporting the Redmine data we need and now I'm just trying to figure out the import format Jira requires. The JSON documentation is sparse and outdated, to say the least. I've worked through a few problems (like requiring undocumented `template` and `type` fields), but I cannot figure out how to create projects when importing.

I am working with a slightly modified example from the documentation:

{
"projects": [
{
"name": "Sample data",
"key": "SAM",
"type": "business",
"template": "Project management",
"issues": [
{
"key" : "SAM-123",
"status" : "To Do",
"summary" : "Parent case",
"externalId": "123"
}
]
}
]
}

When I go to Settings -> System -> External System Import -> JSON and import that file, it presents me with this error:

Unexpected failure occurred. Importer will stop immediately. Data may be in an unstable state: Unable to create project: ExternalProject{id='null', key='SAM', externalName='null', name='Sample data', type='business', template='Project management'}: Invalid module key specified:

If I change the `key` field to a project key that already exists, it imports without issue so that seems to imply that I can't use a project whose Project Key does not already exist even though the docs seem to imply otherwise (emphasis mine):

You can assign a key to both the project and the issue. These keys can be different. This example will create a project with one issue, "SAM-123".

What am I doing wrong when trying to create these projects? We intend to import between tickets to around 300 projects, so being able to automatically create these will be crucial.

4 answers

1 accepted

3 votes
Answer accepted
William Crighton [CCC]
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.
July 22, 2015

oh yeah, my smart-ass answer to the original yes/no question......wait for it.....

YES. It is possible.

and I wonder why I don't get more points...

-wc

2 votes
William Crighton [CCC]
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.
July 22, 2015

Kai,

actually you may have inadvertently answered your own question, which I took to be 'how can I do this' rather than the simple yes/no 'can this be done'.

 

just go grab a demo license from my.atlassian.com (for JIRA only) and install it in your system. then install versions of the plugins you know are valid for the licenses you paid for...once it's all up and running switch out the  demo license for your expired one.

 

that should work. just be sure you get complete backups and don't install anything released outside your maintenance window.

-wc

 

0 votes
KaiS
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!
July 22, 2015

HI William, thanks for your reply. We had a regular Server Licence. Plugins that I would like to update to the latest status within the licence period are Jira Agile und Tempo Timesheet. On Confluence it would be the Gliffi plugin. I of cause don't expect this to work with demo or test licences...! :)

0 votes
William Crighton [CCC]
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.
July 21, 2015

Wow - that's a great question! One that I sadly do not know the answer to. Question - what type of license did you/do you have? If it was a demonstration license it'll probably not do much, but since you cannot even log into a server with an expired demo license that's probably not what you've got. One thing about it is that I believe it'll be rather more 3rd party plugin dependent rather than 'if it works for plugin A, then it'll work for the rest of the alphabet plugins'. This is because each plugin vendor (for sale through the ATL marketplace) implements the plugin license libraries - however that doesn't mean that every use case that's ok with Atlassian will be ok with the vendor. For example, when you have a demonstration license then Atlassian will allow you to run any Atlassian plugin regardless of plugin license user tier. Most plugins seem to respect this, but some plugins complain that the user tier's don't match and puke. (i.e. not start up and/or be very useful). Not the best use case but one that I've seen. If you export your database to sql, do a xml backup, backup your home directory - you'll have everything you need to stand the instance you have right now back up just like it was. So you could experiment if you're feeling lucky... -wc To your concern about hosing up your JIRA instance

Suggest an answer

Log in or Sign up to answer