VersionThreeDotO/Bugs/CollectingBugStatistics

Not logged in - Log In / Register

Collecting Bug Statistics

Use Cases

Transition Over Time Graphs

For groups of bugs (bugs on a particular target, for example), it is useful to know how long does it take for bugs to transition from one status to another. In particular, the following transitions are interesting:

These transitions are best displayed as a graph where one axis displays the number, or percentage of bugs, and the other axis displays the time interval (in fixed units of time). The values for several different targets, or several periods within the same target, can be displayed in the same graph.

time-to-triaged.png

Bugs Timeline

A graph of the numbers of bugs in each status over time. One axis shows the number or precentage of bugs, and the other axis shows the flow of time. Several different statuses can be layered.

openoffice.org-month-triage.png

Schema Changes

Add the following field to the BugTask table.

Add a new table BugTaskStatusTransitions.

Code Changes

Date Linked Upstream

Record date_linked_upstream when the upstream bugtask for this (ubuntu) bugtask is linked to a bugwatch (or when the upstream bug task is created, for projects that use launchpad for bug tracking).

Date Importance Set

Record date_importance_set when the bug task's importance is set for the first time (from transitionToImportance).

Bug Task Status Transitions

When transitioning to a new bug task status, set the date_left of the last BugTaskStatusTransitions record and insert a new record for the new status with date_entered set to NOW.

Querying Status History

Add a new method, HasBugs.getStatusStatistics(from_date, to_date) which returns a sequence of entries for each day, with mappings from status to number of bugs.

For example:

 {'2008-08-01': {
    'NEW': 21,
    'CONFIRMED': 45,
    ...
  },
  ...
 }

Querying Status Durations

Add the following methods:

Each of these methods returns a mapping from days to bug numbers (only positive integers).

For example:

  {1: 89,
   2: 54,
   3: 34,
   4: 22,
   5: 11,
   6: 5}

VersionThreeDotO/Bugs/CollectingBugStatistics (last edited 2008-12-23 17:19:09 by allenap)