Skip to content

Expose cycles in issue query, mine, and view - #252

Merged
schpetbot merged 1 commit into
mainfrom
cycles-in-issue-output
Jul 21, 2026
Merged

Expose cycles in issue query, mine, and view#252
schpetbot merged 1 commit into
mainfrom
cycles-in-issue-output

Conversation

@schpetbot

Copy link
Copy Markdown
Collaborator

Adds cycle visibility across issue output and makes cycle updates easy.

Tables (issue query, issue mine)

New compact CYC column, shown only when a listed team has cycles enabled:

  • now (green) — the team's active cycle
  • +1 / -1 — from the API's isNext/isPrevious flags (these take precedence so display always agrees with --cycle next/previous selection)
  • +N / -N — offset from team.activeCycle.number
  • #N — absolute fallback when there is no anchor (cooldown or before the first cycle starts)
  • - — no cycle

issue view

The Cycle meta part now reads **Cycle:** #7 Sprint 7 (now) / #8 (+1) using the same vocabulary.

JSON

issue query --json / issue view --json now carry cycle { id number name isActive isNext isPrevious isFuture isPast } and team { cyclesEnabled activeCycle { number } } in raw GraphQL shape.

Updating cycles

  • issue update <id> --cycle next — also now, previous, and signed offsets (+2, --cycle=-1); relative offsets require an active cycle and error with guidance otherwise
  • issue update <id> --clear-cycle — sends an explicit cycleId: null (mirrors --unassign); conflicts with --cycle
  • The same vocabulary works for --cycle filters on issue query/issue mine/issue create and cycle view
  • Reserved words shadow coincidental cycle names; use the cycle number to reach a cycle literally named "next"

Fixes and hardening

  • issue query --search --cycle silently dropped the cycle filter; it now filters
  • Cycle lookup paginates past the first 250 cycles
  • Using --cycle against a team with cycles disabled now errors with "Cycles are not enabled for team X" instead of a generic not-found

Issue tables gain a compact CYC column (only when a listed team has
cycles enabled): 'now' for the active cycle, +1/-1 from the API's
next/previous flags, +N/-N anchored on team.activeCycle, and #N when no
anchor exists (cooldown or pre-first-cycle). issue view annotates its
Cycle meta part with the same token, and issue JSON output now carries
the cycle flags and team anchor in raw GraphQL shape.

The shared cycle resolver understands now/next/previous and signed
offsets, so --cycle on query/mine/create/update and cycle view all
speak the relative vocabulary. issue update gains --clear-cycle
(explicit cycleId: null, mirroring --unassign). Also fixes issue query
--search silently dropping the --cycle filter.
@schpetbot
schpetbot force-pushed the cycles-in-issue-output branch from 3ca2482 to c09482e Compare July 21, 2026 20:09
@schpetbot
schpetbot merged commit aad5f2f into main Jul 21, 2026
15 checks passed
@schpetbot
schpetbot deleted the cycles-in-issue-output branch July 21, 2026 20:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants