Skip to main content
Skip table of contents

Useful JQLs for selecting issues for housekeeping

To effectively manage and review attachments, Jira Query Language (JQL) can be used to find issues with attachments. We have listed the common scenarios with their JQL condition below.

You can craft more advanced queries by combining the scenarios below

Recommended query

The most common query used by most team for housekeeping will be to strip attachments from

  • resolved (or closed) issues

  • resolved more than 5 calendar years and

  • not updated for the last 5 calendar years

CODE
resolution is not empty AND resolutiondate <= endOfYear(-5) AND updated <= endOfYear(-5)

Here are other typical JQL queries:

  1. Find all issues within project XYZ

    CODE
    project = XYZ
  2. Find all issues with attachments

    CODE
    attachments is not empty
  3. Find issues that have not been updated in the last 12 months

    CODE
     updated <= startOfMonth(-12)
  4. Find issues that has been resolved with resolution date before 11/Mar/2020

    CODE
    resolution is not empty AND resolutiondate < "2020/03/11"
  5. Find issues of a specific issue type (Test Cases)

    CODE
    issuetype = test
  6. Find issues tagged with a ‘gdpr’ label

    CODE
    labels = gdpr

Conclusion

The JQL can only be used to filter the issues for housekeeping.
It is possible to specify additional rules in the housekeeping policy on the attachments such as

  • File Size

  • File Extension

  • Mentioned in description/comments

Related Resources

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.