Why does createIssue GraphQL API mutation Fail with a valid projectIds value? #152014
-
Select Topic AreaQuestion BodyI'm encountering an unexpected behavior when using the createIssue mutation with the I have also noticed this if we create issue via github web portal and we assign project it makes two separate calls one is for create issue with parentIds: My goal is to have the issue automatically linked to the project at creation time—without needing an additional API call. Is this behavior intended? Are there any known limitations or additional requirements for using projectIds in the createIssue mutation? Any guidance on achieving a one-step project binding would be greatly appreciated. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
|
Beta Was this translation helpful? Give feedback.
-
|
🕒 Discussion Activity Reminder 🕒 This Discussion has been labeled as dormant by an automated system for having no activity in the last 60 days. Please consider one the following actions: 1️⃣ Close as Out of Date: If the topic is no longer relevant, close the Discussion as 2️⃣ Provide More Information: Share additional details or context — or let the community know if you've found a solution on your own. 3️⃣ Mark a Reply as Answer: If your question has been answered by a reply, mark the most helpful reply as the solution. Note: This dormant notification will only apply to Discussions with the Thank you for helping bring this Discussion to a resolution! 💬 |
Beta Was this translation helpful? Give feedback.
projectIds in createIssue is for Classic Projects
The projectIds field in the createIssue mutation is only compatible with classic GitHub Projects (not ProjectsV2).
ProjectsV2 uses a different system and requires the addProjectV2ItemById mutation to associate issues. This explains the NOT_FOUND error when using a ProjectsV2 ID in projectIds.
ProjectsV2 Requires a Separate Step
GitHub’s UI/API intentionally separates issue creation and ProjectsV2 binding. This is why you observe two calls in the web portal:
Create the issue (no ProjectsV2 association).
Use addProjectV2ItemById to link the issue to ProjectsV2.
There is no way to link to ProjectsV2 in a single step during issue creation.