Automating worklog, excluding non-working hours and weekends
Asked by Allan Vaifale:

Hey team, looking to get some advice on an existing automation rule that I have in place.

'Logging work' is new for our team and to avoid slowing down our devs workflow or repeating reminders to fill in the worklog, we put together automation to log the time based on the time differences of two statuses (in progress \> code review).

The first step is, we log a start date as noted below, followed by the second rule of logging that work (both rules were found in the community thread, so big thank you to you all!)

My concern is that it doesn't seem to be catering to business hours/days, therefore the worklog isn't accurate.

I read in [this](https://community.atlassian.com/t5/Automation-questions/Exclude-non-working-hours-and-weekends-in-time-difference/qaq-p/1777400) thread that I could add 'businessDays', however, I'm not actually sure where to place this and if this would fit my current rule.  

Any suggestions would be greatly appreaciated - Thanks in advance!

![Snip20230327_4.png](https://community.atlassian.com/t5/image/serverpage/image-id/247859i95E13D72A9CF2306/image-size/large?v=v2&px=999 "Snip20230327_4.png")![Snip20230327_5.png](https://community.atlassian.com/t5/image/serverpage/image-id/247860iD01738D179BBCDBE/image-size/large?v=v2&px=999 "Snip20230327_5.png")


Answers:
author: Valeriia_Havrylenko_SaaSJet
body: Hello [@Allan Vaifale](/t5/user/viewprofilepage/user-id/4939493)

As an alternative , I guess you can try [Time in Status for Jira Cloud](https://marketplace.atlassian.com/apps/1219732/time-in-status-for-jira-cloud?hosting=cloud&tab=overview&utm_source=atlassian+community&utm_medium=referral&utm_campaign=Comment_Automating-worklog-excluding-non-working-hours-and-weekends_20230405)(developed by my SaaSJet team) here you can create several calendars and **add info about your work schedule** .  

Also you will have **7 types of status time reports** to quickly analyze your work and improve processes.   

For example The Time in status report shows how long an issue has been spent in each status.

The Assignee time report displays how long it takes each team member to solve a task.  

![GIF TIS.gif](https://community.atlassian.com/t5/image/serverpage/image-id/249912i0B971D027B3774B6/image-size/large?v=v2&px=999 "GIF TIS.gif")  

Our add-on has 30-day free trial version and free up to 10 users .  

Please, let me know if you have any questions  

Hope it helps,   

Valeriia


author: Gracjan Weso?owski _HeroCoders_
body: Hi [@Allan Vaifale](/t5/user/viewprofilepage/user-id/4939493)   

If you would like to consider using a third-party app for time tracking that has built-in automatic timers, I can recommend our [Clockwork Automated Time Tracking \& Timesheets Free app](https://marketplace.atlassian.com/apps/1220750/clockwork-automated-time-tracking-timesheets-free?hosting=cloud&tab=overview). I believe it fits well in your needs.  

You can use, and set up your workflow statuses to automatically start tracking time whenever an issue is in "active" status:

![active stat.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/249702i9B5D2B0CA646EE17/image-size/large?v=v2&px=999 "active stat.jpg")  
It also [calculates overnight/over-the-weekend](https://herocoders.atlassian.net/wiki/spaces/CLK/pages/3476979804/Automatic+Timers) time based on[working hours.](https://herocoders.atlassian.net/wiki/spaces/CLK/pages/3476947099/Working+Hours)  

If you have any questions, you can contact us using our[Help Center.](https://www.herocoders.com/contact)  

Cheers!  

Gracjan


author: Curt Holley
body: Hi [@Allan Vaifale](/t5/user/viewprofilepage/user-id/4939493)   
The problem with this approach (to automating time tracking) is, even with business days added in, it is still a 24 hour clock. So if something is "In progress" overnight, then moved to "code review", it will record that it was "worked on" all night.  
Plus, this approach implies that someone is actively working on the issue the entire time it is in progress. no lunch breaks, meetings, or other time out is factored in.  
If automating time tracking is the only way time tracking will be recorded in Jira, it really does raise the question "What is the value of time tracking in Jira?"  
You say it is new (Time tracking in Jira), who and what motivated this move? What is the outcome "they" are looking to achieve?