How to import "Resolved" date for issues via JSON

Benjamin Marty September 3, 2014

Including a property named "resolved" or "resolutiondate" on an issue in a JSON import file yields a message like:

java.lang.RuntimeException: org.codehaus.jackson.map.exc.UnrecognizedPropertyException: Unrecognized field "resolutiondate" (Class com.atlassian.jira.plugins.importer.external.beans.ExternalIssue), not marked as ignorable

at [Source: java.io.StringReader@5fe3cffa; line: 29131, column: 36] (through reference chain: com.atlassian.jira.plugins.importer.external.beans.ExternalProject["issues"]->com.atlassian.jira.plugins.importer.external.beans.ExternalIssue["resolutiondate"])

How can the resolved date be set for issues imported via JSON import?

1 answer

2 votes
pborkowski
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 14, 2014

Hey Benjamin

Yes it's possible - "resolutiondate" property should be working. It's a part of issue object. Are you sure, you have put it in the proper place? I'm attaching below a working example of issue object (timestamp and simple date format should work fine):

{
                	"key"				: "VOT-2",
                    "priority"			: "Major",
                    "issueType" 		: "Task",
                    "reporter" 			: "sdv",
                    "assignee" 			: "sdv",
                    "summary" 			: "Issue with resolution",
                    "status" 			: "Closed",
                    "resolution" 		: "Resolved",
                    "resolutionDate" 	: 1388534400000,
                    "description" 	: "Issue without resolution",
                    "voters"		: [ "admin", "sdv" ]
                }
Benjamin Marty September 14, 2014

Was this documented anywhere? I was having problems simply because I could find no example as you have provided here. I see now that there were two problems with my method: 1 - I used all lowercase resolutiondate instead of resolutionDate, 2 - I was representing the date in string format. Is it required to represent the date as a Javascript timestamp?

Benjamin Marty September 14, 2014

Sorry, I see now after re-reading your comment that a simple date format should work like my other dates. So I guess my only problem was using resolutiondate instead of resolutionDate. I will hopefully get a change to try that correction this week.

pborkowski
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 14, 2014

We are trying to keep CAC page always up-to-date: https://confluence.atlassian.com/display/JIRA/Importing+Data+from+JSON. And there's no example of resolutionDate - I'll let know about that to our Documentation team, it should be added soon.

DJ January 4, 2019

3+ years later.  Document still not updated.  Sigh.

Jason Kemp February 5, 2019

Is there a known working value for this? If the key is "resolutionDate" the parser appears to accept the value, but nothing ever actually appears. It will even throw errors on the value if something is way off format, but the resolved date is never added into the issue after import.

Suggest an answer

Log in or Sign up to answer