hasAttachments()

hasAttachments()

Description:

Searches issues having attachments, additionally you can further refine your query by using a number expression.

Note:

A 'number expression' is made of an optional operator representing by its mathematical symbol and a (prositive/negative) number.

By default, this function only includes issues with at least one attachment even if you use the '<' or '<=' operator. You must explicity add 'issues NOT IN hasAttachments()' clause to your query, if you also want to search for issues without attachments.



Syntax

hasAttachments()
hasComments(hasAttachments)

Available since

v2.2.0-RELEASE

Supported fields

Issue

Supported operators

IN , NOT IN

Unsupported operators

= , != , ~ , !~ , > , >= , < , <=

IS , IS NOT , WAS , WAS IN , WAS NOT , WAS NOT IN , CHANGED

Examples:

• Find issues without attachments:

issue NOT IN hasAttachments()

• Find Stories that have three or more attachments

type = Story AND issue IN hasAttachments(">= 3")

• Find issues within the EMEA project having less than 2 attachments or with no attachments at all.

project = EMEA AND (issue IN hasAttachments("< 2") OR issue NOT IN hasAttachments())

JQL Function Reference