Custom fields page doesn't show number of associated issues
Platform Notice: Data Center - This article applies to Atlassian products on the Data Center platform.
Note that this knowledge base article was created for the Data Center version of the product. Data Center knowledge base articles for non-Data Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
The custom fields page <baseurl>/secure/admin/ViewCustomFields.jspa currently shows the custom field details and also the number of issues in which the custom field has a value. This is useful for anyone trying to understand the impact of the custom field outside the custom field optimizer. At times we might see some custom fields that would have an informational message associated with them as shown below and also might have no data associated with them.
Environment
9.x
Diagnosis
Jira has categorized custom fields as standard and non-standard custom fields. The following are the custom field types that are by default standard or trusted custom field types. The rest of the custom fields would have the information icon associated with them. Trusted custom fields are fields for which we can track their usage with 100% accuracy. For untrusted custom fields, we collect usage information, but the data might be not complete.
textfield
textarea
datepicker
datetime
float
importid
select
radiobuttons
project
multiversion
version
userpicker
url
multiselect
multicheckboxes
multiuserpicker
multigrouppicker
grouppicker
readonlyfield
At times we may not see any data for the number of issues associated with the custom field.
Cause
The data related to the custom field you see in the custom fields page, is calculated based on the number of issues in the customfieldvalue table with data for the field. The table has two columns lastvalueupdate and isseueswithvalue which are utilized to provide the issues column data in the custom fields page.
- lastvalueupdate:
select max(created),customfield from customfieldvalue cfv join jiraissue iss on iss.id = cfv.issue where iss.created is not null and cfv.issue is not null and cfv.customfield in (select id from customfield) group by customfield;
- isseueswithvalue:
select count(issue),customfield from customfieldvalue where customfield in (Select id from customfield) group by customfield;
The data displayed on Last value update and Issues columns are made available and populated by the following scheduled job:
- com.atlassian.jira.issue.fields.usage (also known as CustomFieldUsageRecalculationJob).
- Issues with this job may cause outdated or unavailable data of both Custom Field usage-related fields under certain circumstances (such as time this the job has last run or if the custom field data is stored differently).
Solution
Check if there are any associated data for the custom field from the customfieldvalue table utilizing the query below:
select id,lastvalueupdate, issueswithvalue from customfield where cfname = '<custom field name>';
Verify if the custom field is a scripted custom field. Scripted custom fields provided by third-party apps calculate the value for the field during run time. These values are not stored by Jira in the customfieldvalue table and therefore cannot display data on the custom field page.
- Validate if the CustomFieldUsageRecalculationJob scheduled job is facing issues.
- As an admin, you can view details about it by going to <JIRA_BASE_URL>/secure/admin/SchedulerAdmin.jspa and looking for CustomFieldUsageRecalculationJob. Click "Show more" on the far right. One common issue is related to the database connection timing out; more details can be found in this article: