Repository navigation
Conversation
Code Review ✅ Approved 1 closed / 1 findings🟢 Low risk · The PR updates helper example text and adds rendering tests; helper execution behavior is unchanged, limiting impact to examples shown to users. Makes every notification template helper example render against a realistic event by reading data templates actually have, such as ✅ 1 closed✅ Quality: Non-blank check passes on literal text even when the helper renders nothing
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 |
Fixes #37266
Problem
The helpers API (
GET /v1/notificationTemplates/helpers) returns an example for each notification template helper. Most of them used names a template doesn't have, such asstatusandfieldName, or fields that don't exist, such asentity.oldDescription. Copied into a template, 17 of the 26 examples rendered nothing. The Collate template editor is starting to show these examples to users (open-metadata/openmetadata-collate#8309).What this PR changes
hasFieldInChangesis shown inside thegroupEventChangesblock it needs, andresolveDomainloops overentity.domains.mathandfilterexamples print literal text around the helper, so they also have exact-output tests.buildEntityUrlexample fix as Fixes #37191: Use the two-argument buildEntityUrl example #37194, because the new test covers that helper too. The two identical changes merge cleanly in either order.No helper behaviour changes, only the example text the API returns.
How it was tested
HandlebarsHelperExampleTest,NotificationTemplateHelperCoreTest,NotificationTemplateHelperAdvancedTest,BuildEntityUrlHelperTestandSystemTemplateParityTest: 77 tests, all passing. On the old examples, 17 of the 26 cases in the new test fail.{{in the Collate template editor shows the new examples.