Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,556,244
Community Members
 
Community Events
184
Community Groups

How to add comments to existing Jira Service Desk Issues via API and preserve Comment Date and Time

Edited

This concerns data migration from a different Ticket system into Jira Service Desk.

I am able to import issues into Jira Service desk and am able to create comments for these issues via API, however, I want to preserve the comment 'added' Date Time in the comment, Currently, Jira uses the current Date/Time and also uses the User ID that is being used to log in.  How can we control what goes in that 'created' field using the API?

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.
Nov 28, 2019 • edited

I don't think it can be done. The time a comment was added was the time it was added and the person who added the comment was the person who added it.

The REST API can only lookup those values, not alter them, the same as if you were using the web interface.

Ok, thanks, I found that using the 'JSON External System Import' in lieu of the API solves this particular problem. Now on to figuring out how to import the 'Organizations' field using JSON?  Has anybody tackled this yet?

Like David_Bakkers likes this
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.
Dec 12, 2019

Thanks for the update. It's interesting that the JSON import method allows the author and created values to be set when the comment is being created, whereas the REST API doesn't.

The latest REST API docs say you can get and set the properties of a comment using the /rest/api/2/comment/{commentId}/properties/ endpoint. I just tried using that method to get all the properties of an existing comment, to know what I could set, but all that came back was an empty array called 'keys' with no sub-fields in it. That new REST API feature is marked as experimental, so maybe the functionality is yet to be properly implemented.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events