Repository navigation
Bug 2087012 - @username mentions when a bug is created should needinfo the person - #2809
Merged
Merged
Conversation
…o the person Comment 0 is inserted directly by Bug->create, so it never reached added_comments and _process_mentions ignored it. bug_end_of_create now keeps the description on the new bug, and _process_mentions handles it in the update that follows creation, after the form's flags are set, so all the existing mention rules and needinfo dedupe apply unchanged.
There was a problem hiding this comment.
🟡 Changes recommended
The test’s END block can overwrite the persistent mentions setting with an undefined value when the test is skipped before capturing the original setting.
1 open issue
What changed in this PR
This PR makes @username mentions in new bug descriptions use the existing CC and needinfo processing, after flags from the creation form are set.
Changes:
- Preserve the initial description for one-time mention processing during the first update.
- Reuse existing mention safeguards and needinfo deduplication.
- Add unit and integration coverage for creation-time mentions, explicit flags, API exclusion, and access restrictions.
| File | Description |
|---|---|
extensions/Needinfo/t/mentions.t |
Adds unit coverage for description mentions and one-time processing. |
extensions/Needinfo/t/bmo/mentions-on-create.t |
Adds web and API integration coverage for mentions during bug creation. |
extensions/Needinfo/Extension.pm |
Captures new bug descriptions and includes them in existing mention processing. |
Review effort: Balanced
cgsheeh
requested changes
Nov 6, 2026
cgsheeh
approved these changes
Nov 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Comment 0 is inserted directly by Bug->create, so it never reached added_comments and _process_mentions ignored it. bug_end_of_create now keeps the description on the new bug, and _process_mentions handles it in the update that follows creation, after the form's flags are set, so all the existing mention rules and needinfo dedupe apply unchanged.