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

Deleted user April 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
Atlassian Team members are employees working across the company in a wide variety of roles.
April 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".

David McTavish September 18, 2019

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
TAGS
AUG Leaders

Atlassian Community Events