Skip to content

fix!: remove silent boardId=1 fallback in tickets.list()#49

Merged
asachs01 merged 1 commit into
mainfrom
fix/tickets-list-explicit-board-id
Jul 4, 2026
Merged

fix!: remove silent boardId=1 fallback in tickets.list()#49
asachs01 merged 1 commit into
mainfrom
fix/tickets-list-explicit-board-id

Conversation

@asachs01

@asachs01 asachs01 commented Jul 4, 2026

Copy link
Copy Markdown
Member

Summary

Root-cause fix for wyre-technology/ninjaone-mcp#54: TicketsResource.list() silently defaulted boardId to 1, but board IDs are tenant-specific — board 1 is not guaranteed to be the "All Tickets" board. On a multi-board tenant this returned 1 ticket instead of ~1,400, with no error or warning.

Changes

  • TicketListParams.boardId is now required (compile-time enforcement), and list() throws a descriptive error at runtime for JS callers that omit it — no more silent board-1 fallback.
  • The error and doc comments explain how to discover board IDs via listBoards(), plus the web-UI fallback for tenants where GET /api/v2/ticketing/trigger/board returns 404 (documented on listBoards() as well).

Breaking change

list() calls without boardId now throw instead of querying board 1. Consumers must pass an explicit board ID (the companion MCP-server change already does: wyre-technology/ninjaone-mcp will require board_id on its ninjaone_tickets_list tool).

Testing

  • New test: list({}) rejects with an error mentioning boardId (verified failing before the fix).
  • Existing bare list() test updated to pass boardId: 2.
  • 86/86 tests pass; build clean; the 4 lint warnings are pre-existing in untouched fixture files.

Refs wyre-technology/ninjaone-mcp#54

Board IDs are tenant-specific: board 1 is not guaranteed to be the
"All Tickets" board. On multi-board tenants the fallback silently
queried the wrong board — 1 ticket returned instead of ~1,400 in the
reported case, with no error or warning. list() now requires boardId
(enforced in the type and at runtime for JS callers) and the error
explains how to discover board IDs, including the web-UI fallback for
tenants where GET /api/v2/ticketing/trigger/board returns 404.

BREAKING CHANGE: TicketsResource.list() requires params.boardId; calls
without it throw instead of silently defaulting to board 1.

Refs: wyre-technology/ninjaone-mcp#54
@asachs01 asachs01 merged commit 288ed82 into main Jul 4, 2026
2 checks passed
github-actions Bot pushed a commit that referenced this pull request Jul 4, 2026
# [2.0.0](v1.1.3...v2.0.0) (2026-07-04)

* fix!: remove silent boardId=1 fallback in tickets.list() ([#49](#49)) ([288ed82](288ed82)), closes [wyre-technology/ninjaone-mcp#54](wyre-technology/ninjaone-mcp#54)

### BREAKING CHANGES

* TicketsResource.list() requires params.boardId; calls
without it throw instead of silently defaulting to board 1.
asachs01 added a commit to wyre-technology/ninjaone-mcp that referenced this pull request Jul 4, 2026
Picks up the SDK major that removed the silent boardId=1 fallback in
TicketsResource.list() (wyre-technology/node-ninjaone#49, the root-cause
fix behind #54). No code changes needed: ninjaone_tickets_list already
requires board_id and always passes it.

Also re-pins the release reusable to wyre-technology/.github#32: the npm
registry rejects custom App installation tokens for cross-repo package
reads, which failed the v2.0.0 Docker image build. The fixed reusable
authenticates npm with GITHUB_TOKEN + packages: read, so this release
ships the image, MCP Registry publish, and deploy that v2.0.0 skipped.
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.

1 participant