Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 21:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.
×Hi,
We are using Jira for time tracking, so when someone is working on an issue they would log the time in Jira.
For tracking purposes, we also need to log days off.
We have a dedicated issue type for logging days off with custom start and end date fields.
Is there any way to automatically log work on that issue - 8h for every day between the start and end date (including those dates)?
We are doing this manually now, but would really like to automate if possible.
You might be able to use the date functions in Automation. The rule might look something like this:
The smart value in the screenshot is:
{{#=}}({{issue.Start Date.diff(issue.End Date).businessDays}}+1)*8{{/}}h
The diff function is not inclusive, that's why I have added + 1 to the result.
Cheers,
Brydie
@bmccoythanks for the suggestion.
I tried it, but I am getting an error:
Tried to copy value but fields are incompatible
Date Started : customfield_10409
Could this be because my start date field only includes date without a timestamp?
If so, is there a way to resolve this somehow without adding the timestamp to the field?
And also, I wanted to ask, will this log 8 hours for each day that would be between Start Date and End Date or will it log for example, if the duration is 2 days, 16h for the Start Date?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Krzysztof Kiser you're right, it's because the start date doesn't have a timestamp. I've raised AUT-2114 to address this (fix on its way)
The formula I have used will get converted into the string "16h", which then gets logged as a single work log starting on the "Start Date".
If you would like to log 8h on each day I think Don is on the right track using a Scheduled trigger. To accommodate not logging twice for a single day I would only run your rule once a day, (the following day the conditions in the JQL would not be met anymore so the rule would not run).
The JQL in that example:
issuetype = Story and "Start date" <= "{{now.jiraDate}}" and "End Date" >= "{{now.jiraDate}}" and resolution = unresolved
Cheers,
Brydie
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Do you have Automation for JIRA?
https://marketplace.atlassian.com/apps/1215460/automation-for-jira-server?hosting=datacenter&tab=overview
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Don MastenI do and I already looked at it. I don't see an option to log work for days between two dates.
Additionally, I need to be able to make one exception - if the start and end date are the same, only 8h are logged, not 16h.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Krzysztof Kiser did you try a cron with a jql? It might be easier to a second rule for your one exception.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
is there a way to log work as the logAuthor=reporter? because this way the logauthor is jira automation, and than in timesheets it is not assigned to the real user.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.