A GitLab Premium instance should not offer a Health toggle. Health status is an Ultimate feature. On Free, a Status toggle should not appear either: the list only renders a status badge when the item actually has status data, so the toggle does nothing.

The Table view already hid those columns. The Display options drawer did not. This is the story of gitlab-org/gitlab!275608, a small frontend fix that reused a pattern the Table view already had, and a review that stopped the first version from listing every license flag by hand.

The issue: a drawer that ignored the plan

The issue was gitlab-org/gitlab#579810, opened by Andy Bonta. The Fields section of the issues list Display options drawer offered a toggle for every metadata field, including Status, Health, Iteration, and Weight, even when the namespace did not have those licensed features.

The Table view already gated the matching columns with a licensedFeature on each field and an isColumnLicensed lookup in table_view.vue. The list and board preference fields lived in a different constants object, WORK_ITEM_LIST_PREFERENCES_METADATA_FIELDS, and that object had no license metadata at all.

The first version, and what review changed

The production change marks the four preference fields with the same flags the Table view uses: hasStatusFeature, hasIssueWeightsFeature, hasIterationsFeature, and hasIssuableHealthStatusFeature.

applicableMetadataFields then leaves a field out when its feature is not enabled:

// A field gets no toggle when the namespace doesn't have its feature, as in the Table view. if (item.licensedFeature && !isFeatureLicensed(item.licensedFeature)) { return false; } 

The first version of that helper took a map of flags. Vedant Jain pointed out two problems in review.

Status had the same bug on Free. I had gated Health, Iteration, and Weight, but not Status. The badge in the list only renders when the item has status data, so a Status toggle on Free does nothing. The Table view already used hasStatusFeature. We added the same flag here, and injected hasStatusFeature: { default: false } in the component.

A hand-built map does not scale. Each new gated field would have meant changing the constants, the inject block, and the map. The Table view looks the flag up by name instead. Vedant suggested passing a function:

isFeatureLicensed: (feature) => Boolean(this[feature]), 

The function runs while the computed property is being evaluated, so Vue still tracks the injected flags and the list updates when the metadata query resolves. The default is isFeatureLicensed = () => false: without the provider, every gated field stays hidden. Adding a field now only needs the constant and the inject entry.

The child items Display options menu in work_item_more_actions.vue has the same problem. It was out of scope for this MR. After the review changes landed, Vedant asked for a follow-up issue so that menu would not be forgotten.

Specs that fail when a toggle leaks through

The helper specs check each licensed field on its own, and they check the default path with no function passed in, so Status, Health, Iteration, and Weight are all absent and Assignee is still present. They also run the board view.

The component specs render the drawer and assert the toggle labels: each missing feature hides its toggle, and a namespace with no licensed features hides all four. The default provide in those examples turns every flag on, so the existing "all fields" examples stay valid.

What I took away

1. Copy the gate that already works in the same feature. The Table view already had licensedFeature and a name lookup. Inventing a second map in the drawer would have hidden the same fields today and drifted the next time a flag was added.

2. A default of "hidden" is safer than a default of "shown." isFeatureLicensed = () => false means a missing provider cannot leak a Premium or Ultimate toggle. The list is conservative until the metadata query resolves.

3. If you list every flag by hand, a reviewer will ask what happens when the fifth one arrives. A function that reads this[feature] keeps the inject list as the only inventory.

4. Out of scope should still be written down. Leaving the child-items menu alone was right for a small MR. Naming it in the description, and being asked to open a follow-up, is how that bug stays visible.

The MR merged on 1 December 2026.

Links

Thanks to Andy Bonta for the issue, to Sunjung Park for the first review, and to Vedant Jain for catching the Free Status toggle and for pushing the flag lookup into a function.

If you've been thinking about contributing to GitLab, the community issues are a great place to start: contributors.gitlab.com.