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).
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?
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")}}
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!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.