Skip to content

Fixes #36555: Owners on task alerts reach the task's creator and the asset's owners (backport 2.0 #36681) - #36693

Merged
manerow merged 1 commit into
2.0from
fix/36555-task-owners-recipients-2.0
Nov 3, 2026
Merged

manerow merged 1 commit into
2.0from
fix/36555-task-owners-recipients-2.0

Conversation

@manerow

@manerow manerow commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

Issue

Fixes #36555

Port of PR #36681 to the 2.0 release branch. 2.0 has the older recipient code under notifications/recipients, so the commit cannot be cherry-picked; this applies the same rule there. PR #36681 explains the problem.

What changes

  • OwnerRecipientResolver handles a task next to a thread, in both resolve methods: Owners reaches the task's creator plus the owners of the asset the task is about (inherited owners included). A task that is not about an asset reaches only its creator.
  • A creator who is a bot is skipped, for tasks and for threads, so an incident opened for a failed test emails the test case's owners and not the ingestion bot. UserRecipientResolver.resolvePeople is the variant that leaves bots out.
  • No form change: the 2.0 alert form already offers Owners for the Task source. Saved alerts need no migration.
  • Who a task is assigned to, and who the Assignees and Mentions recipients reach, stay unchanged.

How it was tested on 2.0

  • OwnerRecipientResolverTest (new): creator plus asset owners, no asset, asset gone, bot creator for a task and for a thread, and a task read by id. All six fail on 2.0 without this change; with it, they pass with RecipientResolutionTest (17 tests).
  • Integration tests on MySQL: IncidentTaskNotificationIT, EventSubscriptionResourceIT (246 tests, no failures).
  • Checked by hand on a local Collate 2.0 with real email: a description suggestion emails the person who suggested it and the table owner, when the task is filed and when it is approved; an incident opened by the ingestion bot emails the test case owner and not the bot.

@manerow manerow added safe to test Add this label to run secure Github workflows on PRs backend skip-pr-checks Bypass PR metadata validation check labels Oct 30, 2026
@manerow manerow self-assigned this Oct 30, 2026
@manerow
manerow marked this pull request as ready for review October 30, 2026 11:47
@manerow
manerow requested a review from a team as a code owner October 30, 2026 11:47
@manerow
manerow requested review from pmbrull and removed request for a team October 30, 2026 11:47
@gitar-bot

gitar-bot Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Code Review ✅ Approved

🟡 Medium risk · Changing task and thread alert recipients adds creators and asset owners while filtering bots; mistakes could expose alerts to unintended people or omit recipients.

Owners on task alerts now reach the task's creator and the owners of the asset the task is about, instead of only the creator, with bot creators skipped so incidents email the test case owners rather than the ingestion bot. No issues found.

Verification

Rules No rules evaluated

Functional validation Not enabled

Set up

Auto-approval Not enabled

Set up

For more verification details, comment gitar display:verbose.

Options

Display: compact → Showing compact verification results.

Comment with these commands to change the behavior for this request:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source

@manerow
manerow merged commit ffff63b into 2.0 Nov 3, 2026
162 of 180 checks passed
@manerow
manerow deleted the fix/36555-task-owners-recipients-2.0 branch November 3, 2026 20:01

This branch was previously deployed

1 inactive deployment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend safe to test Add this label to run secure Github workflows on PRs skip-pr-checks Bypass PR metadata validation check

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants