How to add a "Comments" also while exporting data from JIRA to Power BI via Rest API connection?

Rishabh Deshmukh August 16, 2022

It is missing "Comments" while exporting data from Jira to Power BI via Rest API Connection. We do have comments for each issues/incidents/alerts that i want to include as well in the exported data to Power BI.

1 answer

1 vote
Dmytro Kvashenko _DOIT-BI_
Contributor
August 16, 2022

Hi @Rishabh Deshmukh 

If you use the /rest/api/3/search endpoint to get a list of Issues, then you can get comments from the response.
An example response from Jira would be as follows:

{
"expand": "names,schema",
"startAt": 0,
"maxResults": 50,
"total": 1,
"issues": [
{
"expand": "",
"id": "10002",
"self": "https://your-domain.atlassian.net/rest/api/3/issue/10002",
"key": "ED-1",
"fields": {
"comment": [
{
"self": "https://your-domain.atlassian.net/rest/api/3/issue/10010/comment/10000",
"id": "10000",
"author": {
"self": "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g",
"accountId": "5b10a2844c20165700ede21g",
"displayName": "Mia Krystof",
"active": false
},
"body": {
"type": "doc",
"version": 1,
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "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": "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g",
"accountId": "5b10a2844c20165700ede21g",
"displayName": "Mia Krystof",
"active": false
},
"created": "2021-01-17T12:34:00.000+0000",
"updated": "2021-01-18T23:45:00.000+0000",
"visibility": {
"type": "role",
"value": "Administrators",
"identifier": "Administrators"
}
}
]
}
}
]}

You can learn more about this endpoint here.

You can also use the following endpoints:

GET /rest/api/3/issue/{issueIdOrKey}/comment - https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-comments/#api-rest-api-3-issue-issueidorkey-comment-get

GET /rest/api/3/issue/{issueIdOrKey}/comment/{id} - https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-comments/#api-rest-api-3-issue-issueidorkey-comment-id-get 

POST /rest/api/3/comment/list - https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-comments/#api-rest-api-3-comment-list-post


I recommend that you test the Microsoft Power BI Connector for Jira plugin. With it, you can get the data you need to build reports in Power BI in two clicks. The plugin has a clear interface and you will not have to experience difficulties when uploading data to Power BI.
You can contact us at support@doit-bi.com if you have any difficulties

Best regards,
Demi Kont

Rishabh Deshmukh August 17, 2022

Thanks Demi, for quick response.

Rishabh Deshmukh August 17, 2022

In my case, in the response, after "fields" i am getting a long list of custom coloumns instead of "Comments". Also currently using rest/api/2, i tried rest/api/3 but it seems to be not working in our Power BI.

Also, it looks like only Jira Admins have the access to install Microsoft Jira Connector for Power BI. But is surely the best way.

Do we have any chance kind of to add comments in one of the custom coloumns?

Thanks,
Rishabh

Dmytro Kvashenko _DOIT-BI_
Contributor
August 17, 2022

Hi @Rishabh Deshmukh ,

Above, I indicated an example response from Jira which may contain a comment field, it comes as an array.

You are right about the Microsoft Power BI Connector for Jira plugin, only Jira Administator can install plugins on your Jira instance. You can ask your Jira Administrator to install the plugin and give you access to use it via the "Access Configuration" tab.

Contact us at support@doit-bi.com for additional questions.

Best regards,
Demi

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events