diff --git a/src/commands/issue/issue-view.ts b/src/commands/issue/issue-view.ts index fdd590c1..5852ea1a 100644 --- a/src/commands/issue/issue-view.ts +++ b/src/commands/issue/issue-view.ts @@ -122,8 +122,11 @@ export const viewCommand = new Command() const { identifier } = issueData - // Build metadata line with project and milestone + // Build metadata line with state, project and milestone const metaParts: string[] = [] + if (issueData.state) { + metaParts.push(`**State:** ${issueData.state.name}`) + } if (issueData.project) { metaParts.push(`**Project:** ${issueData.project.name}`) } diff --git a/test/commands/issue/__snapshots__/issue-view.test.ts.snap b/test/commands/issue/__snapshots__/issue-view.test.ts.snap index b8e1162f..bd64bc90 100644 --- a/test/commands/issue/__snapshots__/issue-view.test.ts.snap +++ b/test/commands/issue/__snapshots__/issue-view.test.ts.snap @@ -28,6 +28,8 @@ snapshot[`Issue View Command - With Mock Server Terminal No Comments 1`] = ` stdout: "# TEST-123: Fix authentication bug in login flow +**State:** In Progress + Users are experiencing issues logging in when their session expires. This affects the main authentication flow and needs to be resolved quickly. ## Steps to reproduce @@ -50,6 +52,8 @@ snapshot[`Issue View Command - With No Comments Flag 1`] = ` stdout: "# TEST-123: Fix authentication bug in login flow +**State:** In Progress + Users are experiencing issues logging in when their session expires. " stderr: @@ -60,6 +64,8 @@ snapshot[`Issue View Command - With Comments Default 1`] = ` stdout: "# TEST-123: Fix authentication bug in login flow +**State:** In Progress + Users are experiencing issues logging in when their session expires. ## Comments @@ -168,6 +174,8 @@ snapshot[`Issue View Command - With Parent And Sub-issues 1`] = ` stdout: "# TEST-456: Implement user authentication +**State:** In Progress + Add user authentication to the application. ## Parent @@ -190,7 +198,7 @@ snapshot[`Issue View Command - With Project And Milestone 1`] = ` stdout: "# TEST-789: Add monitoring dashboards -**Project:** Platform Infrastructure Q1 | **Milestone:** Phase 2: Observability +**State:** In Progress | **Project:** Platform Infrastructure Q1 | **Milestone:** Phase 2: Observability Set up Datadog dashboards for the new service. " @@ -202,7 +210,7 @@ snapshot[`Issue View Command - With Cycle 1`] = ` stdout: "# TEST-890: Implement rate limiting -**Project:** API Gateway v2 | **Cycle:** Sprint 7 +**State:** Todo | **Project:** API Gateway v2 | **Cycle:** Sprint 7 Add rate limiting to the API gateway. "