I share in this post my learnings and code regarding how to get a field value of a Jira issue in PowerBI/ PowerQuery.
Problem
When you don't know the solution it isn't very immediate to extract a field value of a Jira issue in PowerBI / PowerQuery M language.
Especially if you want a user-friendly robust way based on the Field name and not the Field Id.
Solution
See code in this gist
FieldName to FieldId
To get the mapping between Field Name and Field Id I use a call to Jira Rest API api/2/fieldIt will return a list of Records.
I convert it to a Table and Expand the two values 'id' and 'name'.
The way to make a lookup is by using Table.First(Table.SelectedRows...)
Get Field Value
To get the Field Value of a given Issue, I use the API call api/2/issue/IssueKey?fields=FieldId
This requires the Field Id, not the Field Name (Therefore previous step is required)
No comments:
Post a Comment