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
4,360,258
Community Members
 
Community Events
168
Community Groups

Smart value use of "{{#if ... }} does not seem to work

Which Jira-server version supports the use of smart value: "{{#if ... }}  text {{/}}, or is this a Jira-cloud only functionality ?

I would like to use this in a reminder email, that is sent to two people, using as source two different people fields.  However sometimes the two fields holds the same person, resulting in an email with twice the same name.  That looks a little odd.

To prevent this, I thought let's use this construct:

{{#if(issue.assignee.equals(issue.coordinator))}}
  Name 1,
{{/}}

But this does not work.

the {{#if  }} is shown here:

But it looks like functionality for the Jira cloud version.

Is there a way to similar functionality in Jira-Server?

 

2 answers

1 accepted

0 votes
Answer accepted
John Funk Community Leader Feb 07, 2021

Hi Richard,

Try adding .accountId after coordinator (so {{#if(issue.assignee.equals(issue.coordinator.accountId))}}

Or .displayName if accountId doe not work as hoped.

John Funk Community Leader Feb 07, 2021

@Simeon Ross  - Any ideas on this one? Is the IF statement available for Server version?

Simmo Atlassian Team Feb 07, 2021

Hi @John Funk ,

I suspect not. This was something we have added since the split and I suspect that the server team has not caught up.

Cheers,

Simeon.

Like John Funk likes this

Any idea if this will be added, and if so when?

Would be good and useful functionality to have.

Is there any information on the web available about the "{{#if functionality)?   It some places it pops up, but there is no real explanation.  At the same time, it would be to good to mention that it is Jira-cloud functionality only. 

I've not been able to find such kind of information.

Simmo Atlassian Team Feb 08, 2021

Hi @Richard Bos ,

I'll mention the docs discrepancies to the person that maintains our documentation. As for if and when the support will go to server, I have no idea. I'll ask one of their team to update you here.

Cheers,

Simeon.

Hi @Richard Bos

it is not supported in server version now.

Please raise suggestion ticket in our public tracker

https://jira.atlassian.com/projects/JIRAAUTOSERVER

 

Regards

Daniel

Like Richard Bos likes this

@Daniel Ramotowski, more people seem to be interested in this functionality, as there was already a ticket open for https://jira.atlassian.com/browse/JIRAAUTOSERVER-212 !

Looking forward to see it implemented soon!

Like # people like this

@Richard Bos ,

Thanks You noticed the ticket.

Cheers

Daniel

Like John Funk likes this

Hi John, thanks a lot for your quick response.

The issue is not so much with the smart values itself, but with the {{#if ... }} statement.

The {{#if ... }} statement does not seem to work :(

 

Example (with issue type story:

{{issue.issuetype.name}} | {{ #if( eq(issue.issuetype.name, "Task")) }} This is a task {{ / }}

The following is logged:

Story | This is a task

 

The spacing format is mentioned in the following article: Smart-value-in-published-article-doesn-t-work .

It looks like our Jira-server does not the {{#if ... }} statement :(

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Jira

Online AMA this week: Your project management questions answered by Jira Design Lead James Rotanson

We know that great teams require amazing project management chops. It's no surprise that great teams who use Jira have strong project managers, effective workflows, and secrets that bring planning ...

190 views 1 6
Read article

Atlassian Community Events