Skip to content

Fix: Resolved/Done/Completed work items appear in the timer task picker#118

Open
jdschleicher wants to merge 1 commit into
mainfrom
claude/resolved-stories-timer-selection-KtKgM
Open

Fix: Resolved/Done/Completed work items appear in the timer task picker#118
jdschleicher wants to merge 1 commit into
mainfrom
claude/resolved-stories-timer-selection-KtKgM

Conversation

@jdschleicher
Copy link
Copy Markdown
Owner

@jdschleicher jdschleicher commented May 25, 2026

Section Status
Summary
Issue Closes #113
Changes ✅ 1 file
Test Plan ✅ 4 items
Skill Reports
🐚 Bash Engineer Review ✅ APPROVE — View
💠 PowerShell Engineer Review ✅ APPROVE — View
🛡️ Security Audit ✅ APPROVE — View
🧼 Clean-Code Engineer Review ✅ APPROVE — View
✅ Criteria Check ✅ PASS — View
📚 Docs Check ✅ CURRENT — run inline (no new files/CLI/setup drift)
📊 AzDO Diagrams Check ✅ CURRENT — no function/subcommand delta in this PR

Summary

The timer task picker (Start-TimerSession → "Azure DevOps - User Stories") was listing finished work items. The shared Get-AzDevOpsClosedStates helper only excluded Closed and Removed, so items in Resolved (Agile/CMMI), Done (Scrum), and Completed states leaked through Select-AzDevOpsActiveItems into the picker — and into every other active-items view that shares the helper.

Issue

Closes #113

Changes

  • powcuts_by_cli/azdevops_views.ps1Get-AzDevOpsClosedStates now returns Closed, Removed, Resolved, Done, Completed.

One-line change at the single filtering chokepoint fixes the timer picker plus az-Find-AzDevOpsWorkItem, the create-flow pickers, and the assigned/board/feature views consistently. The explicit -State override path is unaffected — it matches $_.State -in $State directly and never consults the closed list.

Test Plan

  • Open a fresh PowerShell terminal (or re-dot-source powcuts_home.ps1)
  • Ensure assigned.json has at least one Resolved and one Done item (az-Sync-AzDevOpsCache)
  • Run Start-TimerSession, choose "Azure DevOps - User Stories" — confirm no Resolved/Done/Completed items appear
  • Confirm the archive/override path still works: az-Get-AzDevOpsAssigned -State Resolved still lists them

PowerShell-only: the timer has no bash counterpart, so no bashcuts_by_cli/ change applies.

Get-AzDevOpsClosedStates only excluded Closed/Removed, so finished
items in Resolved (Agile/CMMI), Done (Scrum), and Completed states
leaked through Select-AzDevOpsActiveItems into the Start-TimerSession
picker and every other active-items view. Add those states to the
exclusion list. The explicit -State override path is unaffected.

Closes #113

https://claude.ai/code/session_01PMrQtZFmKo3KQenf7HFmaE
Copy link
Copy Markdown
Owner Author

🐚 Senior Bash Engineer

Summary

The only file changed in this branch's diff against origin/main is powcuts_by_cli/azdevops_views.ps1, a PowerShell file. No bash files (bashcuts_by_cli/* or .bcut_home) are touched.

Sourcing Wire-Up

N/A — no bash files added or changed.

Naming Convention

N/A — no bash aliases/functions in this diff.

Verdict

APPROVE — no bash files in this diff.


Generated by Claude Code

Copy link
Copy Markdown
Owner Author

🛡️ Senior Security Engineer

Verdict: APPROVE — no security concerns.

Scope reviewed: git diff origin/main...HEAD — a single-line change in powcuts_by_cli/azdevops_views.ps1. Get-AzDevOpsClosedStates now returns @('Closed', 'Removed', 'Resolved', 'Done', 'Completed') instead of @('Closed', 'Removed').

Findings:

  • The value is a static, hardcoded array of literal strings. No user input, no string interpolation, no environment/argument influence.
  • Consumed only for in-memory -in / -notin filtering of work items (azdevops_views.ps1:278, azdevops_find.ps1:61, azdevops_create_pickers.ps1:189). No command execution, file/path access, network calls, secrets, or deserialization.
  • No injection, traversal, or privilege surface introduced.

The only functional effect is broader closed-state filtering, which is the intended behavior change and carries no security risk.


Generated by Claude Code

Copy link
Copy Markdown
Owner Author

💠 Senior PowerShell Engineer

Summary

One .ps1 file changed: powcuts_by_cli/azdevops_views.ps1. A single-line change expands Get-AzDevOpsClosedStates from @('Closed', 'Removed') to @('Closed', 'Removed', 'Resolved', 'Done', 'Completed') so completed/done work items are excluded from active-items views and the timer task picker. The change is correct and low-risk.

Findings

Severity Location Issue
LOW azdevops_views.ps1:253 Helper name Get-AzDevOpsClosedStates now also returns terminal-but-not-"closed" states (Resolved, Done, Completed). The name is mildly misleading — a name like Get-AzDevOpsTerminalStates / Get-AzDevOpsDoneStates would read truer. Rename parked as out-of-scope per issue #113; acceptable to defer.

