Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Expand
titleVarying salutation based on a custom gender fieldIf-else
Code Block
languagexml
{{#if (exists issue.customfield_11111)}} <!--! Checks checka ifcustom thegender field and isgenerates filledthe orsalutation emptyaccordingly -->
{{#if (exists issue.customfield_11111)}}
{{#eq issue.customfield_11111 "m"}} <!-- check for the specific field value "m" -->
Dear Sir
{{/eq}}
{{#eq issue.customfield_11111 "f"}} <!-- check for the specific field value "m" -->
Dear Madam
{{/eq}}
{{else}} <!-- if the field is empty -->
Dear Sir or Madam
{{/if}}
Expand
titlePrint all unique comment author names with format "#. Name"Compare values via OR
Code Block
languagexml
{{setVariable#or (eq issue.priority.name "commentAuthorsMedium") (pluckeq issue.priority.commentname "author.displayNameHigh")}}
{{#each (unique commentAuthors)}}
{{add @index 1}}. {{this}}
<!-- this will be executed if the issue's priority is either Medium or High -->
{{/eachor}}
Expand
titleCheck if an issue is older than 14 daysModify a datetime and compare it
Code Block
languagexml
{{setVariable "14DaysAgo" (subtractDay now 14)}}
{{#if (isBeforeDay issue.created.raw 14DaysAgo)}}
<!-- ...this will be executed if the issue was created more than 14 days ago -->
{{/if}}
Expand
titleLoop over an array
Code Block
languagexml
{{#or (eq "a" "b") (eq "c" "d") (eq "e" "f")}}
<!-- -->
{{/or<!-- Prints all people watching the issue -->
{{#each issue.watchers}}
{{this.displayName}}
{{/each}}
Expand
titleMap an array's property to a new array and loop over it
Code Block
languagexml
<!-- Prints all authors in the format "#. Name" -->
{{setVariable "commentAuthors" (pluck issue.comment "author.displayName")}}
{{#each (unique commentAuthors)}}
{{add @index 1}}. {{this}}
{{/each}}