Skip to main content

attachment

Overview

The attachment function allows you to find issues that have attachments matching specific criteria such as filename, extension, author, and creation date.

Syntax

issue in attachment("subquery", "author", "start_date", "end_date", "filename", "extension")

Parameters

  • subquery (required): A valid JQL query that defines the set of issues to evaluate
  • author (optional): The attachment author — resolved via Jira user search; accepts display name, email, or account ID (same resolution as lastCommentedBy / changedBy)
  • start_date (optional): The start date in format "yyyy/MM/dd HH:mm" or "yyyy/MM/dd", or a relative expression like -2w (see Relative date ranges)
  • end_date (optional): The end date in the same format as start_date
  • filename (optional): A JS regex pattern matched against the attachment filename
  • extension (optional): The file extension — exact-match after normalization (see Extension matching below)

Extension matching

extension is matched exact-equality against a normalized token derived from each attachment's filename extension AND its MIME subtype. Both the user-typed extension and the attachment's extension/mimeType go through the same normalization, so the following all match a PDF attachment:

  • "pdf"
  • "PDF" (case-insensitive)
  • ".pdf" (leading dot stripped)
  • "application/pdf" (MIME type → subtype pdf)

Behavior change: prior versions did a endsWith suffix match against filename ext OR mimeType. With exact-match, extension: "df" no longer matches report.pdf.

Author matching

author is resolved up-front via Jira's user search and compared against the attachment uploader's accountId. Multiple accounts can match a single displayName query; all matching accounts are included. Prior versions did a case-insensitive substring match against displayName.

Supported Operators

  • in - issues matching the criteria
  • not in - issues not matching the criteria

Examples

Finding issues with PDF attachments

issue in attachment("project = TEST", "", "", "", "", "pdf")

Finding issues with attachments by a specific user

issue in attachment("project = TEST", "john.doe", "", "", "", "")

Finding issues with attachments created in a date range

issue in attachment("project = TEST", "", "2024/01/01", "2024/03/31", "", "")

Finding issues with specific filename pattern

issue in attachment("project = TEST", "", "", "", "report.*", "")

Combining multiple criteria

issue in attachment("project = TEST", "john.doe", "2024/01/01", "2024/03/31", "report.*", "pdf")

Finding issues without attachments

issue not in attachment("project = TEST", "", "", "", "", "")

Relative date ranges (self-updating)

start_date and end_date also accept a relative expression — a leading - followed by a duration (w/d/h/m/s) — meaning "now minus that duration". Argon re-resolves the window every time the query runs (refreshed hourly), so the board keeps itself current.

-- Issues that got a new attachment in the last 4 weeks
issue in attachment("project = TEST", "", "-4w", "", "", "")

-- PDFs uploaded in the last week (recently shared documents)
issue in attachment("project = TEST", "", "-1w", "", "", "pdf")

-- Screenshots a specific user attached in the last 3 days
issue in attachment("project = TEST", "john.doe", "-3d", "", "", "png")

See Relative dates for the full format reference.

Performance Considerations

  • The function implements pagination to handle large result sets
  • Use specific subqueries and date ranges to improve performance
  • The function limits the number of issues processed to prevent timeout issues

Error Handling

The function will return an error if:

  • Invalid date formats (must be "yyyy/MM/dd HH:mm" or "yyyy/MM/dd")
  • Invalid regex patterns in filename
  • Invalid JQL queries
  • commented - Search for issues with specific comment criteria
  • worklog - Search for issues with specific worklog criteria