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.
select count(cfv.issue) from customfield cf, customfieldvalue cfv where cf.id = 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!
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.
Hey Community mates! Claire here from the Software Product Marketing team. We all know software development changes rapidly, and it's often tough to keep up. But from our research, we've found the h...
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!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG