can't use IF in a nunjucks template?


I'm using JMWE to create a linked issue during a transition, and then assign the new linked issue to the appropirate person using a nunjuck template to do some simple logic....well, at least that's what I want to do.  For example:

If ValueA > 1 then assignee = Bob

if valueA > 10 then assignee = Doug

I can get JMWE to create the linked issue, no problem there.  Using a nunjucks template to set the Assignee field to works just fine.

But if I try to use an If/then in the nunjucks, it doesn't create the linked issue.  After some experimentation, I've discovered that something as simple as "if 1>0 then" doesn't work.  It works when I test the nunjucks template, but it doesn't work when I try to transition an issue, nothing happens, no issue is created.

{% if 1>0 %}

{{ }}

{% endif %}

Any ideas or suggestions on how else I could accomplish something like this?

0 answers

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Oct 31, 2018 in Marketplace Apps

Marketplace Spotlight: Zephyr

Hello Atlassian Community! Each month, we run a series of Spotlights to highlight Marketplace vendors and apps that our team thinks this Community would find valuable. In last month's Spotlig...

310 views 0 1
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you