projects_write: add iterations to an existing iteration field (currently impossible without wiping item assignments)
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- github, go, graphql
- Lĩnh vực
- api, backend-api-design, tooling
Hướng nghiên cứu
Bắt đầu từ phần triển khai projects_write, đặc biệt là đường dẫn create_iteration_field hiện có, và xem xét cách các bản cập nhật GraphQL ProjectV2Iteration được tạo lập. So sánh schema đầu vào công khai với kiểu iteration ở phía đọc và hành vi nhận diện của các tùy chọn single-select được mô tả trong issue. Hoàn thành có nghĩa là một trường iteration hiện có có thể nhận thêm các iteration một cách an toàn mà không làm mất các gán mục, đồng thời giới hạn của API bên ngoài và mọi fallback mang tính phá hủy đều được xử lý một cách rõ ràng.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Describe the feature or problem you’d like to solve
projects_write supports create_iteration_field (added in #2232, closing #1854), but there is no way to add an iteration to an existing iteration field — the single most common sprint operation ("add the next sprint").
Today, when an agent is asked to "add the next sprint to the Sprint field", the only iteration-related method available is create_iteration_field, so agents end up creating a duplicate field instead of appending to the existing one.
The underlying blocker is a public API asymmetry, which I verified empirically (2026-07-27):
- GraphQL: the only way to modify iterations is
updateProjectV2FieldwithiterationConfiguration, whose docs state "provided values overwrite the existing configuration". ItsProjectV2Iterationinput accepts only{startDate, duration, title}— noid, while the read-side typeProjectV2IterationFieldIterationdoes exposeid. - Consequence (tested on a disposable project): rebuilding the list with identical titles/dates regenerates all iteration ids (e.g.
18dd8506→3038b65f), and every item's iteration field value is silently cleared — for completed and active iterations alike. - REST: the new
projectsV2REST endpoints only allow creating fields (POST .../fields);fields/{field_id}has no PATCH/PUT, and the iteration items schema isadditionalProperties: falsewith noideither. - Precedent in the same mutation:
ProjectV2SingleSelectFieldOptionInputdoes have an optionalid, documented as "Include this to preserve the option's identity during updates, preventing item field values from being cleared". The GitHub web UI's internal endpoint uses exactly this pattern for iterations (existing entries carryid, new entries sendid: ""). Iterations appear to be the one place this mechanism was left out of the public schema.
Proposed solution
Two complementary parts:
- (Root fix, likely needs routing to the Projects/GraphQL team) Add an optional
id: Stringto theProjectV2Iterationinput, with the same preserve-identity semantics asProjectV2SingleSelectFieldOptionInput.id. This would make read-modify-write appends safe for any API consumer, not just MCP. - (This repo) Add an
add_iterationmethod toprojects_writethat appends an iteration to an existing iteration field (auto-computing the next start date from the last iteration when omitted). If/while the schema lacksid, the method could either (a) be gated with an explicit destructive warning, or (b) mitigate by snapshotting item assignments before the rewrite and re-assigning them to the regenerated ids afterwards.
This would benefit every team running sprint workflows through the MCP server: sprint planning is a recurring, high-frequency operation, and it is currently the one Projects v2 write that agents cannot perform safely at all.
Example prompts or workflows (for tools/toolsets only)
- "Add the next sprint to the Sprint field in project 14"
- "Extend our Sprint iterations through the end of Q4, two weeks each"
- "Create 'Sprint 23' starting 2026-10-03 with a duration of 14 days"
- "Our sprints ran out — add six more iterations matching the current cadence"
- "Insert next sprint and move all unfinished items from the current one into it"
Additional context
- Verification was done via schema introspection (
__typeonProjectV2Iteration,ProjectV2IterationFieldIteration,ProjectV2SingleSelectFieldOptionInput) and a live experiment on a throwaway user project; happy to share the exact GraphQL calls and before/after output. - Related: #1854 (closed by #2232, which covers field creation only).
- Public schema references (docs.github.com
schema.docs.graphql):input ProjectV2Iteration(no id) vstype ProjectV2IterationFieldIteration(has id);UpdateProjectV2FieldInput.iterationConfigurationoverwrite note;ProjectV2SingleSelectFieldOptionInput.idpreserve-identity note.
- Ngôn ngữ chính
- Go
- Star
- 33.1k
- Fork
- 5k
- Merge trung bình
- 2 ngày 1 giờ
- Pull request đã merge (30 ngày)
- 25
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của github/github-mcp-server
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
github/github-mcp-server#3235 ·
-
enhancement
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
github/github-mcp-server#3042 · 2 bình luận ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
github/github-mcp-server#3032 · 1 reaction ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
github/github-mcp-server#2803 · 1 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
github/github-mcp-server#2740 ·
Tất cả issue của github/github-mcp-server
Issue tương tự
-
textual definition
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
geneontology/go-ontology#32653 ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 75/100
-
needs design
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
Priority/High ready-for-agent Severity/Major Type/Bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100