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

Richard Bos February 7, 2021

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
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 7, 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
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 7, 2021

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

Simmo
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 7, 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
Richard Bos February 8, 2021

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
Atlassian Team members are employees working across the company in a wide variety of roles.
February 8, 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.

Daniel Ramotowski
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 11, 2021

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
Richard Bos February 12, 2021

@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
Daniel Ramotowski
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 16, 2021

@Richard Bos ,

Thanks You noticed the ticket.

Cheers

Daniel

Like John Funk likes this
1 vote
Richard Bos February 7, 2021

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 :(

John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 7, 2021

.

Suggest an answer

Log in or Sign up to answer