[UX] Health toggle switch widget is visible and enabled in issues filter, despite the licensing rights

Summary

With the GitLab Premium, the use of the health feature is not allowed (health-status doc) even if the issues filter is enabled via the toggle switch widget

Steps to reproduce

  • Open project issues
  • Open toolbar filter

The health switch is enabled and you can enable or disable search with this filter.

image

Behaviour

Expected behavior

Display options shows a field toggle only when the feature is available for the namespace. This applies to Health, Iteration and Weight.

Implementation plan

  • applicableMetadataFields in app/assets/javascripts/work_items/list/display_settings_preferences.js has no license check.
  • Leave out Health when hasIssuableHealthStatusFeature is false, Iteration when hasIterationsFeature is false, and Weight when hasIssueWeightsFeature is false.
  • The Table view already hides columns this way. See licensedFeature in app/assets/javascripts/work_items/table/constants.js.
  • Add specs for each case.
Edited by 🤖 GitLab Bot 🤖