Forum Discussion
Please help clean Jira connector code
Hi alexey-denisov ,
Solved: JIRA to Power BI - Microsoft Power BI Community
Maybe you can use rest api.
Best regards,
Lionel Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi v-lionel-msft !
Unfortunately my code has more data than the paid Jira plugin you've mentioned.
In fact my error is related to the columns expanding operations that I have.
Duplicating the columns with the names "completedCycles" (or else in the Expand steps) causes Power BI Desktop App to crash.
If I delete customfield_10038 everything works good.
So please help me understand how to get the values from the field
customfiled_10038->completedCycles->stopTime->iso8601 in Hour format
in a more direct way within (if possible) only 1 line.
The part of Jira JSON for those customfields look like:
"customfield_10038": {
"id": "47",
"name": "Time to first response",
"_links": {
"self": "https://_domain_.atlassian.net/rest/servicedeskapi/request/30425/sla/47"
},
"completedCycles": [
{
"startTime": {
"iso8601": "2021-03-21T17:08:56+0300",
"jira": "2021-03-21T17:08:56.247+0300",
"friendly": "21.03.2021 17:08",
"epochMillis": 1616335736247
},
"stopTime": {
"iso8601": "2021-03-21T17:10:02+0300",
"jira": "2021-03-21T17:10:02.669+0300",
"friendly": "21.03.2021 17:10",
"epochMillis": 1616335802669
},
"breached": false,
"goalDuration": {
"millis": 1800000,
"friendly": "30m"
},
"elapsedTime": {
"millis": 66422,
"friendly": "1m"
},
"remainingTime": {
"millis": 1733578,
"friendly": "28m"
}
}
]
},
and
"customfield_10037": {
"id": "49",
"name": "Time to resolution",
"_links": {
"self": "https://_domain_.atlassian.net/rest/servicedeskapi/request/30425/sla/49"
},
"completedCycles": [
{
"startTime": {
"iso8601": "2021-03-21T17:08:56+0300",
"jira": "2021-03-21T17:08:56.247+0300",
"friendly": "21.03.2021 17:08",
"epochMillis": 1616335736247
},
"stopTime": {
"iso8601": "2021-03-21T17:19:16+0300",
"jira": "2021-03-21T17:19:16.300+0300",
"friendly": "21.03.2021 17:19",
"epochMillis": 1616336356300
},
"breached": false,
"goalDuration": {
"millis": 86400000,
"friendly": "24h"
},
"elapsedTime": {
"millis": 620053,
"friendly": "10m"
},
"remainingTime": {
"millis": 85779947,
"friendly": "23h 49m"
}
},
{
"startTime": {
"iso8601": "2021-03-22T15:57:49+0300",
"jira": "2021-03-22T15:57:49.056+0300",
"friendly": "22.03.2021 15:57",
"epochMillis": 1616417869056
},
"stopTime": {
"iso8601": "2021-03-22T15:57:54+0300",
"jira": "2021-03-22T15:57:54.510+0300",
"friendly": "22.03.2021 15:57",
"epochMillis": 1616417874510
},
"breached": false,
"goalDuration": {
"millis": 86400000,
"friendly": "24h"
},
"elapsedTime": {
"millis": 5454,
"friendly": "0m"
},
"remainingTime": {
"millis": 86394546,
"friendly": "23h 59m"
}
},
{
"startTime": {
"iso8601": "2021-03-22T16:17:44+0300",
"jira": "2021-03-22T16:17:44.969+0300",
"friendly": "22.03.2021 16:17",
"epochMillis": 1616419064969
},
"stopTime": {
"iso8601": "2021-03-22T16:17:51+0300",
"jira": "2021-03-22T16:17:51.542+0300",
"friendly": "22.03.2021 16:17",
"epochMillis": 1616419071542
},
"breached": false,
"goalDuration": {
"millis": 86400000,
"friendly": "24h"
},
"elapsedTime": {
"millis": 6573,
"friendly": "0m"
},
"remainingTime": {
"millis": 86393427,
"friendly": "23h 59m"
}
},
{
"startTime": {
"iso8601": "2021-03-22T16:17:54+0300",
"jira": "2021-03-22T16:17:54.947+0300",
"friendly": "22.03.2021 16:17",
"epochMillis": 1616419074947
},
"stopTime": {
"iso8601": "2021-03-26T12:49:58+0300",
"jira": "2021-03-26T12:49:58.038+0300",
"friendly": "26.03.2021 12:49",
"epochMillis": 1616752198038
},
"breached": true,
"goalDuration": {
"millis": 86400000,
"friendly": "24h"
},
"elapsedTime": {
"millis": 333123091,
"friendly": "92h 32m"
},
"remainingTime": {
"millis": -246723091,
"friendly": "-68h 32m"
}
},
{
"startTime": {
"iso8601": "2021-03-26T15:26:02+0300",
"jira": "2021-03-26T15:26:02.225+0300",
"friendly": "26.03.2021 15:26",
"epochMillis": 1616761562225
},
"stopTime": {
"iso8601": "2021-03-26T15:44:19+0300",
"jira": "2021-03-26T15:44:19.302+0300",
"friendly": "26.03.2021 15:44",
"epochMillis": 1616762659302
},
"breached": false,
"goalDuration": {
"millis": 86400000,
"friendly": "24h"
},
"elapsedTime": {
"millis": 1097077,
"friendly": "18m"
},
"remainingTime": {
"millis": 85302923,
"friendly": "23h 41m"
}
}
]
},