I have an automation (see below) that sets the Start date to the Sprint.startDate whenever I change the value of a sprint. The automation works. But it changes to a day before. It does the same for the Sprint End and Due date.
For example: My sprint starts the 2nd of October, I add the sprint, the Start date becomes the 1st of October. I've seen that this probably comes due to the fact that my timezone is different to the Jira time zone. But I just want it to set the value the same. How can I do that?
I've tried removing the .jqlDate, but then I get an error due to date formatting. Before that I used jiraDate, but that first introduced the date.
Hello @Max ,
Welcome to the community..!
Could you please check below smart value for your use-case:
Start Date:
{{sprint.startDate.convertToTimeZone("Your/LocalTimeZone")}}
{{sprint.endDate.convertToTimeZone("Your/LocalTimeZone")}}
Replace "Your/LocalTimeZone"
with the appropriate timezone, such as "America/New_York"
.
Hi @Max
First thing, the Sprint field in work items is a list of values. Thus when a work item has carried over into other sprints, the expression you use could lead to a list of date values. The fix for that is using the list function max to get the latest one, for example:
{{issue.sprint.startDate.max.jiraDate}}
Next for your actual question, I recall several defects in the public backlog for this symptom related to the Start Date and Due Date fields are date type while the Sprint's Start Date and End Date are date / time type (leading to challenges with conversion and time zones) when using automatic sprint durations.
The only workarounds I remember were to explicitly set your Sprint values rather than the automatic values, ensuring they not near the date / time boundaries by picking the date exactly.
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.
Hey @Max
I have a suspicion that this is a time zone mismatch. Jira stores dates in UTC, and jqDate
may not apply time zone correction for your local time zone.
Try using jiraDate
instead of jqDate
:
Hope tis helps and let me know if it worked!
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.