Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • issue in havingAttachments("word") - returns list of issues which have an attachment, which contains a word inside file content;
  • issue in havingAttachments("\"multi-word text\"") - all issues with attachments with a multi-word text in their file contents;
  • issue in havingAttachments("text1 OR text2") - all issues with attachments with either text1 or text2 somewhere in their file contents;
  • issue in havingAttachments("text1 text2") - same as issue in havingAttachments("text1 OR text2") - this is the main difference from Google query syntax - here space means not and but or;
  • issue in havingAttachments("text1 AND text2") - all issues with attachments with both text1 and text2 somewhere in their file contents;
  • issue in havingAttachments("content:text") - same as issue in havingAttachments("text");
  • issue in havingAttachments("type:pdf") - all issues with pdf attachments;
  • issue in havingAttachments("name:workflow OR type:png") - all issues that have attachment with name workflow or with png file extension;
  • issue in havingAttachments("name:summary AND type:txt") - all issues that have attachment with name summary and with txt file extension;
  • issue in havingAttachments("\"search attachment for JIRA add-on\" AND name:article01") - all issues that have an attachment containing search attachment for JIRA add-on text and the attachment file is named article01 (without the extension);
  • issue in havingAttachments("") or just issue in havingAttachments() - returns list of issues which have at least one attachment (with any contents).

...

  • content, which searches inside attachment file contents. It's the default field if you don't specify any field explicitly.
  • name, which searches by names of the attachment files excluding file extensions;
  • type, which searches by file extensions (pdf, doc, txt, xls, odt, ods, xml, html, ...)

Wildcards

Two wildcards (* and ?) can be used in search terms. Wildcards will not work if you search for phrase like: havingAttachments("\"multi-word text\""). Wildcards are ignored when used in phrases.

  • " * " is used for multiple characters wildcard search: tes*, te*t. Term can't start with *, it can be used at the end or in the middle of search term.
  • "?" is used for single character wildcard search: tes?, te?t. Term can't start with ?, it can be used at the end or in the middle of search term.

Advanced syntax (Jira 8.x.x and higher)

Syntax used for writing queries is Lucene syntax. More details how to write advanced queries can be found in Lucene documentation.