Canned Search has introduced support for the Craftware Search Attachments plugin from version 2.0.0. 

Users will be able to search their Jira attachments directly from the dashboard.

This guide demonstrates the steps to add a Canned Search Gadget so that users can search for file containing a particular type in a chosen project

In order for this to work, you need to install the Craftware Search Attachments

How to use it


To search for all attachments in the selected project

To search for all attachments with file name containing workflow in the selected project

To search for all attachments with file name containing workflow and extension pdf in the selected project

To search for all attachments with extension pdf in the selected project

Steps


Setting up the Canned Search Filter

  1. Create a new Canned Filter by selecting Manage Canned Filters under the Issues menu
  2. Click on Add Canned Filter 

  3. Enter the Canned Filter Name and the JQL. For this case, we draft the JQL on the fly

    The following JQL is to select all issues from SCRUM project with attachments "filename.extension". We will convert it to variables later


    project = SCRUM and issue in havingAttachments("name:filename AND type:extension")


  4. Click on Select Variables on the left menu

  5. Click on the top checkbox so that all 3 fields will become variables. You can also click on the individual checkboxes


  6. Change the Type of the project field to dropdown so that the list of projects will appear as a dropdown.
     

  7. Change the Alias for the name:___ to Filename and type:___ to Extension so that it will display Filename and Extension in the search gadget


  8. Change the Type for type:____ to Dropdown. We will also set the Options to ,docx,jpg,pdf,png,xlsx 

    There is a comma before docx because we will to provide a wildcard option for all extensions


  9. Click on Save button to save the filter

Adding the Canned Search Gadget

You can add it in the System Dashboard so that all users can use the feature without having to do the setup themselves.


  1. Click on the Add Gadget link to bring up the Gadget Directory 


  2. Type in Canned to filter the search and click on the Add it Now button to add it to the dashboard


  3. Configure the Canned Search Gadget by filling in the configuration as below


  4. Click on the Save button

References


Examples

PurposeJQL
To find all pdf attachments in issues from the DOCS project


project = DOCS AND issue in havingAttachments("type:pdf")


To find all png attachments with name containing workflow


issue in havingAttachments("name:lucy AND type:png")


havingAttachments() JQL Function

For more info, check out the User Guide for Search Attachment for Jira plugin