Commit Graph

5 Commits

Author SHA1 Message Date
Copilot a589920d1a Merge main; remove multi-select feature flag
CodeQL / Analyze (go) (push) Has been cancelled
CodeQL / Analyze (actions) (push) Has been cancelled
CodeQL / Analyze (javascript) (push) Has been cancelled
Build and Test Go Project / build (macos-latest) (push) Has been cancelled
Build and Test Go Project / build (ubuntu-latest) (push) Has been cancelled
Build and Test Go Project / build (windows-latest) (push) Has been cancelled
Resolves conflicts from merging origin/main into the multi-select branch.
main added the `fields_param` feature which also split `list_issues` into
flag-gated variants, colliding with this branch's
`remote_mcp_issue_fields_multiselect` split.

Rather than gate `list_issues` on two independent flags (which the inventory's
single FeatureFlagEnable can't express for the "both on" case), the multi-select
feature flag is removed entirely — multi-select is now unconditional, matching
the already-unconditional read paths:

- issue_write / list_issue_fields collapse to their single multi-select-aware
  variant; the legacy siblings and issues_legacy_multiselect.go are deleted
- list_issues adopts main's fields_param split (ListIssues / LegacyListIssues)
  with the multi-select `values` slot always advertised
- optionalIssueWriteFields / resolveIssueRequestFieldValues / parseRawFieldFilters
  drop the now-constant multiSelectEnabled bool and their dead single-select-only
  branches
- FeatureFlagIssueFieldsMultiSelect const, allowlist and insiders entries removed
- toolsnaps + generated docs regenerated

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-07-13 13:28:02 +01:00
Owen Niblock 60ebbe13a6 Fix runtime description leak on list_issue_fields legacy variant
The pkg/translations TranslationHelper is first-write-wins on cache
hits: if two callers pass the same key with different fallback
strings, only the first fallback is remembered. Both ListIssueFields
(MS-aware) and ListIssueFieldsLegacy shared the translation key
TOOL_LIST_ISSUE_FIELDS_DESCRIPTION, so at runtime the second-registered
variant (legacy) inherited the first's description — leaking the
MS-flavoured 'single_select, multi_select' text into the FF-off surface.

Only list_issue_fields was affected: issue_write and list_issues use
identical top-level descriptions across variants (their MS-vs-legacy
differentiation is in InputSchema property descriptions, which are
hardcoded strings not routed through the translation helper).

Fix: give the legacy variant its own translation key
(TOOL_LIST_ISSUE_FIELDS_LEGACY_DESCRIPTION). Simplify buildListIssueFields
to accept the already-resolved description string, so the two variants
resolve their translation before calling the shared builder.

Live-verified against a local binary:

- FF off: description no longer contains 'multi_select'
- FF on:  description contains 'multi_select'

Regression test: Test_ListIssueFields_LegacyDoesNotLeakMSDescription
UnderRealTranslationHelper uses an in-test cache that mimics the real
helper's first-write-wins behaviour. Confirmed the test fails if both
variants share a key and passes with them split.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-07-06 13:01:57 +01:00
Owen Niblock 352a2bc07d Add multi-select issue field support, gated behind FF
Multi-select issue fields ride on the existing custom-fields surface:

- issue_write (consolidated) and set_issue_fields (granular) gain
  multi-select inputs (field_option_names / multi_select_option_ids)
- list_issues field_filters gain a 'values' slot for multi-select
  filtering with AND semantics
- list_issue_fields advertises multi_select in its description and
  surfaces multi-select definitions
- Read paths (IssueFieldValueFragment, list_issues enrichment, etc.)
  decode multi-select values when an org has them

The write surface is gated behind a new FF
remote_mcp_issue_fields_multiselect. When the flag is off, the legacy
variants of issue_write, list_issues, and list_issue_fields are served
— same handler bodies, but their schemas and descriptions omit
multi_select. Read paths stay unchanged: orgs that have dotcom-side
multi-select enabled continue to see multi-select VALUES surfaced,
matching what the dotcom UI shows.

The granular tools (set_issue_fields) are not separately gated — they
are already behind FeatureFlagIssuesGranular, which is itself a
user-opt-in rollout flag. Double-gating adds complexity without
proportionate benefit for users who have already accepted experimental
territory.

Per the user's preference for code duplication over interleaved
branching:

- IssueWrite and IssueWriteLegacy are full siblings (issues.go +
  issues_legacy_multiselect.go). The shared parser and resolver
  (optionalIssueWriteFields, resolveIssueRequestFieldValues) take a
  single multiSelectEnabled bool and reject multi-select inputs/fields
  when false.

- ListIssues / ListIssuesLegacy share a buildListIssues helper that
  swaps in the right descriptions and adds/removes the field_filters[]
  values slot.

- ListIssueFields / ListIssueFieldsLegacy share a buildListIssueFields
  helper that swaps the description (handler is identical).

Snapshot naming follows the established convention: legacy variants own
the canonical <name>.snap; MS-aware variants own
<name>_ff_remote_mcp_issue_fields_multiselect.snap.

Stacked on #2755 (the universal delete-fix half of the original PR).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-07-06 11:32:12 +01:00
Iulia B b91c3b5b3a feat(issue-fields): support issue_fields in issue_write using fullDatabaseId
- Expose fullDatabaseId (BigInt) in list_issue_fields
- Add issue_fields parameter to issue_write for setting field values
- Support single-select fields via field_option_name resolution
- Add REST API field value extraction in get_issue responses
- Update minimal types with IssueFieldValue for REST responses

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-27 16:26:36 +02:00
Kelsey Myers 8f6050a5b8 Add list_issue_fields tool (#2445)
* Add list_org_issue_fields tool

* Clean up code

* complete struct fields & rename option type

* Drop created_at/updated_at from IssueField and IssueSingleSelectFieldOption

* Address feedback

* Address Copilot review: close resp.Body, set expectError=true for missing org test

* Adjust to list_issue_fields

* Add feature flag

* Allow tool to support read:org or repo

* Docs

* address comments

* Add repo_issue_fields flag

---------

Co-authored-by: Michael Jacholke <46944669+michaeljacholke@users.noreply.github.com>
2026-05-21 16:19:49 +02:00