Get more info about the flow of work in a Jira Cloud project.
✅ Fetch a collection of issues based on some JQL (filter) query
❌ Handle limitations on the number of issues (check for pagination or similar)
✅ Authentication configured via environment variables (or .env)
✅ Query configured via env vars as well
✅ Fetch changelog of issues
✅ Determine date of issue going into "In Progress"
✅ "In Progress" state configured via env vars (currently hard coded as "In Progress")
❌ Deal with issues that were moved in and out of "In Progress" multiple times
✅ Calculate data for a cycle time histogram (# of days between going into "In Progress" and the issue's resolutionDate)
✅ Ignore issues that never went into "In Progress"
✅ Display the histogram, show the user
✅ Calculate data for a cycle time graph showing what percentage of all issues was completed in what period of time
✅ Display the cycle time percentages graph
✅ Calculate data for a Cumulative Flow Diagram (CFD)
✅ Display a Cumulative Flow Diagram
✅ Configure states for CFD via env vars
✅ Remove weekends from CFD
We need a couple of environment variables set. You can use a .env file to do so.
Auth / API:
ATLASSIAN_USER_EMAIL- The email of the account to authenticate withATLASSIAN_API_TOKEN- An API token of the account to authenticate with (here's how to create: Atlassian docs)JIRA_API_BASE_URL- The base URL of the Jira instance you want to talk to (e.g.https://<myCompany>.atlassian.net/rest/api/2)
Queries:
JIRA_JQL_QUERY_CYCLE_TIMES- The query to fetch issues to report cycle times on (e.g.project = MYPROJ AND status = Done AND created >= -30d)JIRA_JQL_QUERY_CFD- The query to fetch issues to run the Cumulative Flow Diagram (CFD) on (e.g.project = MYPROJ)
States:
TODO_STATE_STRING- The state that depicts "To Do" (e.g.To Do)IN_PROGRESS_STATE_STRING- The state that depicts "In Progress" (e.g.In Progress)
- Fetch dependencies:
bun install - Run once:
bun index.ts - Run in watch mode:
bun --watch index.ts
- Run tests once:
bun test - Run in watch mode:
bun --watch test
Cf. Contributing.md
