Importing Jira Worklogs via the Systems->External System Import -> JSON Import function

Marcus Bittman
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!
February 22, 2025

Hi all - I’m trying to generate some test data that includes Jira worklogs in json for a time based project and then import that into Jira. I have the basic format working with the worklog importing and the worklogs tab next to history tab shows the correct dates for the date when the work was logged; however the history shows that the work was logged at the time of import instead of backdated to the actual time that was set in the worklogs. I’ve tried a bunch of things like 1) setting a created date on the worklogs, which was ignored 2) recreating the history in json too, which shows up as a new field called timespent (correct ID) instead of the Time Spent field seemingly indicating that jira sees it as a separate field. Has anyone made this work? Here’s the example json

incorrect_history.pngcorrect_worklog.png

{ "projects": [ { "name": "Test Project 103", "key": "TP103", "description": "Project description...", "type": "software", "components": [ "Controller Unit", "Structure formulas", "Financial", "Reports" ], "issues": [ { "summary" : "My Example Time Tracking issue123", "externalId": "1", "originalEstimate": "P1W3D", "timeSpent": "PT4H", "estimate": "P2D", "worklogs": [ { "author": "123432324", "comment": "Worklog", "startDate": "2012-08-31T17:59:02.161+0100", "timeSpent": "PT1M" }, { "author": "123432324", "startDate": "2012-08-31T17:59:02.161+0100", "timeSpent": "PT3H" } ] } ] } ] }


1 answer

0 votes
David Bakkers
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.
February 22, 2025

Hello @Marcus Bittman 

This is a well known problem and is actually by design.

Essentially, you can't use the External System Import function to create issues with certain 'fake' event history dates / times or post creation actions having been done by a specific person, because that would allow for fabricating / falsifying data records, which contravenes a wide range of basic security principals about records management.

If you Google 'jira external system import Issue history' you'll find lots of old threads on the topic such as this one. Also, if you search in JAC, you'll easily find the bug / feature requests such as JRACLOUD-82052 related to the same matter,

Marcus Bittman
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!
February 22, 2025

This works as expected on the story points side with history entries that change the value of story points, statuses, etc.  The dates on those entries in Jira reflect the dates in the json.  I would assume that would cause similar issues from a risk of fabricating data, but it works.  I suspect that they may just not support it on the worklog side or if they do, then it's some option I haven't tried.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events