Class CustomFieldUsageDataService

java.lang.Object
com.atlassian.jira.issue.fields.usage.CustomFieldUsageDataService

public class CustomFieldUsageDataService extends Object
Calculating usage data for custom fields:
  • `Last value update`: the last date when custom field's value was set or changed
  • `Issues`: number of issues in which custom field is set to a non default value
The values are being calculated by background operations that can be disabled with JiraFeatureFlagRegistrar.CUSTOMFIELDS_IDENTIFICATION feature flag. Once calculated, the values are being stored with the custom field. since 8.16
  • Field Details

    • DEFAULT_TRUSTED_CUSTOM_FIELD_TYPE_KEYS

      public static final Set<String> DEFAULT_TRUSTED_CUSTOM_FIELD_TYPE_KEYS
      As custom fields don't store their values in one single standardized way we divided them into two groups: trusted and untrusted custom fields. 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.
    • DEFAULT_DATA_COLLECTION_QUERY_MAX_IDS

      public static final int DEFAULT_DATA_COLLECTION_QUERY_MAX_IDS
      See Also:
    • CF_USAGE_CLUSTER_LOCK_NAME

      public static final String CF_USAGE_CLUSTER_LOCK_NAME
  • Constructor Details

  • Method Details

    • updateLastValueUpdateForCustomFields

      public void updateLastValueUpdateForCustomFields(Set<Long> customFieldsId)
    • getTrustedKeys

      public Set<String> getTrustedKeys()
      Returns:
      a set of keys of trusted custom fields
    • onPluginFrameworkShutdownEvent

      @EventListener public void onPluginFrameworkShutdownEvent(com.atlassian.plugin.event.events.PluginFrameworkShutdownEvent event)