Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,559,632
Community Members
 
Community Events
185
Community Groups

How can I create a flat table with a few custom fields from Jira using Atlassian Analytics?

In Jira Advanced Issue Search, I can include a few custom columns in the results and extract that as a flat table. When I create a query in Analytics, I need to retrieve data from the "Jira Issue" table which has custom fields as rows (Name and Value). Say I have 2 jira issues and 2 custom fields, I'd like to see a table with 2 rows (one per issue) and 3 columns (issue key and the 2 custom fields I select).

Right now I can see the results in 4 rows (2 per issue). I thought "Pivot" would help, but it is greyed out and I can't find documentation on it.

I could create small queries one variable at a time and then try to join the tables. This is fine for 2 custom fields, but I want to see 10+, and that seems like brute force to me. Is there a more elegant way?

1 answer

1 accepted

1 vote
Answer accepted
Jessie Turpin
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 22, 2023

Hi Diego! 

If you'd like to have the custom fields be their own columns and don't want to create one query per custom field, you could consider creating custom columns in the Issue field table. This would allow you to use fewer queries in your chart while also having each custom field be a column. 

Here is an example piece of code of how you could create a custom column in the Issue field table based on one of your custom fields: 

CASE WHEN name = 'Custom field name' THEN value END

Note: Custom columns added to the schema will only be available in visual mode queries. 

If you have any trouble creating the custom column(s), please don't hesitate to create a support ticket and our support team will be able to help you further. 

Cheers,

Jessie

Thank you Jessie. This is helpful. Sorry for missing the reply earlier.

No problems in creating a custom column. I just had to be a bit more specific and add:

CASE WHEN `Issue field`.`name` = 'CUSTOM FIELD NAME' THEN `Issue field`.`value` END

Otherwise it was throwing an error of ambiguous columns when trying to merge with jira_issue table.

For other people looking for this, the next question would be that if you have multiple fields, say Custom 1, Custom 2, Custom 3, you would end up with 3 rows for the same issue ID, each with one of the custom fields populated. You can apply a "MAX" function to each of them to have them being reported in a single row.

Like Amy Collins likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events