Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How do I use the "author" property of the "Add Comment" API?

David Dietrich
Contributor
July 10, 2020

I am trying to send comments to Jira from ServiceNow using the "Add Comment" API described here: https://docs.atlassian.com/software/jira/docs/api/REST/8.10.0/#api/2/issue-addComment. The "Schema" shows the comment API has an "author" property:


"author": {
"$ref": "#/definitions/user"
}

How can I use this to set the comment author?

There is a very old thread which states this is impossible: https://community.atlassian.com/t5/Answers-Developer-Questions/Jira-REST-API-create-a-comment-as-another-user/qaq-p/481139.

Here is a more recent thread from three years ago which states the "author" field of the Add comment resource is not used by Jira to set the comment author: https://community.atlassian.com/t5/Jira-Core-questions/How-to-change-the-name-of-commentator-via-API/qaq-p/288157.

Is this still the case? If so, why does the "author" property exist?

For the record, this is the definition of the "author" property given in the Jira API docs:

"user": {
"title": "User",
"type": "object",
"properties": {
"name": {
"type": "string"
},
"key": {
"type": "string"
},
"emailAddress": {
"type": "string"
},
"avatarUrls": {
"type": "object",
"patternProperties": {
".+": {
"type": "string"
}
},
"additionalProperties": false
},
"displayName": {
"type": "string"
},
"active": {
"type": "boolean"
},
"timeZone": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"active"
]
}

 

0 answers

Suggest an answer

Log in or Sign up to answer