Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Excerpt

 Given a JIRA project name, a start date and and end date, find total counts of issues completed before, on or after the due date, per priority:

 TotalUnfinishedFinished On DueFinished Before DueFinished After DueFinished, no due date
Minor, without due date44360008
Blocker, without due date500005
Critical, without due date410003
Major, without due date1314600085
Minor, with due date110000
Major, with due date220000
Blocker, with due date110000

Implementation

The script achieving this is found in Bitbucket at https://bitbucket.org/redradish/jira-ruby-reports/src/master/overdue_by_priority/. Sample use:

.

Generally the issues in question will be bug reports. This report answers questions like "how many bugs of each priority are we resolving each month?" or "Are we resolving bugs by their due date"? By running the report for successive time periods, one can get a feel for the total backlog, and per-month progress to clearing the backlog.

Sample use: for Bugs in the UX project, show how many were resolved before, on or after their Due date, in the month of July:

Code Block
jturner@jturner-desktop ~/src/bitbucket.org/redradish/jira-ruby-reports/overdue_by_priority $ bundle exec ./jira_overdue_by_priority_report.rb --project=UX --issuetype=Bug --from=2015-07-01 --to=2015-07-30
--------------------------------------------------
|                                    | Total | Unfinished | Finished Before Due | Finished On Due | Finished After Due | Finished, no due date | Finished outside daterange |
| Major, without due date            | 328   | 6          | 0                   | 0               | 0                  | 24                    | 298                        |
| Minor, without due date            | 125   | 83         | 0                   | 0               | 0                  | 3                     | 39                         |
| Blocker, without due date          | 9     | 0          | 0                   | 0               | 0                  | 0
Code Block
jturner@jturner-desktop ~/src/bitbucket.org/redradish/jira-ruby-reports/overdue_by_priority $ bundle exec ./jira_overdue_by_priority_report.rb "project=UX and created>='2015-10-01' AND created<='2015-10-27'"
--------------------------------------------------
[[nil,
  "Total",
  "Unfinished",
  "Finished On Due",
  "Finished Before Due",
  "Finished After Due",
  "Finished, no due date"],
 ["Minor, without due date", 44, 36, 0, 0, 0, 8],
 ["Blocker, without due date", 5, 0, 0, 0, 0, 5],
 ["Critical, without due date", 4, 1, 0, 0, 0, 3],
 ["Major, without due date", 131, 46, 0, 0, 0, 85],
 ["Minor, with due date", 1, 1, 0, 0, 0, 0],
 ["Major, with due date", 2, 2, 0, 0, 0, 0],
 ["Blocker, with due date", 1, 1, 0, 0, 0, 0]]
--------------------------------------------------
|                      | 9     | Total | Unfinished | Finished On Due | Finished Before Due | Finished After Due | Finished, no due date |
| MinorCritical, without due date         | 4414    | 360          | 0               | 0   | 0               | 0                  | 80                     |
| Blocker, without due date  | 5 14              | 0          |
| 0Minor, with due date               | 01     |   1           | 0                   | 50               | 0     |
| Critical, without due date | 4     | 1 |   0      | 0               | 0                   | 0      |
| Major, with due date        | 3      | 2     | 2        |
| Major, without| due0 date    | 131   | 46         | 0               | 0                   | 0                     | 0     | 85                    |
| MinorUnplanned, with due date           | 1     | 10          | 0               | 0   | 0               | 0                  | 0                     |
| Major,1 with due date       | 2     | 2          |
| 0Unplanned, without due date        | 21    | 0                   | 0                   | 0               | 0     |
| Blocker, with due date     | 1     | 10          | 0          |     |21 0                   | 0    |
--------------------------------------------------
<table border=1>
<tr><th>    </th><th>Total</th><th>Unfinished</th><th>Finished Before Due</th><th>Finished On Due</th><th>Finished After Due</th><th>Finished, no due |date</th><th>Finished 0                     |
--------------------------------------------------
<table border=1>
<tr><th>    </th><th>Total</th><th>Unfinished</th><th>Finished On Due</th><th>Finished Before Due</th><th>Finished After Due</th><th>Finished, no due date</th></tr>
<tr><th>Minor, without due date</th><td>44</td><td>36</td><td>0</td><td>0</td><td>0</td><td>8</td></tr>
<tr><th>Blocker, without due date</th><td>5</td><td>0</td><td>0</td><td>0</td><td>0</td><td>5</td></tr>
<tr><th>Critical, without due date</th><td>4</td><td>1</td><td>0</td><td>0</td><td>0</td><td>3</td></tr>
<tr><th>Major, without due date</th><td>131</td><td>46</td><td>0</td><td>0</td><td>0</td><td>85</td></tr>
<tr><th>Minor, with due date</th><td>1</td><td>1</td><td>0</td><td>0</td><td>0</td><td>0</td></tr>
<tr><th>Major, with due date</th><td>2</td><td>2</td><td>0</td><td>0</td><td>0</td><td>0</td></tr>
<tr><th>Blocker, with due date</th><td>1</td><td>1</td><td>0</td><td>0</td><td>0</td><td>0</td></tr></table>outside daterange</th></tr>
<tr><th>Major, without due date</th><td>328</td><td>6</td><td>0</td><td>0</td><td>0</td><td>24</td><td>298</td></tr>
<tr><th>Minor, without due date</th><td>125</td><td>83</td><td>0</td><td>0</td><td>0</td><td>3</td><td>39</td></tr>
<tr><th>Blocker, without due date</th><td>9</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>9</td></tr>
<tr><th>Critical, without due date</th><td>14</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>14</td></tr>
<tr><th>Minor, with due date</th><td>1</td><td>1</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td></tr>
<tr><th>Major, with due date</th><td>2</td><td>2</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td></tr>
<tr><th>Unplanned, with due date</th><td>1</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>1</td></tr>
<tr><th>Unplanned, without due date</th><td>21</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>21</td></tr></table>

The script's output, when rendered:

 TotalUnfinishedFinished Before DueFinished On DueFinished After DueFinished, no due dateFinished outside daterange
Major, without due date328600024298
Minor, without due date12583000339
Blocker, without due date9000009
Critical, without due date140000014
Minor, with due date1100000
Major, with due date2200000
Unplanned, with due date1000001
Unplanned, without due date210000021

Here we can see:

  • Total is the total issue count (for that row). In the example, at the time we ran the script there were 328 Bugs with 'Major' priority and no due date.
  • Unfinished is the total unresolved issue count. In the example, of the 328 Major unscheduled bugs, there were 6 unresolved.
  • The next 4 cols, Finished Before/On/After Due, and Finished, no due date, show issues resolved within the given interval. In the example, 24 of the 328 bugs were resolved in September.
  • The last column, Finished outside daterange, shows issues resolved outside the given interval. In the example, 298 of the 328 bugs were resolved outside September.

Implementation

The script achieving this is found in Bitbucket at https://bitbucket.org/redradish/jira-ruby-reports/src/master/overdue_by_priority/.

Implementation Walkthrough

...