Here're the values returned by now function at different times.
May 12 @ 09:18pm IST - 2024-05-12T15:48:54.3+0000
May 12 @ 09:19pm IST - 2024-05-12T15:30:38.3+0000
Hi @Nilesh G -- Welcome to the Atlassian Community!
Context is important for automation rule questions.
Please post an image of your complete automation rule, an image of each action where you are using {{now}} as you describe, an image of the rule details (at the top) to show the rule configuration settings, and an image of the audit log details showing the rule execution. That information may help the community to offer better suggestions.
Kind regards,
Bill
Hi @Bill Sheboy ! Thanks for prompt response. Here's the context.
We've an automation rule for setting the value of a date and time picker custom field based the minute of the hour.
1. For the first 15 mins, value is set to beginning of the current hour
2. From 15 to 45 mins, value is set to 30th minute and
3. For the last 15 mins of the hour, value is set to start of next hour {{now.plusHours(1).minusMinutes(now.minute)}}
First two rules work as expected, however, the last one returns inconsistent results. In order to investigate further, an action is included to capture value of now to audit log. That's when following is observed.
Value returned by now at 9:18pm IST - 2024-05-12T15:48:54.3+0000
Value returned by now at 9:19pm IST - 2024-05-12T15:30:38.3+0000
Here're the snapshot of automation rules.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for that information.
As a tip for community questions about automation rules, try using a scrolling browser addon or screen capture app to contain the entire rule in one image. That will ensure it shows with the full context / alignment.
Back to your question...I wonder if this is related to the half-hour part of the IST time zone, relative to {{now}} being returned in UTC. Perhaps try converting to the IST time zone first before capturing the minute value:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Bill Sheboy ! Problem lies with one of the else/if conditions in my rule which is set wrongly. Anyways, thanks for your inputs.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
To confirm, have you solved your question by fixing one of the conditions? Thanks!
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.