cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Anonymous
Not applicable

JSON data from JIRA

Hi Everyone!

I'm trying to modify the code from the JIRA content pack because I need to show in my dashboard the Timetracking of the issues.
My schema in JSON is like that:

 

expand	"schema,names"
startAt	0
maxResults	50
total	8201
issues	{
 0
      {
expand "operations,versionedRepr…nsitions,renderedFields" id "16605" self "http://jira.mycompany.com/rest/api/2/issue/16605" key "TZIR-1" fields issuetype Object components [] timespent 111600 timeoriginalestimate null description null project Object fixVersions [] aggregatetimespent 111600 resolution null workratio -1 summary "Bla bla bla" ...
} 1 Object {} 2 Object {} 3 Object {} 4 Object {} 5 Object {} 6 Object {} 7 Object {} 8 Object {} 9 Object {} 10 Object {}

}

 

 

The only way that I see to show the timetracking of every issue is taking the url of every issue and using it to take the field that I need . So I need to go over all issues and taking the field "self" but I don't know how to do it in Power Query.

Any help please?

Thanks.

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Microsoft
Microsoft

Re: JSON data from JIRA

Hi @Anonymous,

 

If I understand you correctly, you can firstly try inserting all the urls(or just issure ids) into a new table.

 

Then, create a function using syntax like below.

let functionName = (param1 as datatype) =>
let
 Source = Json.Document(Web.Contents("http://jira.mycompany.com/rest/api/2/issue/" & param1).
in
 Source
in functionName

After you have inserted the urls into a new table, then you can add a custom column to the table that calls/invokes the function above. Smiley Happy

 

Reference:
http://datachix.com/2014/05/22/power-query-functions-some-scenarios/

http://satalyst.com/power-query-creating-a-parameterized-function-in-m/

 

 

Regards

View solution in original post

2 REPLIES 2
Highlighted
Microsoft
Microsoft

Re: JSON data from JIRA

Hi @Anonymous,

 

If I understand you correctly, you can firstly try inserting all the urls(or just issure ids) into a new table.

 

Then, create a function using syntax like below.

let functionName = (param1 as datatype) =>
let
 Source = Json.Document(Web.Contents("http://jira.mycompany.com/rest/api/2/issue/" & param1).
in
 Source
in functionName

After you have inserted the urls into a new table, then you can add a custom column to the table that calls/invokes the function above. Smiley Happy

 

Reference:
http://datachix.com/2014/05/22/power-query-functions-some-scenarios/

http://satalyst.com/power-query-creating-a-parameterized-function-in-m/

 

 

Regards

View solution in original post

Highlighted
Anonymous
Not applicable

Re: JSON data from JIRA

Thanks @v-ljerr-msft!

The second link gives me the solution.
It was easier than I thought.


You made me happy on Friday. Smiley Wink

Helpful resources

Announcements
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

July 2020 Community Highlights

July 2020 Community Highlights

Learn about the exciting things that happened in July.

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

We are thrilled to announce we will begin running a monthly webinar series named Power BI Dev Camp.

Power BI Desktop August 2020 Update

Power BI Desktop August 2020 Update

We have great updates this month! Click the link for the video with more info.

Top Solution Authors
Top Kudoed Authors