June 30, 2022

PowerBI/ PowerQuery: How to get Jira Issue Field Value by Name

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/field

It 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)

See also

Jira to Power BI (Improved version) | Thierry Dalon's Blog

No comments:

Post a Comment