feat: atl jira sprint lifecycle commands (create/edit/start/close/list/move/backlog)#57
Conversation
PUT is a full replace that nulls omitted fields; partial bodies like
{state:"closed"} would wipe name/goal/dates. POST is the Agile
partial-update verb.
…ints If --duration or date flags are malformed, fail before the server-side mutation so no unstarted sprint is left behind. Claude-Session: https://claude.ai/code/session_01BtsGd9FVEFf5L7FZZJvrLu
Implements `atl jira sprint close <id>` with a [y/N] confirmation prompt (skipped with --force, --json, or non-TTY stdin). GetSprint is used best-effort to show the sprint name in the prompt; falls back to numeric ID on error. Removes the placeholder stub from sprint.go. Claude-Session: https://claude.ai/code/session_01BtsGd9FVEFf5L7FZZJvrLu
Match the existing 'atl jira issue sprint --sprint <name>' lookup (issue/sprint.go) so name resolution is consistent across both commands.
- Fixed duplicate sprint names in examples (Sprint 30 → Sprint 31 for second create) - Clarified backlog command moves issues out of sprints to board backlog - Ensured example references are unambiguous
There was a problem hiding this comment.
Code Review
This pull request introduces a new sprint command group (atl jira sprint) to manage the Jira sprint lifecycle, including commands to create, edit, start, close, and list sprints, as well as move issues in and out of sprints. Feedback on the changes highlights several improvement opportunities, including resolving timezone mismatches by using time.Now().UTC(), refining the sprint name matching logic to prioritize exact matches over substrings, and adding defensive nil-pointer checks when processing sprint objects returned from the API.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
The Agile sprint endpoint caps page size server-side (~50), so boards with many sprints previously returned only the first page. Follow startAt until isLast so list/name-lookup see the full set.
…C now - newSprintDetail/printSprint/list: guard against nil *Sprint elements - move: two-pass name match (exact before substring) so an exact name is never shadowed by an earlier substring match; keeps substring fallback - create/start: use time.Now().UTC() so the default start aligns with the UTC-parsed explicit dates
…, date doc - GetSprints: terminate on short page + hard maxPages bound (guards a non-conformant server that ignores startAt / omits isLast) - create: say 'Created and started' when --start so the message matches state - docs: clarify create can take explicit dates without --start
Merging this branch changes the coverage (1 decrease, 1 increase)
Coverage by fileChanged files (no unit tests)
Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code. Changed unit test files
|
Summary
Adds a full sprint lifecycle command group under
atl jira sprint:Until now
atlcould only move issues between existing sprints (atl jira issue sprint) — it could not create a sprint, set a goal, or start/close one. This fills that gap.Design
internal/cmd/sprint/group registered under the existingjiragroup (internal/cmd/jira/jira.go). No top-level alias;internal/cmd/issue/sprint.gois unchanged.dates.gowith table tests;nowinjected for determinism.internal/api/jira.go:CreateSprint,UpdateSprint,GetSprint.UpdateSprintuses POST (Agile partial update — PUT would null omitted fields, verified against Atlassian docs).write:sprint:jira-softwarewas already inDefaultScopes().closeconfirms[y/N]unless--force/--json/non-TTY (mirrorsissue/comment/delete.go). Every command supports--json.Testing
make checkgreen;golangci-lint0 issues; fullgo test ./...passing.parseDuration,resolveActiveDates,build*Body) table-tested. Network-bound command/API wrappers follow the existing house pattern of no unit tests (const AtlassianAPIURLmakes HTTP round-trips untestable).Draft — pending live verification
Before marking ready, a live run against a real board will confirm (a) the goal persists at creation and (b)
close/start/editprint a real sprint ID (notSprint 0) — i.e. the Agile update endpoint returns a populated body. Trivial fallback fix on standby if not.https://claude.ai/code/session_01BtsGd9FVEFf5L7FZZJvrLu