Skip to content
Discussion options

You must be logged in to vote

This is a known and painful behavior of the ProjectV2 API you are not missing anything obvious.

When you call updateProjectV2Field to add a new option or iteration, GitHub replaces the entire field definition rather than appending to it. Any issue assignments referencing the old option IDs become orphaned because the IDs change with each update, effectively wiping all existing assignments.

The safe pattern is to always read the existing options first, then include all of them plus your new addition in the update call never send just the new item alone. Think of it as a full replace operation, not an append.

For sprint creation specifically across 30+ projects, the safer approach is using a…

Replies: 3 comments 3 replies

Comment options

You must be logged in to vote
1 reply
@GuyvanderKolk
Comment options

Answer selected by GuyvanderKolk
Comment options

You must be logged in to vote
1 reply
@GuyvanderKolk
Comment options

Comment options

You must be logged in to vote
1 reply
@GuyvanderKolk
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Apps API and Webhooks Discussions related to GitHub's APIs or Webhooks Question Ask and answer questions about GitHub features and usage Welcome 🎉 Used to greet and highlight first-time discussion participants. Welcome to the community! source:ui Discussions created via Community GitHub templates API Discussions around GitHub API platform and docs
3 participants