bosun report lint
User story: I am a project manager. I want a report of all invalid tickets, so that I can correct them.
Suggested solution: The following invocation should generate a simple HTML report
bosun report lint https://source.puri.sm/liberty
# generates liberty_lint.html in current folder
Suggested tools:
- Python 3
- click (CLI interface)
- python-gitlab (GitLab queries)
- Jinja 2 (HTML templating)
Notes:
- All report sections are disjunct. No ticket should appear in more than one section.
- Ideally this report should not need GitLab credentials to run. So it could be run against any public GitLab URL. If credentials are required, we can open a separate ticket.
Issue definition
Most properties come directly from GitLab:
- Full title
- Full path
- Milestone
- Due date
- State (open / closed)
- Assignee
Other properties are derived from Gitlab:
- Short path
example/example#3
from full path - Short title
Cannot load dr...
from full title (truncate to 10 characters)
Other properties are derived from Gitlab conditions:
Property | Value | GitLab condition |
---|---|---|
Effort | 4: High | Label: Effort/High |
2: Regular | - | |
1: Low | Label: Effort/Low | |
100: Invalid | More than one | |
Phase | 0: Backlog | - |
1: Ready | Label: Ready | |
2: In progress | Label: In progress | |
3: On hold | Label: On hold | |
4: Please review | Label: Please review | |
5: To deploy | Label: To deploy | |
100: Invalid | More than one | |
Priority | 0: Urgent | Label: Priority/Urgent |
1: High | Label: Priority/High | |
2: Regular | - | |
3: Low | Label: Priority/Low | |
100: Invalid | More than one | |
Valid | True | See below |
False | Otherwise |
An issue is valid if it is:
- State: Closed
- or, State: Open, Milestone: !None, Effort: !Invalid, Priority: !Invalid, Due date: <= (Milestone.end_date, today)
- Phase: Backlog, Assigned: None
- or, Phase: !Backlog !Invalid, Assigned: !None
<Name>
group
Issue lint report for Milestone missing
Path | Title | Effort | Priority | Due |
---|---|---|---|---|
example#3 | Example t... | High | Low | 2019-13-13 |
Section logic:
Select all OPEN TICKETS in GROUP that are missing a MILESTONE
Order by PRIORITY, DUE DATE, PATH
Due date missing
Path | Title | Effort | Priority | Due |
---|---|---|---|---|
example#3 | Example t... | High | Low | 2019-13-13 |
Section logic:
Select all OPEN TICKETS in GROUP that have a MILESTONE and are missing a DUE DATE
Order by PRIORITY, (DUE DATE), PATH
Invalid due date
Path | Title | Effort | Priority | Due |
---|---|---|---|---|
example#3 | Example t... | High | Low | 2019-13-13 |
Section logic:
Select all OPEN TICKETS in GROUP that have a MILESTONE and DUE DATE but DUE DATE > MILESTONE.END
Order by PRIORITY, (DUE DATE), PATH
Overdue
Path | Title | Effort | Priority | Due |
---|---|---|---|---|
example#3 | Example t... | High | Low | 2019-13-13 |
Section logic:
Select all OPEN TICKETS in GROUP that have a MILESTONE and DUE DATE
And DUE DATE <= MILESTONE.END
And DUE DATE <= TODAY
Order by PRIORITY, (DUE DATE), PATH
Invalid state
Path | Title | Effort | Priority | Due |
---|---|---|---|---|
example#3 | Example t... | High | Low | 2019-13-13 |
Section logic:
Select all OPEN TICKETS in GROUP that have a MILESTONE and DUE DATE
And DUE DATE <= MILESTONE.END
And DUE DATE > TODAY
And [
EFFORT = INVALID
Or PHASE = INVALID
Or PRIORITY = INVALID
]
Order by PRIORITY, DUE DATE, PATH
Assigned without phase
Path | Title | Effort | Priority | Due |
---|---|---|---|---|
example#3 | Example t... | High | Low | 2019-13-13 |
Section logic:
Select all OPEN TICKETS in GROUP that have a MILESTONE and DUE DATE
And DUE DATE <= MILESTONE.END
And DUE DATE > TODAY
And EFFORT != INVALID
And PRIORITY != INVALID
And PHASE == BACKLOG
And ASSIGNED != NULL
Order by PRIORITY, DUE DATE, PATH
Ready but unassigned
Path | Title | Effort | Priority | Due |
---|---|---|---|---|
example#3 | Example t... | High | Low | 2019-13-13 |
Section logic:
Select all OPEN TICKETS in GROUP that have a MILESTONE and DUE DATE
And DUE DATE <= MILESTONE.END
And DUE DATE > TODAY
And EFFORT != INVALID
And PRIORITY != INVALID
And PHASE == READY
And ASSIGNED == NULL
Order by PRIORITY, DUE DATE, PATH
Edited by David Seaward