Hi,
I am trying to get the comment visibility of each comment in the comment section of the issue/ticket from the JIRA module provided in Python.
for example: author = jira.comment.author.displayName
time = jira.comment.created
like wise is there any method to get the visibility of each comment
Thanks in advance.
Not sure how by using that "Jira module for python". I assume you are referring to this: https://pypi.org/project/jira/
I don't see an example in their docs about getting what you want.
I never use that library. It's for people who don't want to do the work and who do not want the full spectrum of what the real Jira APIs provide.
If you know Python and APIs, you don't need that module.
Do this instead:
https://docs.atlassian.com/software/jira/docs/api/REST/7.6.1/#api/2/issue-getComments
returns the author, the time, the content, visibility
{
"startAt": 0,
"maxResults": 1,
"total": 1,
"comments": [
{
"self": "http://www.example.com/jira/rest/api/2/issue/10010/comment/10000",
"id": "10000",
"author": {
"self": "http://www.example.com/jira/rest/api/2/user?username=fred",
"name": "fred",
"displayName": "Fred F. User",
"active": false
},
"body": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque eget venenatis elit. Duis eu justo eget augue iaculis fermentum. Sed semper quam laoreet nisi egestas at posuere augue semper.",
"updateAuthor": {
"self": "http://www.example.com/jira/rest/api/2/user?username=fred",
"name": "fred",
"displayName": "Fred F. User",
"active": false
},
"created": "2017-12-07T09:23:19.175+0000",
"updated": "2017-12-07T09:23:19.175+0000",
"visibility": {
"type": "role",
"value": "Administrators"
}
}
]
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.