Skip to content

Bug 2066252 - Prevent save if keyword checkin-needed-tb exists without target milestone - #2734

Merged
dklawren merged 3 commits into
mozilla:masterfrom
dklawren:2066252
Sep 3, 2026
Merged

Bug 2066252 - Prevent save if keyword checkin-needed-tb exists without target milestone#2734
dklawren merged 3 commits into
mozilla:masterfrom
dklawren:2066252

Conversation

@dklawren

@dklawren dklawren commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

@dklawren
dklawren requested review from Xzzz and cgsheeh and a balanced review from Copilot September 1, 2026 22:00

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Product-only moves can bypass the new validation and introduce the prohibited state.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Adds validation requiring a target milestone when checkin-needed-tb is used for Thunderbird-related products.

Changes:

  • Adds create/update milestone validation.
  • Registers the validator and adds its user-facing error.
File summaries
File Description
CheckinNeededTbMilestone.pm Implements validation.
Extension.pm Registers the validator.
user-error-errors.html.tmpl Adds the validation error.
Review details
  • Files reviewed: 3/3 changed files
  • Comments generated: 1
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread extensions/MozChangeField/lib/Post/CheckinNeededTbMilestone.pm Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
return if !$bug->has_keyword(KEYWORD);

# The product's default milestone (normally '---') means 'not set'.
return if $bug->target_milestone ne $product->default_milestone;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we compare with --- directly? Is there any risk in a silent pass if a product gets a real default milestone?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure what silent pass means if it gets a real milestone. The products default milestone can be set to any valid milestone value and is what gets set if a user doesn't set anything for milestone.

Comment thread extensions/MozChangeField/lib/Post/CheckinNeededTbMilestone.pm Outdated
@dklawren
dklawren merged commit 5bd9270 into mozilla:master Sep 3, 2026
8 checks passed
@dklawren
dklawren deleted the 2066252 branch September 3, 2026 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants