Skip to content

Fix projects list truncating due to admin API and top limit#1

Open
keith-at-wildeye wants to merge 2 commits intomainfrom
fix/projects-top-limit
Open

Fix projects list truncating due to admin API and top limit#1
keith-at-wildeye wants to merge 2 commits intomainfrom
fix/projects-top-limit

Conversation

@keith-at-wildeye
Copy link
Copy Markdown
Collaborator

Problem

yt create (and any command that resolves a project short name to an internal ID) was failing for projects not returned by GetProjectsAsync. Two issues:

  1. $top=100 hardcoded — truncates results on larger YouTrack instances
  2. Uses /api/admin/projects — only returns projects where the token has admin access, which can be a much smaller set than all accessible projects

Fix

  • Increase $top to 500
  • Switch from /api/admin/projects to /api/projects so all projects accessible to the token are returned, not just admin ones

Note

The non-admin /api/projects endpoint returns projects the authenticated user can see, which is the correct set for resolving project names when creating issues.

keith-at-wildeye and others added 2 commits March 10, 2026 13:10
GetProjectsAsync used a hardcoded $top=100 which caused create and
other commands to fail for projects beyond the 100th result. Increased
to 500 to accommodate larger YouTrack instances.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The admin API only returns projects where the token has admin access,
which may exclude valid projects. If a project short name is not found
via the admin API, resolve its ID by searching for an existing issue
in that project instead.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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