So I have an automation where I report on number of days people are out of office.
Every day I send a message to slack saying something like this:
John Smith is on vacation from Thu, May 9 until Wed, May 15, lasting X days.
In my automation I look for vacation entries:
project = OOO and type = Sub-task and ("Start date[Date]" >= startOfDay(1) AND "Start date[Date]" <= endOfWeek(1)) ORDER BY updated DESCThen I iterate through the values in a variable:
{{#lookupIssues}}>:dnd: *{{assignee.displayName}}* from *{{Start Date.format("EEE, MMM d")}}* until *{{End Date.format("EEE, MMM d")}}*, lasting {{#if (equals(Start Date, End Date))}}
1d {{/}} {{#if (not(equals(Start Date, End Date)))}} *{{End Date.plusDays(1).diff(Start Date).days.abs}}* days.{{/}}{{/}} The problem is the value for the number of days the vacation will last is absolutely wrong. It look like Jira is dishing out completely wrong numbers. For example:

Any help is greatly appreciated.