Repository navigation
Fixes #37266: Make every template helper example render against a real event (backport 2.1 #37268) - #37426
Merged
Conversation
…l event (backport 2.1 #37268)
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. VerificationRules No rules evaluated Functional validation Not enabledAuto-approval Not enabledFor more verification details, comment OptionsDisplay: compact → Showing compact verification results. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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. On2.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.1already has thebuildEntityUrlexample fix from #37194, so the two line up here as they do onmain.How it was tested
git patch-id --stablematches the commit onmain.HandlebarsHelperExampleTest,NotificationTemplateHelperCoreTest,NotificationTemplateHelperAdvancedTest,BuildEntityUrlHelperTestandSystemTemplateParityTestpass (78 tests).