Search code examples
jirajira-rest-apijira-pluginjira-rest-java-apipython-jira

Update Comment Author and Created using Jira python library


I have been able to create a comment but can't firgure out how to create it with a particualr author and timestamp. Ayone figure this out? This creates the comment:

newComment = jira.add_comment(newIssue, strComment)

Now I can't find a way to update the author or created time. I have tried the following to create a string with all three like they do for the csv import:

strComment = dtobj.strftime("%x %X %p") + ';' + comment.author.accountId + ';' + comment.body

Also tried using the update method:

newIssue.update(author=userhexid)

Solution

  • I think with on-prem REST API you can only add a comment with the current user as the author and the current date.

    https://docs.atlassian.com/software/jira/docs/api/REST/7.6.1/#api/2/issue-addComment