It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to import comments properties or visibility with Jira Json import tool?

Deleted user Apr 13, 2018

"projects": [
{
"name": "Sample data",
"key": "SUPPORT",
"issues": [
{
"status" : "Closed",
"reporter" : "admin",
"summary" : "Imported Request 3",
"comments": [
{
"body": "This is a comment from admin 5 days ago",
"author": "admin",
"created": "2012-08-31T17:59:02.161+0100"
},
{
"body": "Internal",
"author": "admin",
"properties":{"key":"sd.public.comment","value":{"internal":true}},
"visibility": {
"type": "role",
"value": "Administrators"
},
"created": "2012-08-31T17:59:02.161+0100"
}
]
}
]
}
]
}

How to import comments properties or visibility with Jira Json import tool?
Now this data ignored and create public comment.
Who can help with this.

 

1 answer

0 votes
Tzu Hau Chai Atlassian Team Apr 15, 2018

The JSON importer does not support setting the comment visibility: https://jira.atlassian.com/browse/JRASERVER-64584

You will probably need to resort to database manipulation unless you can find another third party import tool that supports this.

Whether a comment is internal is determined by two properties "CommentProperty" & "sd.comment.property", if you run the following SQL query (entity_id is the comment ID):

 SELECT * FROM entity_property where entity_id = 11111 AND property_key = 'sd.public.comment' 

 You should get two entries if it is an internal comment:

10000;"sd.comment.property";11111;"sd.public.comment";"2018-03-10 09:26:57.44+08";"2018-03-10 09:45:35.307+08";"{"internal":true}" 
10001;"CommentProperty";11111;"sd.public.comment";"2018-03-10 09:26:57.351+08";"2018-03-10 09:56:33.188+08";"{"internal":true}"

As far as I am aware, "sd.comment.property" can be set via REST API http://<baseurl.com>/rest/api/2/comment/<comment_id>/properties/sd.public.comment/, but unfortunately not "CommentProperty".

so how do you set CommentProperty?! toggling the sd.public.comment doesn't actually work without both being set, so this is not helpful as an answer

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Jira

The add-in you’ve been waiting for: Jira Cloud for Excel 🙌

Introducing Jira Cloud for Excel Here at the product integrations team at Atlassian, we are thrilled to announce the new Jira Cloud for Excel add-in! This add-in lets you export Jira data directly ...

841 views 5 22
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you