Forums

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

setting date field to {{now.jiraDate}} setting to yesterday at 5 PM

Louise Baker
Contributor
June 11, 2025

I created a new automation rule that when certain conditions are met, it should set a custom date field to the current day, which I'm using {{now.jiraDate}}.

My automation is pretty involved, and I have debugged every step of the way to my satisfaction. The only part of it that is failing is this {{now.jiraDate}}

The automation is run hourly, and scans over all tickets that were updated in that last hour. It compares the last comment's date, and if it is today, then it updates a field "Last Comment Date" with now.jiraDate.

When I was debugging earlier today, I thought "ok, maybe it has something to do with the time zones, etc." however, if that were true, I would think that, since its run hourly, the issues updated hourly would be 3pm / 4pm / 5pm, however they're consistently June 10, 5 PM (yesterday, 5 PM).

Screenshot 2025-06-11 at 4.21.51 PM.png

I have another automation I'm switching away from to this newer one (in favor of less automation count) which triggers in real-time with the trigger "issue commented on". It's been updated to only log to the audit log, so i'm able to reconcile this manually for now, but would prefer not to :) In the previous, real-time automation, I also used {{now.jiraDate}} to trigger the same custom field, so I'm unsure why its failing.

Any advice on how to get this to fill in with today's date? Am I doing something wrong?

2 answers

0 votes
Calvin
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 11, 2025

Do you know if there is a mismatch between timezones in some way?

Maybe check an audit log with the time zone in your area

eg: 

{{now.convertToTimeZone("Australia/Sydney")}}

 https://confluence.atlassian.com/automation/jira-smart-values-date-and-time-993924864.html

---

Ah my bad, i didn't read this properly, I think you are only setting date not time, so your only pulling the same date value? and an empty time value which may be defaulting to that 5am?, Maybe use something similar to:

{{now.format("yyyy-MM-dd HH:mm")}}

Louise Baker
Contributor
July 9, 2025

Calvin - thanks for this suggestion. It didn't exactly solve the issue, however it did help a LOT because I was seeing some of the trigger issues failing when they should have passed, and it was due to two different time zones. So setting everything I was comparing to the same timezone helped solve another issue I had. Thank you!

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.
June 11, 2025

Hi @Louise Baker 

Where do you see a value of yesterday at 5PM

I only see your rule using the jiraDate text format, which is just the date as yyyy-MM-dd: 

https://support.atlassian.com/cloud-automation/docs/jira-smart-values-date-and-time/#Date-format---

 

Perhaps if you add an image of your audit log's details showing what you mean that will provide more context.

 

And, what is the type for your custom field: date picker, date / time picker, or something else?

 

Kind regards,
Bill

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.
July 9, 2025

Hi @Louise Baker 

Just following up to check if this answered your question.  If so, please consider marking this one as "answered".  That will help others with a similar need find solutions faster.  If not, please let the community know what help you need with the rule changes.

Thanks!

Louise Baker
Contributor
July 9, 2025

Thanks for following up! It did not answer the question

What I ended up doing was changing the approach to what I was doing. I realized that I didn't need to set it to 'now' and instead could set it to the last created comment date, which was more accurate anyway than "now"

I never did figure out what the issue was, even after more and more troubleshooting

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events