Forums

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

How can I preserve user accounts in Jira issue history while import data to Jira Cloud?

Ryan Clayton December 9, 2020

I'm using a JSON export from an on-prem Jira instance and trying to import issues to Jira Cloud. I have a script which maps onprem usernames to account ID's where necessary. I have everything working but issue history. Issue history will not read map the "author" field. I've tried the user's Jira Cloud Account ID, I've tried using their email address they have in Jira Cloud, and I've tried the on-prem username (the default). None of these work. Here's an anonymized example of an issue I'm trying to import.


"issues"
: [{
            "key""KEY-003",
            "summary""my summary",
            "reporter""onprem_username",
            "assignee""onprem_username",
            "description""my description",
            "issueType""Task",
            "status""To Do",
            "priority""Medium",
            "created"1607527233640,
            "updated"1607529461507,
            "watchers": ["x""y""z"],
            "history": [{
                "author""00000:12356489-777a-777a-777a-aaaaaaa",
                "created"1607527234157,
                "items": [{
                    "fieldType""custom",
                    "field""Epic Link",
                    "newValue""1004086",
                    "newDisplayValue""KEY-002"
                }]
            }]

Everything goes up fine except the "author" field in issue history, which just shows up as "user".

2 answers

0 votes
Ryan Clayton December 10, 2020

Known bug MIG-376. The work around used to be using the username, but username has been removed in Jira Cloud.

0 votes
Prince Nyeche
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.
December 10, 2020

Hi @Ryan Clayton 

Welcome to Community! Jira Cloud uses AccountId for any user identification this means for you to perform an import, it's either you change those user fields to "email_address" or a corresponding "accountId". Since you're importing from Server, I believe the JSON might be different for the author field. Try using a dictionary mapping instead! e.g.

"author": { 
"emailAddress": "me@example.com",
}
Ryan Clayton December 10, 2020

Changing "author" from a string to a JSON object breaks the importer in Jira Cloud.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events