User list is associated with a strategy is a true sentence, and a nearly useless one. If you try to delete a feature flag user list that is still attached to a strategy, that was the entire error. It did not say you had to remove the list from those strategies first, or even that this was why the delete was refused.

This is the story of gitlab-org/gitlab!275295, a backend copy change with no frontend work, a constant that kept four specs in sync, and a technical writing review that dropped one word and changed another.

The issue: a message that stopped halfway

The issue was gitlab-org/gitlab#223769, opened by Andrew Fontaine. Deleting a user list that is still used by one or more feature flag strategies failed in Operations::FeatureFlags::UserList#ensure_no_associated_strategies, which runs before_destroy. The API returned HTTP 409 with that terse string. The user lists UI surfaces the same model error, so there was no separate frontend message to update.

The issue already had the shape of the new copy: tell the user the list is in use, and tell them to remove it from the strategies before deleting it.

The fix: one constant, three call sites

The production change is a constant on the model, and a one-line swap in the callback:

IN_USE_BY_STRATEGY_MESSAGE = 'This user list is in use by one or more feature flag strategies and could not be ' \ 'deleted. Remove the list from all strategies before deleting it.' def ensure_no_associated_strategies return unless strategies.present? errors.add(:base, IN_USE_BY_STRATEGY_MESSAGE) throw :abort # rubocop: disable Cop/BanCatchThrow end 

The feature spec, the model spec, and the API request spec all assert Operations::FeatureFlags::UserList::IN_USE_BY_STRATEGY_MESSAGE rather than a duplicated literal. Hunter Stewart called that out in the backend review: a constant is a better home than four loose strings that would drift the next time the wording changed.

The first version of the message stayed closer to the issue. Brendan Lynch reviewed it from a technical writing angle and asked for two edits. Drop "currently." The GitLab word list avoids that word in product text. Use "deleted" in the first sentence, to match the Delete user list action and the second sentence:

This user list is in use by one or more feature flag strategies and could not be deleted. Remove the list from all strategies before deleting it.

That is the string that shipped. It is a little further from the issue's proposed copy, and clearer next to the button the user just clicked.

A later merge from master conflicted in the same method. The resolution kept the approved message and the early-return style that had landed on master.

What I took away

1. The UI can already be doing the right thing. The user lists page and the API both show the model error. Changing the string in one place was enough. A frontend-only edit would have left the API behind.

2. If four specs quote the same sentence, make it a constant. Hunter's note was not about style for its own sake. The feature spec, the model spec, and the request spec would otherwise each have been a place to miss a wording change.

3. Technical writing will edit the issue's proposed copy. "Currently" is on the word list. "Deleted" matches the action. Those are small words, and they are the difference between a message that sounds like a ticket and a message that sounds like the product.

4. A changelog belongs on a user-facing error change. This one is Changelog: changed. The behaviour of the delete did not change; the words the user sees did.

The MR merged on 1 December 2026.

Links

Thanks to Andrew Fontaine for the issue and the first frontend look, to Hunter Stewart for the backend review and the constant, to Brendan Lynch for the wording, and to Gavin Hinfey for the maintainer review.

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