Skip to content

Add Stub_ShowProjectInbox to surface project items without Status#229

Closed
Copilot wants to merge 4 commits into
mainfrom
copilot/stub-show-project-inbox
Closed

Add Stub_ShowProjectInbox to surface project items without Status#229
Copilot wants to merge 4 commits into
mainfrom
copilot/stub-show-project-inbox

Conversation

Copilot AI commented Jun 21, 2026

Copy link
Copy Markdown

This PR adds a new inbox stub to show project items that do not have a Status value, following the same implementation/test pattern used for existing project-item stubs. It also adds a focused test that reuses existing mock/test helper infrastructure.

  • Problem addressed

    • Introduce a dedicated stub for “inbox” items (items with missing/empty Status) and cover it with tests using the current test module helpers/patterns.
  • Production changes

    • Added Stub_ShowProjectInbox in public/items/project_item.ps1.
    • Behavior:
      • resolves project context (Owner/ProjectNumber)
      • retrieves items through Search-ProjectItem -IncludeDone -PassThru
      • filters to items where Status is null/empty/whitespace
      • returns raw items with -PassThru, otherwise pipes to Use-Order for interactive display
  • Test changes

    • Added Test_StubShowProjectInbox_SUCCESS in Test/public/project_item.searchprojectitem.test.ps1.
    • Reuses existing mock project setup (Get-Mock_Project_700, MockCall_GetProject_700) and validates:
      • only empty-status items are returned
      • returned IDs match expected inbox candidates from mock data
function Stub_ShowProjectInbox{
    param([string]$Owner, [string]$ProjectNumber, [switch]$PassThru)

    ($Owner, $ProjectNumber) = Resolve-ProjectParameters -Owner $Owner -ProjectNumber $ProjectNumber
    $items = Search-ProjectItem -Owner $Owner -ProjectNumber $ProjectNumber -IncludeDone -PassThru
    $items = @($items | Where-Object { [string]::IsNullOrWhiteSpace($_.Status) })

    if($PassThru){ return $items }
    return $items | Use-Order
}

Copilot AI changed the title [WIP] Create stub to show items with no Status Add Stub_ShowProjectInbox to surface project items without Status Jun 21, 2026
Copilot AI requested a review from rulasg June 21, 2026 19:22
@rulasg rulasg closed this Jun 22, 2026
@rulasg rulasg deleted the copilot/stub-show-project-inbox branch June 22, 2026 13:48
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