Use variables to create uniquely customized templates
Harness the power of variables to create uniquely customized templates. By incorporating variables into your template, you can dynamically insert values such as project names, release dates, or issue details, making each template unique and tailored to your specific needs. Variables allow for flexibility and automation, enabling you to generate personalized and dynamic content within your templates.
{{setupName}}
- Setup name{{releaseDate}}
- Date of release notes are sent{{sprint}}
- Name of completed sprint. Available when trigger is Close of sprint{{sprintGoal}}
- Goal of completed sprint. Available when trigger is Close of sprint{{version}}
- Name of released version. Available when trigger is Release of version{{versionDescription}}
- Description of released version. Available when trigger is Release of version
With the #if
and #unless
conditional helpers, you have the flexibility to add logic and make dynamic decisions within your template.
Whether it's displaying certain content based on specific conditions or customizing the template output based on variable values.
Unlock the potential of your template with the #if helper, which allows you to check for the existence of a variable value. If you're creating a versatile template that caters to both sprint completion and fix version release scenarios, and you only want to display information when it is available, the #if helper comes to your rescue. With this powerful tool, you can conditionally control the display of content, ensuring that your template remains clean, concise, and relevant, tailored to the specific information available for each release.
{{#if sprint}}Sprint: {{sprint}}{{/if}}
displays "Sprint: Sprint 3 - Q2 2022" only when the sprint is available
{{#if version}}Version: {{version}}{{/if}}
displays "Version: v1.2.1" only when the version is available
{{#if sprintGoal}}
{{sprintGoal}}
{{else}}
There is no sprint goal description
{{/if}}
The #unless
helper serves as the perfect counterpart to the #if
helper,
enabling you to create conditional logic based on the non-existence of a variable.
For instance, if a fix version lacks a description, you can utilize the #unless
helper to display a default text or alternative content.
With the added support for the else
part, you have even more flexibility
in defining the behavior of your template based on the presence or absence of specific variables.
{{#unless versionDescription}}There is no description for this fix version{{/unless}}