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 Feb 07, 2019 in Marketplace Apps

A Timeless Love Story

It started as any story starts, on a normal, rainy day.   Admin meets App, and her name was Klok2, and like any first relationship we were both trying to make it work but neither one knew what...

457 views 8 27
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