Skip to content

Instantly share code, notes, and snippets.

@tdalon
Created August 8, 2023 10:08
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tdalon/99da3c75d66ba81bf126992b3c3014cf to your computer and use it in GitHub Desktop.
Save tdalon/99da3c75d66ba81bf126992b3c3014cf to your computer and use it in GitHub Desktop.
Import Jira Epics with PowerQuery
let
JiraRootUrl = getNamedCellValue("JiraRootUrl"),
ProjectKey = getNamedCellValue("ProjectKey"),
Source = Json.Document(Web.Contents(JiraRootUrl & "/rest/api/2/search?jql=project=" & ProjectKey & " AND issuetype = Epic AND labels in ('process_improvement')")),
issues = Source[issues],
#"Converted to Table" = Table.FromList(issues, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
#"Expanded Column1" = Table.ExpandRecordColumn(#"Converted to Table", "Column1", { "fields","key"}, { "Column1.fields","EpicKey"}),
#"Expanded Column1.fields" = Table.ExpandRecordColumn(#"Expanded Column1", "Column1.fields", {"customfield_10104"}, {"Epic Name"})
in
#"Expanded Column1.fields"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment