If Statement that compares the start of day with a custom Date/Time value.

Delaney Bannon
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 14, 2025

I'm trying to have an if statement that runs if a date/time picker value, "Last Status Change" is after the start of today's date. This was my most recent attempt:


{{#if(now.toDateTimeAtStartOfDay.isBefore("Last Status Change"))

Test

{{/}}

 

This permutation has errors, but I've tried dozens of different variations and I'm out of ideas. I think this is just the cleanest psuedocode example for showing what I'm trying to do. I've also tried getting a diff between "now" and "Last Status Change" but it would appear blank.

 

Any thoughts or suggestions would be appreciated.

1 answer

0 votes
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.
January 14, 2025

Hi @Delaney Bannon -- Welcome to the Atlassian Community!

Is "Last Status Change" a custom field you have added and which is a date / time type field?

If so, please try this:

{{#if(now.toDateTimeAtStartOfDay.isBefore(issue.Last Status Change))}}Test{{/}}

You will need to confirm the exact smart value (or custom field ID) to use for your field for the expression to work. 

That may be done using this how-to article: https://support.atlassian.com/cloud-automation/docs/find-the-smart-value-for-a-field/

Kind regards,
Bill

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events