Custom Field Optimizer and Archived Issues

Still need help?

The Atlassian Community is here for you.

Ask the community

This page describes the relationship between Custom Field Optimizer (CFO) and the issues that are archived. Archived issues are deleted from Jira index and because of that Custom Filed Optimizer does not have the full set of information about the issues which use a particular custom field. This can result in some unwanted behaviour such as custom fields not displaying for archived issues and for the issues that have been restored. Read on to learn more.

Overview of Custom Field Optimizer

Custom Field Optimizer is designed to decrease the impact of custom fields on the performance of your Jira instance. The way it works is based on assigning context to custom fields.

Each custom field can be assigned one of the two contexts:

  • Global context - which means that a custom field is available in all projects and issues.

  • Projects list context - which means that a custom field is available only in projects from the specified list.

If all custom fields are available for issues then a representation of each issue in Jira index has to have an additional place for storing the value for this custom field. As a result, each issue document needs to store this place for each custom field from the global context. This greatly affects Jira performance.

For more information about Custom Field Optimizer, see the CFO documentation.

Selection criteria

Jira index is scanned for every custom field and its occurrence in different projects. If a project doesn’t contain any issue which uses a custom field then this project is not counted.

For custom fields that are only used in a few projects, the context is automatically switched from global context to projects list and the size of issue documents decreases. This directly improves Jira performance by shrinking the index size.

Archived issues case

Starting on Jira 9.6.0, the Custom Field Optimizer will start considering archived issues as well:

JRASERVER-73207 - Getting issue details... STATUS

As already mentioned, assigning projects list to a custom field is a result of scanning the Jira index. There is a caveat - if an issue is archived then it is removed from the index, which makes it impossible to check if this archived issue uses a specific custom field.

As a result, the custom field context is removed from projects with archived issues that use this particular custom field.

For example, the project Project has three issues PRO-1, PRO-2, PRO-3. The issue PRO-1 has the CF custom field with the value Value. After archiving PRO-1, from the Custom Field Optimizer’s point of view, there is no issue in Project that would use the CF custom field. In that case, the CF context is removed and the issue PRO-1 won’t display this custom field on its issue view.

Restoring an issue will not restore the custom field. To restore the custom field, you need to manually add this project to the list of projects present in the custom field context. Since the value of the custom field is still stored in the database even if it is not visible then after returning the project to the custom field context, the value of the custom field will become visible.

Last modified on Mar 21, 2024

Was this helpful?

Provide feedback about this article
Powered by Confluence and Scroll Viewport.