Notes verified during review:

  • Parse: pwsh not on PATH — visual review only; the array literal is trivially valid syntax.
  • Approved verbs: PASS — no new functions; Get- unchanged.
  • Write-Host / aliases / side effects: none introduced.
  • Usage: All three consumers (azdevops_views.ps1:272, azdevops_find.ps1:61, azdevops_create_pickers.ps1:189) use the result as a -notin exclusion list, so the broader terminal-state set correctly filters finished items everywhere — no caller assumes exactly two states.

Dot-Sourcing Wire-Up

WIRED — no new files; existing file already dot-sourced.

Approved Verbs

PASS — no new function names.

Verdict

APPROVE — no blocking issues. One LOW naming nit, already tracked for a future rename (#113).


Generated by Claude Code

Copy link
Copy Markdown
Owner Author

🧼 Senior Clean-Code Engineer

Summary

One file changed (powcuts_by_cli/azdevops_views.ps1), one line: Get-AzDevOpsClosedStates now returns @('Closed', 'Removed', 'Resolved', 'Done', 'Completed') instead of @('Closed', 'Removed'). Structurally this is the right change made in the right place — the literal lives in a single helper and the three filter call sites all route through it, so the new states propagate everywhere with zero duplication.

Findings

Severity Location Issue
(none) HIGH No extract-repeated-branches or parallel-pair violations. The state list is already centralized; no inline -notin @('Closed',...) literals were reintroduced.
LOW azdevops_views.ps1:253 Helper name is now mildly misleadingGet-AzDevOpsClosedStates returns states beyond "closed" (Resolved/Done/Completed are completed-but-not-closed). A name like Get-AzDevOpsCompletedStates (or ...TerminalStates) would read truer at the three -notin $closedStates callsites. Per issue #113 this rename is explicitly out of scope, so noting only — do not block.
LOW azdevops_views.ps1:254 The five state strings are a magic list, but they are correctly named-via-function and single-sourced, which is the whole point of the helper. No action.

Duplication Map

Pattern Callsites Proposed helper
"closed/terminal state filter" views:278, find:66, create_pickers:213, create_pickers:217 Already extractedGet-AzDevOpsClosedStates

Verified 'Done' hits in pow_timer.ps1 are an unrelated debrief next-action UI token, not a duplicated state literal.

Function Sizes

Function Lines (body) Verdict
Get-AzDevOpsClosedStates 1 OK — minimal single-purpose chokepoint

Breathing Room

Two blank lines preserved on both sides of the function. No nits.

Verdict

APPROVE — well-factored, no blocking duplication. The change is a one-line data edit to the correct single source of truth; all five consumers benefit automatically. The only observation is the now-slightly-inaccurate Closed in the helper name, which #113 has already parked as out-of-scope.


Generated by Claude Code

Copy link
Copy Markdown
Owner Author

✅ Criteria Check — #113: Hide Resolved/Done/Completed from timer picker

Syntax Checks

  • ✅ Bash: no bash files changed in this diff
  • ⏭️ PowerShell: SKIPPED — pwsh not on PATH (change is a literal array edit, no syntax risk)

Acceptance Criteria

# Criterion Status Evidence
1 Get-AzDevOpsClosedStates returns Closed, Removed, Resolved, Done, Completed ✅ VERIFIED azdevops_views.ps1:254return @('Closed', 'Removed', 'Resolved', 'Done', 'Completed')
2 Timer picker no longer lists Resolved/Done items 🔍 MANUAL pow_timer.ps1:1277 calls Select-AzDevOpsActiveItems, which now excludes the new states; needs a fresh-terminal run against a cache containing Resolved/Done items
3 Other Select-AzDevOpsActiveItems consumers consistent ✅ VERIFIED azdevops_find.ps1:61, azdevops_create_pickers.ps1:189, and views at azdevops_views.ps1:471,600,1143,1276 all route through the shared helper/Select-AzDevOpsActiveItems
4 -State Resolved/Done/Completed override still surfaces those items ✅ VERIFIED azdevops_views.ps1:274-275 — override path matches $_.State -in $State, never consults the closed list
5 pwsh parses azdevops_views.ps1 + pow_timer.ps1 ⏭️ SKIPPED pwsh unavailable in this environment
6 Verified in a fresh PowerShell terminal 🔍 MANUAL requires hands-on run

Summary

Status Count
✅ VERIFIED 3
⚠️ PARTIAL 0
❌ MISSING 0
🔍 MANUAL 2
⏭️ SKIPPED 1

Manual Verification Checklist

  • In a fresh PowerShell terminal, ensure assigned.json has at least one Resolved and one Done item (az-Sync-AzDevOpsCache), then run Start-TimerSession → "Azure DevOps - User Stories" and confirm those items are absent.
  • Run az-Get-AzDevOpsAssigned -State Resolved and confirm Resolved items still appear (override path unaffected).

Verdict

PASS — all automated criteria verified; 2 items need manual terminal testing (expected for an interactive picker with no test runner).


Generated by Claude Code

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.

Fix: Resolved/Done/Completed work items appear in the timer task picker

2 participants