Skip to content

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

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

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

Conversation

@manerow

@manerow manerow commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Describe your changes:

Backport of #37589 to 2.0. 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 and the asset, and lists the proposed changes, the lifecycle stage move and the assignees.

How this differs from #37589. 2.0 has no task page: ROUTES.TASK_DETAIL exists, but no route renders it, so /tasks/{taskId} would also 404. So on 2.0:

  • buildEntityUrl sends a task to the Tasks tab of the asset it is about (/{type}/{fqn}/activity_feed/tasks, or the Issues tab for a test case). This is where system-notification-task-entity-updated already links on 2.0.
  • A task with no about asset shows its id as plain text instead of an empty link.
  • The tests are moved to 2.0's notifications.template package, and the SystemTemplateParityTest line is dropped, since that test does not exist on 2.0.

Type of change:

  • Bug fix

Tests:

Unit tests

Backend integration tests

  • Not applicable (no backend API changes).

UI screen recording:

Not applicable: backend-only change.

Checklist:

  • I have read the CONTRIBUTING document.
  • My PR is linked to a GitHub issue via Fixes #<issue-number> above.
  • Self-review: reviewed against REVIEW.md; no findings.
  • Decision check: no durable decision; the link target follows the existing 2.0 task-updated template.

RetriggerView in GreptileConfidence Score: 4/5

Meet the Java requirements in buildTaskUrl before merging.

Findings

  1. P2 New helper breaks Java rules ▶

Summary

Adds a task-created notification that links to the asset’s Tasks tab, or Issues tab for test cases, instead of a missing task page.

  • Task-created emails link to the asset the task is about.

The new Java helper needs to follow the repository’s coding rules before merging.

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 removed the request for review from a team November 18, 2026 07:42
@manerow manerow added the skip-pr-checks Bypass PR metadata validation check label Nov 18, 2026
@manerow
manerow requested a review from IceS2 November 18, 2026 07:42
@gitar-bot

gitar-bot Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Code Review ✅ Approved 🟡 Medium risk

Task-created notifications now link to the related asset’s Tasks or Issues tab; an incorrect mapping could send recipients to the wrong context.

Adds a task-created email template that links to the asset's Tasks tab on 2.0, since no task detail page exists there, and lists proposed changes, lifecycle stage 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 57bb08b into 2.0 Nov 18, 2026
55 of 56 checks passed
@manerow
manerow deleted the fix/task-created-notification-link-2.0 branch November 18, 2026 07:44
Comment on lines +300 to +312
private String buildTaskUrl(Map<String, Object> entityMap) {
if (!(entityMap.get(KEY_ABOUT) instanceof Map<?, ?> aboutObj)) {
LOG.debug("Task missing about reference");
return null;
}
Map<String, Object> about = (Map<String, Object>) aboutObj;
String aboutType = getTrimmed(about, KEY_TYPE).orElse("");
String aboutFqn = getTrimmed(about, KEY_FQN).orElse("");
if (aboutType.isEmpty() || aboutFqn.isEmpty()) {
LOG.debug("Task about reference missing type or FQN");
return null;
}
return buildEntityUrl(aboutType, aboutFqn, about, "tasks");

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 New helper breaks Java rules. buildTaskUrl adds two early returns, checks strings with .isEmpty(), and leaves unchanged local variables and its parameter non-final. The repository’s Java guide requires one trailing return, nullOrEmpty(...) for string checks, and final for values that do not change. Apply those requirements to the new helper.

Context Used: CLAUDE.md (source)

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

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