Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
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

How can I compare the jiradate to the current day?

Capture.PNG

Im trying to do a advance compare for todays date specifically and it keeps telling me the condition doesnt match. My end goal is to apply this logic to tell a rule that if the jiradate = 12/25/2022 then dont run.

1 answer

3 votes
Alex Koxaras Community Leader Jan 12, 2022

Hi @Dom Malgieri 

I'm not quite sure what is it that you want to achieve.

{{now.jiraDate}} yields today's date (now) in the jira format. What you are trying to do is to compare the now date with an expression that returns null ({{now.jiraDate.12/01/2022}}). So what is it that you want to compare? Today's date with a specific date?

Correct, or rather a string of dates...holidays but if I need to compare them individually thats fine. I just cant seem to get it to compare the current date to a set date. I set the others date as today to see if I could get it to work instantly and then from there i could adjust the date as needed.

Alex Koxaras Community Leader Jan 12, 2022

Then try this:

compare datespng.png

Success. Much appreciated. Is there a way to do multiple dates or can it only be one date at a time?

Alex Koxaras Community Leader Jan 13, 2022

Multiple dates or multiple ifs?

dates. I think i got it though by putting or between each date on the second value

Alex Koxaras Community Leader Jan 14, 2022

Good to know!

But in case it doesn't work, try using "contains regex" instead of "equals", and as the second values type something like this: 

(2022-01-12|2022-01-14)

where all the dates you want to compare are separated by a |

 

Kindly mark my answer as accepted in order to help other find proper answers!

Cheers!

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Site Admin
TAGS
Community showcase
Published in Jira Service Management

JSM Jira Automation: How to Send SLA Breached Notifications

Hi Everyone, In   this tutorial,  we will show you how you can monitor an SLA, and send notifications before or after the SLA has been breached.   SLA Threshold Trigger The SLA t...

626 views 5 12
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