[Metrics] Issue Age
Description
- How long have open issues been left open?
- If an issue has been closed but re-opened again within that period will be considered as having remained open since its initial opening date.
Objectives
- When the issue age is increasing, identify the oldest open issues in a project to gain insight as to why they have been open for an extended period of time.
- Additionally, to understand how well maintainers are resolving issues and how quickly issues are resolved.
Implementation
- Average. Average age of all open issues.
- Median. Median age of all open issues.
- Filter by: module, tags/labels on issue

Resource CHAOSS: Evolution -> Issue Resolution https://chaoss.community/metric-issue-age/
This issue has not been replied for 24 hours, please pay attention to this issue: @sunshinemingo @wengzhenjie
/self-assign
In the implementation of this metric, I found it is very tricky, especially about how to handle time range related functions.
As the description of the metric -- How long have open issues been left open? -- So actually the metric should not have a start time and an end time as parameter but just a time point, and returns how long have the open issues been left open, and the issues should be in open state at that time point.
For example, if we are going to get metric for a repo in 2022.1 - 2022.12 by quarter, so we will get 4 data points, each one contains the data about how long have the issues been left open until the end of the quarter, and the open time should not be limited. This really makes the metric hard to implement.
/self-assign
A query of Issue Age for one issue might have those states:
- query time (end time: default now),
- the first open time (initial opening time),
- the last closed time (when issue is closed at the point of query time),
- active time intervals (for some issue may be closed or reopened),
- inactive time intervals (the accumulate time intervals of closed-reopened),
- how many times of inactive-active breaks, # this may be a redundant property
- active state (open, reopened or closed)
when I input an issue_number and an end_time{default now}(now means query point in time) and a parameter include_closed2reopened{default True}, I'd like to get those results as the issue age:
select all the records about issue_number created before end_time from tables in our databases, return
- include_closed2reopened=True
- None # for issues not exist or cannot be retrieved from our databases.
- Non-negative Number of 3. the last closed time - 2. the first open time # for issues closed.
- Non-negative Number of 1. query time - 2. the first open time (equals to number of 4. active time intervals + 5. inactive time intervals) # for issues opened or reopened.
- include_closed2reopened=False # this situation may be redundant for this issue
- None # for issues not exist or cannot be retrieved from our databases.
- Non-negative Number of 4. active time intervals # other situations, definations:
- Number of 3. the last closed time - 2. the first open time - 5. inactive time intervals # for issues closed
- Number of 1. query time - 2. the first open time - 5. inactive time intervals # for issues opened(keep opened states till end_time) or reopened. The number of inactive time intervals equals to 0 for issues opened(keep opened states till end_time).
Just a brainstorming : )