Locate Jira Issues With External Attachments via JQL Queries

Introduction

The External Attachment feature of JEMHC is now obsolete and withdrawn from use.

JEMHC periodically updates issue properties with metadata referring to external attachments, this update happens in the background every hour. Because issue properties are updated periodically it is possible that issue properties may not reflect the current state of external attachments on an issue. See the Issue Indexing section below for more information.



As an administrator using the external storage feature of JEMHC it may be desirable to generate a list of all issues within a project (or globally) that contain external attachments created by JEMHC. When an external attachment is attached to an issue JEMHC tags the issue with an issue property that indicates the attachment was created on external storage, this property also contains the attachment size. The external attachment issue properties are exposed to Jira cloud JQL queries via aliases, this means that you can use JQL queries to locate issues containing external attachments and also generate a list of issues ordered by the total size of the external attachments attached to the issue.

JQL Syntax

The JQL aliases below map to Jira issue properties for JEMHC external attachment metadata:

externalAttachments

externalAttachmentsSize

externalAttachments

externalAttachmentsSize

The total number of external attachments present on an issue

The total file size of all external attachments present on an issue

An example JQL query to locate all issues in the project with the key PROJECT_KEY that contain at least one external attachment, ordered by the the total attachment size:

project = PROJECT_KEY and externalAttachments > 0 order by externalAttachmentsSize desc



Issue Indexing

The external storage feature keeps information about attachments (count and total size) in each issue allowing users to do JQL searches using those properties. When there is a Storage configuration change like the project admin changes to a different storage provider or the storage folder is modified, JEMHC will need to update the metadata of each issue so the JQL is up to date. This process is time consuming and therefore it is done periodically in the background or when a project administrator changes the storage configuration for a project. 

The current status of the issue indexing process can be viewed globally via the storage tab in JEMHC, or it can be viewed on a per project basis via the storage tab within the project level JEMHC configuration.

Within the storage tab at either the global level or project level there is a table showing each project within Jira along with its current external storage configuration and current information about its indexing status.

Next to each project you can see the storage configuration that has been assigned to the project, as well as the last time that a metadata update was triggered for the project, and when the update completed. The last updated issues column shows how many issues in total had their metadata updated during the reindex, the duration column shows how long the reindex took to complete. The status column shows the current indexing status for the issue, the status finished means there is no indexing currently occurring and the previous index completed successfully. A status of running would indicate that a reindex is in progress and the indexing progress will be shown dynamically within the table til the reindex completed.

If a reindexing attempt fails the status column will show BLOCKED and you will then be able to trigger a reindex manually by pressing the button (only visible if a reindex has already failed)