Pass the features variable to the work item convert mutation

What does this MR do and why?

The workItemConvert mutation now passes the useWorkItemFeatures variable to match the behavior of other work item operations.

All work item operations (detail query, subscription, update mutations, and cache helpers) read useWorkItemFeatures to control whether to fetch the features field and narrow the widgets selection. The convert mutation declared this variable but never passed it. Both callers ignored it.

With the work_item_features_field feature flag on, the detail page stored the work item with features and a narrow widgets selection. The convert mutation wrote the same cache entity with a full widgets selection and no features. Cache shape disagreed between operations.

Fix: both callers now pass useWorkItemFeatures: Boolean(this.glFeatures?.workItemFeaturesField).

References

  • Part of section D of #628901 (console errors in feature specs)
  • Surfaced by console check and baseline allowlist MR !255207 (closed)

Screenshots or screen recordings

Not applicable. No visible change.

How to set up and validate locally

  1. Run yarn jest spec/frontend/work_items/components/work_item_change_type_modal_spec.js spec/frontend/work_items/components/work_item_actions_spec.js.
  2. Enable the work_item_features_field feature flag in GDK.
  3. Open a task. Use the actions menu to change its type to Issue. Keep the browser network panel open.
  4. Confirm the workItemConvert request variables contain useWorkItemFeatures: true and the response contains features.
  5. Confirm the page updates without a "Missing field" console message.

MR acceptance checklist

This MR was evaluated against the acceptance checklist.

Edited by Miguel Rincon

Merge request reports

Loading
Loading