Label actions (/label) from Description Templates are not applied to issue

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Summary

Labels set through an Issue Description Template using the /label or /labels actions in the description do not apply to the issue when it is created.

Steps to reproduce

  1. Create an issue descriptions template repository
  2. Create a new template Bug.md in .gitlab/issue_templates
  3. In Bug.md, add the action /label ~"type::bug" or any other applicable label.
  4. Save/Commit the template
  5. Create a new issue
  6. Select the "Bug" issue description template
  7. Create the issue

What is the current bug behavior?

The label is not applied on the new issue.

What is the expected correct behavior?

The issue is created and the "type::bug" label is applied to that issue automatically.

Additional info

What should be noted is that if you modify the steps above:

  1. Select the "Bug" issue description template
  2. Edit the description to remove ~"type::bug" and retype ~type:: and select "type::bug" from the menu that appears.
    • The text that is substituted by selecting the item from the menu still gives you /label ~"type::bug" which was in the original template.
  3. Create the issue

On this occasion, the issue will be created with the desired label(s). So it would appear that going through the process of manually inputting the /label action into the description is triggering logic that is not being picked up when the command/action is already in the issue description.

Output of checks

This bug happens on GitLab.com

Results of GitLab environment info

Expand for output related to GitLab environment info
(For installations with omnibus-gitlab package run and paste the output of:
`sudo gitlab-rake gitlab:env:info`)

(For installations from source run and paste the output of:
`sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`)

Results of GitLab application Check

Expand for output related to the GitLab application check

(For installations with omnibus-gitlab package run and paste the output of: sudo gitlab-rake gitlab:check SANITIZE=true)

(For installations from source run and paste the output of: sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true)

(we will only investigate if the tests are passing)

Possible fixes

Patch release information for backports

If the bug fix needs to be backported in a patch release to a version under the maintenance policy, please follow the steps on the patch release runbook for GitLab engineers.

Refer to the internal "Release Information" dashboard for information about the next patch release, including the targeted versions, expected release date, and current status.

High-severity bug remediation

To remediate high-severity issues requiring an internal release for single-tenant SaaS instances, refer to the internal release process for engineers.

Edited by 🤖 GitLab Bot 🤖