Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to implement an 'Else' clause in an "If" Smart Value

Matt Mace June 3, 2021

I want to test if the 'Summary' field in a Jira Issue includes a date. If it does then I don't want to display a custom date but if it doesn't then I want to display the custom date field.

This is what I am starting with:

{{#if(not(issue.summary.match(".*(202).*")}} {{issue.Incident Start (UTC).jiraDate}} - {{issue.summary}}

Here I am looking for the year portion of a date for the range 2020-2029. and then display the custom date field. 
But how do I then not print the custom date field if there already is a date in the summaryimage.png

1 answer

1 accepted

3 votes
Answer accepted
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 3, 2021

Hi @Matt Mace 

Would you please provide some context, perhaps with an image of your rule?  That may help the community to offer you ideas.  Thanks!

Currently, there appears to be no ELSE structure in the smart value logical processing:

https://support.atlassian.com/jira-software-cloud/docs/smart-values-conditional-logic/

However, if you are able to use an if/else condition component in the rule you could achieve the same effect.

Best regards,

Bill

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events