Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

Having trouble referencing soy template

Hello everyone

I'm trying to reference a template in .soy template file called 'JIRA.Templates.Test' from  JS file.

I'm getting the error: Uncaught TypeError:

Cannot read property 'helloWorld' of undefined at q.render

Can you help me?

<web-resource key="my-resources" name="my-web-resources">
    <resource type="download" name="view-tests.js" location="/test/view-tests.js"/>
      <resource type="download" name="edit-test-row.js" location="/test/edit-test-row.js"/>    
      <resource type="download" name="test-row.js" location="/test/test-row.js"/>
       <resource type="download" name="view-tests.vm" location="/test/view-tests.vm"/>
      <resource type="download" name="view-test-days.vm" location="/test/view-test-days.vm"/>    
      <transformation extension="soy">
          <transformer key="soyTransformer"/>
        <resource type="download" name="" location="/templates/"/>
      <transformation extension="js">
            <transformer key="jsI18n"/>
{namespace JIRA.Templates.Test}
{template .helloWorld}
<div>Hello !</div>
jQuery(function () {
     AJS.$('#edit-tests').click(function() {   
        var template = JIRA.Templates.Test.helloWorld();

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes

Hi Natalia,
I did not use SOY for a while and I can not tell you what is wrong with your sample but here is snippet from my old project:

{namespace Confluence.Templates.SomeName}

{template .someFunction}

and in JS I have:

"use strict";
define('_myEntryName', [ 'jquery', 'confluence/templates'], function($, Templates) {

Maybe reason is that JS compiled from the SOY templates does not declare global JS variable but AMD entry so it should be referred as in the code block above. Anyway I remember that I had to look into Confluence/JIRA sources to make it work.

AUG Leaders

Atlassian Community Events