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
{
"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"
}
]
}
]
}
]
}