Issue Archiver for Jira
Breadcrumbs

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

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

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

    project = XYZ
    
  2. Find all issues with attachments

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

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

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

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

    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