Dev Tracking Data Compilersqlite

Saved queries

The six questions this database is built to answer. Each runs unchanged on SQLite and Postgres.

1. Acceptance criteria with no linked commits or no linked tests2. Commits not tied to any task3. Cycle time4. Requirements changed after the code for one of their criteria merged5. Review turnaround by reviewer6. Full trace for one requirement

6. Full trace for one requirement: requirement -> criteria -> tasks -> commits -> PRs -> reviews.

REQ-CLICK-01 REQ-CLICK-02 REQ-CLICK-03 REQ-HTTPX-01 REQ-HTTPX-02 REQ-HTTPX-03 REQ-REQ-01 REQ-REQ-02 REQ-REQ-03 SUB-CLI-01 SUB-HTTP-01 SYS-01
SQL
-- 6. Full trace for one requirement: requirement -> criteria -> tasks -> commits -> PRs -> reviews.
-- LEFT JOINs keep the gaps visible: a criterion with no task shows NULLs to the right.
SELECT r.key AS requirement,
       a.key AS criterion,
       a.text AS criterion_text,
       t.key AS task,
       t.status AS task_status,
       c.repo,
       c.sha,
       c.committed_at,
       pr.number AS pr_number,
       pr.title AS pr_title,
       pr.merged_at,
       rv.state AS review_state,
       rp.display_name AS reviewer,
       rv.submitted_at AS reviewed_at
FROM requirements r
JOIN requirement_criteria rc ON rc.requirement_id = r.id
JOIN acceptance_criteria a ON a.id = rc.criterion_id
LEFT JOIN task_criteria tc ON tc.criterion_id = a.id
LEFT JOIN tasks t ON t.id = tc.task_id
LEFT JOIN commit_tasks ct ON ct.task_id = t.id
LEFT JOIN commits c ON c.id = ct.commit_id
LEFT JOIN pull_request_commits prc ON prc.commit_id = c.id
LEFT JOIN pull_requests pr ON pr.id = prc.pull_request_id
LEFT JOIN reviews rv ON rv.pull_request_id = pr.id
LEFT JOIN people rp ON rp.id = rv.reviewer_id
WHERE r.key = ?
ORDER BY a.key, t.key, c.committed_at, rv.submitted_at;

11 rows

requirementcriterioncriterion_texttasktask_statusreposhacommitted_atpr_numberpr_titlemerged_atreview_statereviewerreviewed_at
REQ-HTTPX-02AC-HTTPX-201-1Query parameters encode spaces as `+` (form encoding).TASK-HTTPX-2012doneencode/httpxba2e51215e4e619540f2a24282b84ed8a738e6fd2024-10-28T16:19:59Z3373Review urlescape percent-safe set, and use + behavior for form spaces.2024-10-28T16:19:59ZAPPROVEDJamal Wright2024-10-25T14:50:58Z
REQ-HTTPX-02AC-HTTPX-201-1Query parameters encode spaces as `+` (form encoding).TASK-HTTPX-2012doneencode/httpxba2e51215e4e619540f2a24282b84ed8a738e6fd2024-10-28T16:19:59Z3373Review urlescape percent-safe set, and use + behavior for form spaces.2024-10-28T16:19:59ZAPPROVEDSofia Reyes2024-10-27T21:26:16Z
REQ-HTTPX-02AC-HTTPX-201-1Query parameters encode spaces as `+` (form encoding).TASK-HTTPX-2012doneencode/httpxba2e51215e4e619540f2a24282b84ed8a738e6fd2024-10-28T16:19:59Z3373Review urlescape percent-safe set, and use + behavior for form spaces.2024-10-28T16:19:59ZAPPROVEDNina Kowalski2024-10-28T07:35:09Z
REQ-HTTPX-02AC-HTTPX-201-2A `/` inside a query parameter value is percent-encoded as `%2F`.TASK-HTTPX-2013doneencode/httpx5dda2aa30692e8529555f57efa7bcd203a7d5ac12024-10-28T17:38:16Z3376Just use default `safe=...` characters for `urlescape`2024-10-28T17:38:16ZCOMMENTEDNina Kowalski2024-10-28T02:24:26Z
REQ-HTTPX-02AC-HTTPX-201-2A `/` inside a query parameter value is percent-encoded as `%2F`.TASK-HTTPX-2013doneencode/httpx5dda2aa30692e8529555f57efa7bcd203a7d5ac12024-10-28T17:38:16Z3376Just use default `safe=...` characters for `urlescape`2024-10-28T17:38:16ZAPPROVEDSofia Reyes2024-10-28T10:05:06Z
REQ-HTTPX-02AC-HTTPX-201-3The behaviour change is called out in the CHANGELOG under backwards-incompatible changes.TASK-HTTPX-2011doneencode/httpxd293374b6603816420a2bb8e7f4fe5a5f09cbfcc2024-10-28T15:06:10Z3371Review URL percent escaping sets, from whatwg.2024-10-28T15:06:10ZAPPROVEDJamal Wright2024-10-28T08:22:10Z
REQ-HTTPX-02AC-HTTPX-201-3The behaviour change is called out in the CHANGELOG under backwards-incompatible changes.TASK-HTTPX-2012doneencode/httpxba2e51215e4e619540f2a24282b84ed8a738e6fd2024-10-28T16:19:59Z3373Review urlescape percent-safe set, and use + behavior for form spaces.2024-10-28T16:19:59ZAPPROVEDJamal Wright2024-10-25T14:50:58Z
REQ-HTTPX-02AC-HTTPX-201-3The behaviour change is called out in the CHANGELOG under backwards-incompatible changes.TASK-HTTPX-2012doneencode/httpxba2e51215e4e619540f2a24282b84ed8a738e6fd2024-10-28T16:19:59Z3373Review urlescape percent-safe set, and use + behavior for form spaces.2024-10-28T16:19:59ZAPPROVEDSofia Reyes2024-10-27T21:26:16Z
REQ-HTTPX-02AC-HTTPX-201-3The behaviour change is called out in the CHANGELOG under backwards-incompatible changes.TASK-HTTPX-2012doneencode/httpxba2e51215e4e619540f2a24282b84ed8a738e6fd2024-10-28T16:19:59Z3373Review urlescape percent-safe set, and use + behavior for form spaces.2024-10-28T16:19:59ZAPPROVEDNina Kowalski2024-10-28T07:35:09Z
REQ-HTTPX-02AC-HTTPX-201-3The behaviour change is called out in the CHANGELOG under backwards-incompatible changes.TASK-HTTPX-2013doneencode/httpx5dda2aa30692e8529555f57efa7bcd203a7d5ac12024-10-28T17:38:16Z3376Just use default `safe=...` characters for `urlescape`2024-10-28T17:38:16ZCOMMENTEDNina Kowalski2024-10-28T02:24:26Z
REQ-HTTPX-02AC-HTTPX-201-3The behaviour change is called out in the CHANGELOG under backwards-incompatible changes.TASK-HTTPX-2013doneencode/httpx5dda2aa30692e8529555f57efa7bcd203a7d5ac12024-10-28T17:38:16Z3376Just use default `safe=...` characters for `urlescape`2024-10-28T17:38:16ZAPPROVEDSofia Reyes2024-10-28T10:05:06Z