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
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Bridget Sauer
Published Thursday in Marketplace Apps

Calling all developers––You're invited to Atlas Camp 2018

 Atlas Camp   is our developer event which will take place in Barcelona, Spain  from the 6th -7th of   September . This is a great opportunity to meet other developers and get n...

88 views 0 5
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