Issue count of JIRA Agile fields

For analysis purposes, I wanted to retrieve the custom field usage statistics from JIRA a database. I found out that issue counts resulted by SQL and JQL significantly differ.

For example;

  customfield cf,
  customfieldvalue cfv
where = cfv.customfield and
  cf.cfname = 'Epic Colour' and
  cf.customfieldtypekey = 'com.pyxis.greenhopper.jira:gh-epic-color';

This shows an issue count of ~7000 in my JIRA instance, but following JQL results all issues (300,000+).

"Epic Colour" is not EMPTY

Is this normal? If so, what is the rationale behind this?


Thanks in advance!



1 answer

0 vote

Hi Shaakunthala,

JIRA only creates rows in the customfieldvalue table when there is an actual value for the field. That is, it doesn't store fields with 'Null' values (e.g. if an issue does not have an Epic Colour, there will be no row referencing the issue/value on the database).

That is the reason you see a difference when searching for values that exist vs values that doesn't exist. Try searching "Epic Colour" is EMPTY instead, and see if it returns the same values. smile


Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

3,264 views 14 20
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot