Useful JQL tips

Yaniv   December 7, 2014   1 Comment on Useful JQL tips

This page lists useful JIRA JQL queries that I gathered during my day to day use in JIRA, and managing an operations team.

Tasks that are parents

This requires Script Runner plugin installed

issueFunction in parentsOf("status = Open")

Will filter the tasks that are parents of any subtask that it’s status is open.


Filter Subtasks

This requires Script Runner plugin installed

issueFunction in subtasksOf("status = Open")

Will filter the subtasks of any parent task that it’s status is open.

issueFunction in subtasksOf("status = Open") AND assignee = john.doe

Will filter the subtasks that are assigned to user john.doe and their parent task status status is open.


Task that their status changed last week

Useful to see what has been done last week:

status changed AFTER startOfWeek(-1) BEFORE startOfWeek()


Tasks that their status changed to closed

status changed to Closed


Tasks that changed their status from Open to In Progress

status changed from Open to "In Progress"


Aggregate values

This requires Script Runner plugin installed.

Script Runner supports the following aggregation functions:

  • sum() – sum of the field. Supports integers and estimation fields.
  • average() – average value of the field
  • count() – number of issues returned by the filter
  • countBy() – breakdown count of issues (for example by reporter)
project = LOAD and issueFunction in aggregateExpression("Total Estimate for all Issues", "originalEstimate.sum()")

Will display the total of estimate field for all issues.

project = LOAD and issueFunction in
    aggregateExpression("Total Estimate for all Issues", "originalEstimate.sum()", "Remaining work", "remainingEstimate.sum()")

Will display the totals of estimate field for all issues, and the total of remaining work field.

Warning: this is experimental feature as of Script Runner.

One thought on “Useful JQL tips

  1. joe

    been looking for a while to find the right query to display a qty of days in working. I’m looking for something like this

    1 DAY in progress = now – 24h
    2 DAY in progress = 25h – 2d
    3 DAY in progress = 2d 1h – 3d
    4 DAY in progress = 3d 1h – 4d
    5 DAY in progress = 4d 1h – 5d

    I want to have multiple queries to save as smart filters that return
    1. issues in progress for 1 day
    2. issues in progress for 2 days
    3. issues in progress for 3 days
    4. issues in progress for more than 4 days

    Can you help?


Leave a Reply

Your email address will not be published. Required fields are marked *