Forum Discussion
Import JIRA Custom Fields using Powerbi's JIRA Connector
- Anonymous8 years ago
johanhallin,
Do you want to directly transform the list to Text and split Text without "Extract values"? If so, I am afraid that it is not possible.
Regards,
Lydia
I managed to clean up the advanced editor today after reading this post: https://community.powerbi.com/t5/Service/Import-JIRA-Custom-Fields-using-Powerbi-s-JIRA-Connector/td-p/93088/page/2
Here is the new query that seesm to work (waiting for the final update).
let
Source = FetchPages("", 500),
#"Expanded Column1" = Table.ExpandRecordColumn(Source, "Column1", {"expand", "id", "self", "key", "fields"}, {"expand", "id", "self", "key", "fields"}),
#"Expanded fields" = Table.ExpandRecordColumn(#"Expanded Column1", "fields",
{"issuetype", "timespent", "project", "fixVersions", "aggregatetimespent", "resolution", "customfield_10530", "customfield_14202", "customfield_10511", "customfield_15118", "resolutiondate", "workratio", "lastViewed", "watches", "created", "priority", "labels", "timeestimate", "aggregatetimeoriginalestimate", "versions", "issuelinks", "assignee", "updated", "status", "components", "timeoriginalestimate", "description", "aggregatetimeestimate", "summary", "creator", "subtasks", "reporter", "aggregateprogress", "environment", "duedate", "progress", "votes", "parent"},
{"issuetype", "timespent", "project", "fixVersions", "aggregatetimespent", "resolution", "Customer", "Overdue_Status", "Product_Area", "Incident_classification", "resolutiondate", "workratio", "lastViewed", "watches", "created", "priority", "labels", "timeestimate", "aggregatetimeoriginalestimate", "versions", "issuelinks", "assignee", "updated", "status", "components", "timeoriginalestimate", "description", "aggregatetimeestimate", "summary", "creator", "subtasks", "reporter", "aggregateprogress", "environment", "duedate", "progress", "votes", "parent"}),
#"Expanded components" = Table.ExpandListColumn(#"Expanded fields", "components"),
#"Expanded components1" = Table.ExpandRecordColumn(#"Expanded components", "components", {"name"}, {"components.name"}),
#"Expanded fixVersions" = Table.ExpandListColumn(#"Expanded components1", "fixVersions"),
#"Expanded fixVersions1" = Table.ExpandRecordColumn(#"Expanded fixVersions", "fixVersions", {"name"}, {"fixVersions.name"}),
#"Removed Columns" = Table.RemoveColumns(#"Expanded fixVersions1",{"expand"}),
#"Filtered Rows" = Table.SelectRows(#"Removed Columns", each [id] <> null and [id] <> ""),
#"Expanded issuetype" = Table.ExpandRecordColumn(#"Filtered Rows", "issuetype", {"name", "subtask"}, {"issuetype.name", "issuetype.subtask"}),
#"Renamed Columns" = Table.RenameColumns(#"Expanded issuetype",{{"issuetype.name", "issuetype"}, {"issuetype.subtask", "isSubtask"}}),
#"Expanded project" = Table.ExpandRecordColumn(#"Renamed Columns", "project", {"id", "key", "name"}, {"project.id", "project.key", "project.name"}),
#"Expanded watches" = Table.ExpandRecordColumn(#"Expanded project", "watches", {"isWatching"}, {"isWatching"}),
#"Expanded priority" = Table.ExpandRecordColumn(#"Expanded watches", "priority", {"name"}, {"name"}),
#"Renamed Columns1" = Table.RenameColumns(#"Expanded priority",{{"name", "priority"}}),
#"Expanded labels" = Table.ExpandListColumn(#"Renamed Columns1", "labels"),
#"Removed Columns3" = Table.RemoveColumns(#"Expanded labels",{"labels", "versions", "issuelinks"}),
#"Expanded assignee" = Table.ExpandRecordColumn(#"Removed Columns3", "assignee", {"name", "emailAddress", "displayName", "active"}, {"assignee.name", "assignee.emailAddress", "assignee.displayName", "assignee.active"}),
#"Renamed Columns2" = Table.RenameColumns(#"Expanded assignee",{{"assignee.displayName", "assignee"}, {"resolutiondate", "resolution date"}}),
#"Expanded status" = Table.ExpandRecordColumn(#"Renamed Columns2", "status", {"name", "statusCategory"}, {"status.name", "status.statusCategory"}),
#"Expanded status.statusCategory" = Table.ExpandRecordColumn(#"Expanded status", "status.statusCategory", {"colorName", "name"}, {"status.statusCategory.colorName", "status.statusCategory.name"}),
#"Removed Columns4" = Table.RemoveColumns(#"Expanded status.statusCategory",{"subtasks"}),
#"Expanded reporter" = Table.ExpandRecordColumn(#"Removed Columns4", "reporter", {"name", "emailAddress", "displayName", "active"}, {"reporter.name", "reporter.emailAddress", "reporter.displayName", "reporter.active"}),
#"Expanded aggregateprogress" = Table.ExpandRecordColumn(#"Expanded reporter", "aggregateprogress", {"progress", "total"}, {"aggregateprogress.progress", "aggregateprogress.total"}),
#"Expanded progress" = Table.ExpandRecordColumn(#"Expanded aggregateprogress", "progress", {"progress", "total"}, {"progress.progress", "progress.total"}),
#"Expanded votes" = Table.ExpandRecordColumn(#"Expanded progress", "votes", {"votes"}, {"votes.votes"}),
#"Expanded parent" = Table.ExpandRecordColumn(#"Expanded votes", "parent", {"id"}, {"parent.id"}),
#"Changed Type" = Table.TransformColumnTypes(#"Expanded parent",{{"resolution date", type datetimezone}, {"created", type datetimezone}, {"updated", type datetimezone}}),
#"Expanded resolution" = Table.ExpandRecordColumn(#"Changed Type", "resolution", {"name"}, {"resolution.name"}),
#"Expanded Customer" = Table.ExpandRecordColumn(#"Expanded resolution", "Customer", {"value"}, {"Customer.value"}),
#"Expanded Incident_Classification" = Table.ExpandRecordColumn(#"Expanded Customer", "Incident_classification", {"value"}, {"Incident_classification.value"}),
#"Expanded Product_Area" = Table.ExpandRecordColumn(#"Expanded Incident_Classification", "Product_Area", {"value"}, {"Product_Area.value"})
in
#"Expanded Product_Area"The "Incident_Clarification fields that was a [Record] (question 1) seems to be expanded now but I have not solved question 2 ([List] problem for SLA_Overdue yet...
Kind regard,
Johan
johanhallin,
Extract value from the list column and then use "Split column" feature in Power BI, you can review the following screenshots.
If you have any questions, please post sample data of the list column. Do mask sensitive data before uploading sample data.
Regards,
Lydia
- johanhallin8 years agoFrequent Visitor
Hi,
that could work but I don't really like it. The problem is that I don't know how many items there is in the list. 95% of the time, it would be just one value. But it could be two values. In the future it could be many more values depending on how we set it up in Jira.
The values are text strings structured as:
"P1 Response: 1d 2h 32m 34s""P2 Resolution: 32d 14h 2m 12s".
So I would prefer the values to be translated to a text (string), maybe with seperated by a colon or semi-colon or something. Is that possible?
- Anonymous8 years agoNot applicable
johanhallin,
Do you want to directly transform the list to Text and split Text without "Extract values"? If so, I am afraid that it is not possible.
Regards,
Lydia- johanhallin8 years agoFrequent Visitor
Ahh...ok! To bad but now I know that I'm not missing anything. I'll take a look at the extract values or maybe to do the calculations based on some extra dates instead to get the same information in Power BI without importing my cusotm field from Jira.
Thanks for replies!
Kind regards, Johan