Custom Email Template with FogBugz Case Data

Answered

Hi there,

I'd like to customize my commont.ftl template or build_successful.ftl to have the Issue Tracker Data in it.

I'm using FogBugz tracking system, which I had successfully integrated with my TeamCity Plugins(https://github.com/jozefizso/teamcity-fogbugz).

Now I'd like to have a FogBugz ticket/case data in the build success email.

Trying to add a <#macro/> within the namespace "jetbrains.buildServer.issueTracker.IssueData", but no luck.

Getting the error [TEAMCITY TEMPLATE ERROR] in the email.

Below I have a pic of the Issue Data in Issues tab. This data I'd like to have in a build success email.

Any help I'll appreciate.

 

Thanks,

Emil 

0
3 comments

Hi Emil,

Could you please attach full build_successful.ftl file?

0
Avatar
Permanently deleted user

Hi Alina,

Thanks for getting back to my question.

Actually I found how to get the Issue Data.

I have created a new <#macro> in comon/ftl.

 

<#macro calyx_fogbugz bean>
<#-- @ftlvariable name="bean" type="jetbrains.buildServer.notification.impl.ChangesBean" -->
<#-- @ftlvariable name="webLinks" type="jetbrains.buildServer.serverSide.WebLinks" -->
<div>
<#assign modNum=bean.modificationsNumber/>
<#if (modNum > 0)>
<div style="${separatorStyle}"></div>
<br/>
<div>
<#list bean.modifications as mod>
<div>
<#list build.getRelatedIssues() as issue>
Related FogBugz Case #<a href='${issue.getUrl()}'>${issue.getId()}</a>
<br/>
</#list>
</div>
</#list>
</div>
</#if>
</div>
</#macro>

 

0

Sorry for delay. I'm glad that issue was resolved!

Thank you for sharing your solution.

0

Please sign in to leave a comment.