Skip to content

Instantly share code, notes, and snippets.

@adufilie
Created May 16, 2016 18:04
Show Gist options
  • Save adufilie/3acd09beac2dc5e2b868f9f44bcad2cf to your computer and use it in GitHub Desktop.
Save adufilie/3acd09beac2dc5e2b868f9f44bcad2cf to your computer and use it in GitHub Desktop.
YouTrack -> Slack notification readability fix
<#ftl attributes={"description":"Overview of the issue update in jabber notification"}>
<#escape x as x?html>
<p>
<#assign priority = issue.Priority>
<#assign isShowStopper = (!priority?is_enumerable && priority == "Show-stopper")>
<#if change.hasEvent("CREATED")>
<#if (!priority?is_enumerable && priority == "Show-stopper")>
<@l10n>${issue.reporter.getVisibleName()} created show-stopper:</@l10n>
<#else>
<@l10n>${issue.reporter.getVisibleName()} created new issue:</@l10n>
</#if>
<#else>
<#if from == to>
<#if isShowStopper>
<@l10n>You updated show-stopper:</@l10n>
<#else>
<@l10n>You updated issue:</@l10n>
</#if>
<#else>
<#if isShowStopper>
<@l10n>${from.getVisibleName()} updated show-stopper:</@l10n>
<#else>
<@l10n>${from.getVisibleName()} updated issue:</@l10n>
</#if>
</#if>
</#if>
</p>
</#escape>
-<br><br>
<#include "digest_overview_jabber.ftl"><br>
*${issue.summary}*<br>
<#list change.events as event>
<#assign category = event.category>
<#if category == "VOTERS">
<#if event.getRemovedValues()?has_content>
<#assign delta = "-1">
<#else>
<#assign delta = "+1">
</#if>
<p>&gt;� <@l10n>votes: ${delta} (${from.getVisibleName()}), total: ${issue.votes}</@l10n></p>
<#else>
<p>&gt;� ${event.getPresentation()}</p>
</#if>
</#list><br>
${Utils.getUrl(issue)}<br>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment