Custom Notifications Language Reference
Use the following reference to locate elements in notification templates and modify them present information in the desired format.
Local Variables
Local variables can be used, but not changed by the user. Local variables are predefined and read-only.
Local Variable | Type | Description |
---|---|---|
header | string | The |
from | User | Represents notification sender's details |
to | User | Represents notification recipient's details |
application.name | string | Evaluates to "YouTrack" |
application.version | string | Evaluates to the current version |
application.build | string | Evaluates to build number |
reason | string | Evaluates to description of the reason a user receives notification. Description form differs in jabber and email notifications. |
issue | Issue | Evaluates to an issue, about which the notification is sent. |
change | IssueChange | Contains info about changes (issue project, summary, description, custom fields, visibility group, links, attachments) that initiated notification. |
comment | Comment | Evaluates to an edited or posted comment, about which notification is sent. |
comment_updated | boolean | true - a comment has been edited, false - a new comment has been posted |
tag | Tag | Evaluates to an tag, which has been added to or removed from an issue. |
untag | boolean | indicator that issue has been tagged/untagged |
unvote | boolean | indicates that issue has been voted/unvoted |
project | Project | Imported project or project failed to import (id, full name, issues, leader...). Variable is used in the "Import status" notification. |
exception | Throwable | Java Throwable object |
message | string | text of the message in the "Import status" notification. |
Directives
You use FTL tags to call directives. Besides built-in directives like the #list
directive, you can define your own directives in Freemarker. For more information, see the User-Defined directives manual.
-
wiki
- process embedded text using Wiki syntax and keywords. Directive applies HTML escaping.parameter
- no parametersbody
- text to process
Example:
diff
- render html element presenting text change. Mark deleted and added sections of text with given styles.- parameters:
oldText
- old version of textnewText
- new version of textinsStyle
- html style of inserted parts of textdelStyle
- html style of deleted parts of text
body
- no body
- parameters:
Example:
- stacktrace render the html component representing stacktrace of Throwable
- parameters:
throwable
- instance of Throwable Java class
body
- no body
- parameters:
Example:
Utils
Everywhere the type of returned value is
list<?>
, you can iterate over method result using#list
directive.
Method Summary | |
---|---|
static string | getAttachmentUrl(Attachment attachment) |
static string | getAvatarUrl(User user) |
static string | getCommentReplyUrl(Comment comment) |
static string | getCommentUrl(Comment comment) |
static list<ProjectCustomField> | getCustomFields(Issue issue) |
static Issue | getDuplicate(Issue source) |
static string | getEditProjectUrl(Project project) |
static list<Tag> | getExplicitTags(Issue issue) |
static int | getInvisibleAttachmentsCount(Issue issue) |
static string | getIssuesUrl(Project project) |
static string | getJiraIntegrationUrl() |
static list<Issue> | getLinkedIssues(Issue source, string linkRole) |
static list<string> | getLinkRoles(Issue source) |
static string | getPossessiveName(User you, User from) |
static string | getResolveStatus(Issue issue) |
static string | getSettingUrl(User user) |
static string | getStarSrc(Issue issue) return URL of 'Star' tag image resource |
static string | getTaggedIssuesUrl(Tag tag) |
static string | getTrimmedTagName(Tag tag) |
static string | getUrl(Issue issue) |
static list<Attachment> | getVisibleAttachments(Issue issue) |
static boolean | hasLinks(Issue issue) |
static string | inUserTimeZone(instant time) |
static boolean | isFixed(Issue issue) |