Class CustomFieldUsageDataService
java.lang.Object
com.atlassian.jira.issue.fields.usage.CustomFieldUsageDataService
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
JiraFeatureFlagRegistrar.CUSTOMFIELDS_IDENTIFICATION feature flag.
Once calculated, the values are being stored with the custom field.
since 8.16-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final intAs custom fields don't store their values in one single standardized way we divided them into two groups: trusted and untrusted custom fields. -
Constructor Summary
ConstructorsConstructorDescriptionCustomFieldUsageDataService(CustomFieldManager customFieldManager, CustomFieldUsageDAO dao, CustomFieldUsageDataWriter lastUpdateDataWriter, ApplicationProperties applicationProperties, CustomFieldUsageEnabledCheck featureEnabledCheck, com.atlassian.beehive.ClusterLockService clusterLockService, com.atlassian.event.api.EventPublisher eventPublisher) -
Method Summary
Modifier and TypeMethodDescriptionvoidonPluginFrameworkShutdownEvent(com.atlassian.plugin.event.events.PluginFrameworkShutdownEvent event) voidupdateLastValueUpdateForCustomFields(Set<Long> customFieldsId)
-
Field Details
-
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
-
-
Constructor Details
-
CustomFieldUsageDataService
public CustomFieldUsageDataService(CustomFieldManager customFieldManager, CustomFieldUsageDAO dao, CustomFieldUsageDataWriter lastUpdateDataWriter, ApplicationProperties applicationProperties, CustomFieldUsageEnabledCheck featureEnabledCheck, com.atlassian.beehive.ClusterLockService clusterLockService, com.atlassian.event.api.EventPublisher eventPublisher)
-
-
Method Details
-
updateLastValueUpdateForCustomFields
-
getTrustedKeys
- Returns:
- a set of keys of trusted custom fields
-
onPluginFrameworkShutdownEvent
@EventListener public void onPluginFrameworkShutdownEvent(com.atlassian.plugin.event.events.PluginFrameworkShutdownEvent event)
-