Skip to content

Fixes #37266: Make every template helper example render against a real event (backport 2.1 #37268) - #37426

Merged
manerow merged 1 commit into
2.1from
fix/notification-helper-examples-2.1
Nov 9, 2026
Merged

manerow merged 1 commit into
2.1from
fix/notification-helper-examples-2.1

Conversation

@manerow

@manerow manerow commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Issue

Cherry-pick of #37268 to 2.1 (Fixes #37266).

What it fixes

The helpers API (GET /v1/notificationTemplates/helpers) returns an example for each notification template helper. On 2.1, 17 of the 26 examples render nothing when copied into a template, because they use names or fields a template doesn't have. This makes every example read data a template really has, and adds a test that renders each example against a realistic event and fails if any comes out empty. No helper behaviour changes, only the example text the API returns. Full explanation in #37268.

2.1 already has the buildEntityUrl example fix from #37194, so the two line up here as they do on main.

How it was tested

  • Clean cherry-pick: git patch-id --stable matches the commit on main.
  • On this branch: HandlebarsHelperExampleTest, NotificationTemplateHelperCoreTest, NotificationTemplateHelperAdvancedTest, BuildEntityUrlHelperTest and SystemTemplateParityTest pass (78 tests).

@manerow
manerow requested a review from a team as a code owner November 9, 2026 16:28
@manerow
manerow requested review from TeddyCr and removed request for a team November 9, 2026 16:28
@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 Nov 9, 2026
@manerow
manerow merged commit afe48ab into 2.1 Nov 9, 2026
22 checks passed
@manerow
manerow deleted the fix/notification-helper-examples-2.1 branch November 9, 2026 16:31
@gitar-bot

gitar-bot Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Code Review ✅ Approved

🟢 Low risk · The changes only update template-helper examples and add rendering tests; helper execution remains unchanged, limiting runtime impact.

Makes every notification template helper example read data a real template has, and adds a test that renders each example against a realistic event to catch empty output. No helper behaviour changes, only the example text returned by the helpers API. 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

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.

1 participant