Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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?

Simeon Ross 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.

Simeon Ross 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

Announcing the waitlist for Jira Work Management

Hey there Cloud Community members! We’re excited to give you the first glimpse of the new home for business teams on Jira — Jira Work Management. Jira Work Management is the next generation of J...

637 views 10 16
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you