Skip to content

Fixes #37588: Task created notifications link to the task page (backport 2.1 #37589) - #38092

Merged
manerow merged 1 commit into
2.1from
fix/task-created-notification-link-2.1
Nov 18, 2026
Merged

manerow merged 1 commit into
2.1from
fix/task-created-notification-link-2.1

Conversation

@manerow

@manerow manerow commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Describe your changes:

Backport of #37589 to 2.1. Fixes #37588.

A task-created email linked to /task/TASK-xxxxx, a page the UI does not have, so the link gave a 404. There was no task-created template, so the generic entity-created one was used. This adds system-notification-task-entity-created, which links the task to /tasks/{taskId} and the asset to its page, and lists the proposed changes, the lifecycle stage move and the assignees. buildEntityUrl gains a task case for the same route.

Cherry-picked from 144bbc5ea49; applied cleanly, and git patch-id --stable is identical to the original commit.

Type of change:

  • Bug fix

Tests:

Unit tests

  • TaskEntityCreatedTemplateTest, BuildEntityUrlHelperTest, SystemTemplateParityTest and TaskEntityUpdatedTemplateTest on 2.1: 25 passed.

Backend integration tests

  • Not applicable (no backend API changes).

UI screen recording:

Not applicable: backend-only change.

Checklist:

RetriggerView in GreptileConfidence Score: 4/5

The PR appears safe to merge with one non-blocking issue affecting query asset links.

Findings

  1. P2 Query asset links are empty ▶

Summary

Adds a task-created notification with links to the task and its asset, plus details about requested changes and assignees.

  • Task links open the task page instead of a missing route.
  • Created-task emails show the task and its proposed work.

Reviews (1) · Last reviewed commit: "Fixes #37588: Task created notifications..." · Reviewed by Greptile

@manerow
manerow requested a review from a team as a code owner November 18, 2026 07:42
@manerow manerow added backend skip-pr-checks Bypass PR metadata validation check labels Nov 18, 2026
@manerow
manerow requested review from yan-3005 and removed request for a team November 18, 2026 07:42
@manerow manerow added backend skip-pr-checks Bypass PR metadata validation check labels Nov 18, 2026
@gitar-bot

gitar-bot Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Code Review ✅ Approved 🟡 Medium risk

The task-created template adds proposed changes and lifecycle moves to emails, so recipients could see task details; task links also change routes.

Adds a dedicated task-created notification template that links tasks to /tasks/{taskId} instead of the nonexistent /task/TASK-xxxxx route, and adds a task case to buildEntityUrl. The template lists proposed changes, lifecycle stage moves, and assignees. 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 af85348 into 2.1 Nov 18, 2026
56 checks passed
@manerow
manerow deleted the fix/task-created-notification-link-2.1 branch November 18, 2026 07:44
"description": "System default template for task creation notifications (approval requests, update requests, incidents).",
"provider": "system",
"templateSubject": "[{{publisherName}}] - New {{#if entity.category}}{{camelCaseToTitle entity.category}} {{/if}}task{{#if entity.about}} for {{#if entity.about.displayName}}{{entity.about.displayName}}{{else}}{{entity.about.name}}{{/if}}{{/if}}",
"templateBody": "<strong>@{{#if entity.createdBy}}{{#if entity.createdBy.displayName}}{{entity.createdBy.displayName}}{{else}}{{entity.createdBy.name}}{{/if}}{{else}}{{event.userName}}{{/if}}</strong> created the {{#if entity.type}}<strong>{{camelCaseToTitle entity.type}}</strong> {{/if}}task <a href=\"{{buildEntityUrl event.entityType entity}}\">{{entity.taskId}}</a>{{#if entity.about}} for <strong>{{camelCaseToTitle entity.about.type}}</strong> <a href=\"{{buildEntityUrl entity.about.type entity.about.fullyQualifiedName}}\">{{#if entity.about.displayName}}{{entity.about.displayName}}{{else}}{{entity.about.fullyQualifiedName}}{{/if}}</a>{{/if}}.{{#if entity.description}}<br><br><blockquote>{{{processMentions entity.description}}}</blockquote>{{/if}}{{#if entity.payload.proposedChanges}}<br><strong>Proposed changes:</strong><ul>{{#each entity.payload.proposedChanges}}{{#if (or (length added) (length removed))}}<li><strong>{{camelCaseToTitle @key}}</strong>:{{#if added}} added {{#each added}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}{{/if}}{{#if removed}}{{#if added}};{{/if}} removed {{#each removed}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}{{/if}}</li>{{/if}}{{/each}}</ul>{{/if}}{{#with entity.payload.lifecycleMove}}<br>Approving moves this asset from <strong>{{stage}}</strong> to <strong>{{targetStage}}</strong>.{{/with}}{{#if entity.assignees}}<br><strong>Assignees:</strong> {{#each entity.assignees}}@{{#if displayName}}{{displayName}}{{else}}{{name}}{{/if}}{{#unless @last}}, {{/unless}}{{/each}}{{/if}}"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 Query asset links are empty. For a task about a query, this call passes only entity.about.fullyQualifiedName. The helper then drops entity.about.id, but buildQueryUrl requires that ID and returns null without it. The email therefore renders the query link with an empty address. Pass the full entity.about reference for queries and add a test covering that asset type.

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

Labels

backend skip-pr-checks Bypass PR metadata validation check

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant