Hi I dont want to include weekends to Calculate any TAT of an issue
Asked by Vipin Kumar:

Please help me out with the JQL query.


Answers:
author: Valeriia_Havrylenko_SaaSJet
body: Hi [@Vipin Kumar](/t5/user/viewprofilepage/user-id/5575012) ?  
Welcome to the Atlassian Community!

You might have to create your own solution or use a third-party app to access this data. So if you consider installing third-party add-ons to help, you can try [Time in Status](https://marketplace.atlassian.com/apps/1219732?tab=overview&utm_campaign=Comment_Hi-I-dont-want-to-include-weekends-to-Calculate-any-TAT-of-an_20240826&utm_medium=referral&utm_source=Atlassian_Community&hosting=cloud) developed by my team.

The algorithm for excluding weekends when calculating the TAT for an issue is quite simple.

First, you must set up your work calendar - add days off, breaks, holidays, etc.

![11111111111.png](https://community.atlassian.com/t5/image/serverpage/image-id/312409i2458DCC859E141EE/image-size/large?v=v2&px=999 "11111111111.png")  
In the generated report, select the required project. To generate a report, select the Created by a specific date range filter---select a date three days before the current one. You can also specify the time period you need.

![2024-03-15_17-26-44.png](https://community.atlassian.com/t5/image/serverpage/image-id/312410iCB99860CF920DDDB/image-size/large?v=v2&px=999 "2024-03-15_17-26-44.png")

In the report, select the Business Days data format. This will prevent the calculation from considering non-business hours.

![2024-03-15_17-28-14.png](https://community.atlassian.com/t5/image/serverpage/image-id/312411i64E1B5AA7E990854/image-size/large?v=v2&px=999 "2024-03-15_17-28-14.png")Remember that you can always contact us at [Support](https://saasjet.atlassian.net/servicedesk/customer/portal/1) to get answers to all your questions.

I hope this is useful for you!


author: Rahul_RVS_Support
body: Hi [@Vipin Kumar](/t5/user/viewprofilepage/user-id/5575012)

Welcome to the community !!

Not sure it can be achieved through native Jira. You may need to write your custom solution or use a 3rd party app to get this data. If you are open to try one, pls do take a look at

[Time in Status Reports](https://marketplace.atlassian.com/apps/1226187/time-in-status-reports?hosting=cloud&tab=overview)

With this app you generate time in status for multiple issues with multiple filter and grouping options. You can group your statuses to define your TAT/resolutions times. Also the calendar feature allows to remove weekends and non working hours from the calculations.  
Also the app has 20+ reports to meet a variety of time in status use cases. Do give it a try.

Disclaimer : I work for the vendor who built this app

![TIS - Cycle Time report.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/343818iD0C2923EBD054B23/image-size/large?v=v2&px=999 "TIS - Cycle Time report.PNG")

![TIS - Working Days.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/343817i4EB7F9737E43A49A/image-size/large?v=v2&px=999 "TIS - Working Days.PNG")


author: Gizem G?k?e _OBSS_
body: Hello [@Vipin Kumar](/t5/user/viewprofilepage/user-id/5575012) ,

Welcome to the community!

There is no built in solution in Jira for this. So in order to track TAT without including weekends (or non-working days) I suggest you use a marketplace app.

[Timepiece (formerly Time in Status)](https://marketplace.atlassian.com/apps/1211756/time-in-status?hosting=cloud&tab=overview&utm_source=community&utm_medium=answer) ,the oldest and leading "Time in Status" app in Atlassian Marketplace, which is developed by my team at OBSS, has a report type that will meet your need. Our app is available for both Jira Cloud, and Data Center.

Timepiece mainly allows you to see how much time each issue spent on each **status** or each **assignee** . You can combine the time for multiple statuses to get metrics like **TAT (Turn Around Time.)**, **Issue Age, Cycle Time, Lead Time, Resolution Time** etc.

![Lead Time Average Report.png](https://community.atlassian.com/t5/image/serverpage/image-id/322821iA1F9F81F0D5CCD1C/image-size/large?v=v2&px=999 "Lead Time Average Report.png")

The application also offers custom calendar support. **Calendars can be configured based on your working hours, excluding holidays and non-working hours (even lunch breaks) from the calculation.** Timepiece reports can be generated based on your custom calendars. In your case, you can set up two different calendars for each of your shifts. By selecting the appropriate calendar, you can retrieve all the reports you need from the application and easily analyze performance between shifts.

![Cstom Calendar.png](https://community.atlassian.com/t5/image/serverpage/image-id/304818i2CAB80647B47EA8E/image-dimensions/249x344?v=v2 "Cstom Calendar.png")

The app calculates its reports using already existing Jira issue histories so when you install the app, you don't need to add anything to your issue workflows and you can get reports on your past issues as well.

Visit [Timepiece (formerly Time in Status)](https://marketplace.atlassian.com/apps/1211756/time-in-status?hosting=cloud&tab=overview&utm_source=community&utm_medium=answer) to explore and enjoy **a 30-day free trial** to experience the full range of features.

If you wish, you can also [schedule a live demo.](https://calendar.app.google/faQYgsEekRdFxnPj7) We will provide a comprehensive overview of the application and address any inquiries you may have.

Hope it helps,

Gizem


author: Bill Sheboy
body: Hi [@Vipin Kumar](/t5/user/viewprofilepage/user-id/5575012) -- Welcome to the Atlassian Community!

The built-in JQL features do not support excluding weekends with the date / time functions and features: <https://support.atlassian.com/jira-software-cloud/docs/jql-functions/>

Please describe the problem you are trying to solve and what you mean by "TAT". Knowing that may help the community to offer alternatives.

Kind regards,  
Bill

comments: author: Vipin Kumar
body: TAT means- Turn Around Time. The amount of time it takes to complete a task.


author: Vipin Kumar
body: I want to calculate duration from X days to Y days excluding weekends. Please help me out with JQL query


author: Bill Sheboy
body: You seem to want to calculate the Lead Time (from created to completed) or some form of cycle time (such as Build Cycle Time, from start of work to completed).

As already described, the built-in JQL cannot calculate the difference and cannot exclude the weekend days (for more than a single specific week). You would need one of the workarounds described by others:

* export the data and perform the calculation with other tools
* use a marketplace addon / app
* use an automation rule and custom fields to perform the calculation and store it for use with basic JQL queries


author: Hannes Obweger - JXL for Jira
body: Hi [@Vipin Kumar](/t5/user/viewprofilepage/user-id/5575012)

As you can see from the previous answers, this is an area where many Jira users rely on apps from the Atlassian Marketplace to fulfil their reporting needs.

If a Marketplace app is an option for you, I think you'll like the app that my team and I are working on, [JXL for Jira](https://marketplace.atlassian.com/apps/1224710?hosting=cloud&tab=overview&utm_source=atlassian-community&utm_medium=referral&utm_content=2792967).

JXL is a full-fledged spreadsheet/table view for your issues that allows viewing, inline-editing, sorting, and filtering by all your issue fields, much like you'd do in e.g. Excel or Google Sheets. It also comes with a number of so-called *history columns* that aren't natively available, including an issue's *time between created and resolved* , *time in \[status\],* or*time between \[status\] and \[status\].*

This is how it looks in action:

![time-in-status-v2.gif](https://community.atlassian.com/t5/image/serverpage/image-id/347085iE36840BCED522B81/image-size/large?v=v2&px=999 "time-in-status-v2.gif")

As you can see above, you can easily sort and filter by your history columns, and also use them across JXL's advanced features, such as support for (configurable) *issue hierarchies* , *issue grouping* by any issue field(s), *sum-ups* , or *conditional formatting*.

Of course, you can also export your data to XSLX (Excel, Google Sheets) or CSV in just two clicks.

Any questions just let me know,

Best,

Hannes


author: Mehmet A _Bloompeak_
body: Hi [@Vipin Kumar](/t5/user/viewprofilepage/user-id/5575012)

Welcome to the Atlassian Community!

If you prefer using a marketplace app, you can try [Status Time Reports](https://marketplace.atlassian.com/1221826) app developed by our team. It mainly provides reports and gadgets based on how much time passed in each status.

Status durations are calculated according to the **working calendar** you define. Once you enter your working calendar into the app, it takes your working schedule into account too. That is, "In Progress" time of an issue opened on Friday at 5 PM and closed on Monday at 9 AM, will be a few hours rather than 3 days.

You can get TAT of an issue by using **lead** **time** (the time interval between the moment an issue is requested to the moment it is completed) **report** . Here is the [online demo link](http://status-time.bloompeak.io/demo), you can see it in action and try without installing the app. For your case, you can have a look at [Lead Time for Each Issue](https://bloompeak.atlassian.net/plugins/servlet/ac/io.bloompeak.status-time/st-report?ac.reportid=904) report.

For further details, you can have a look at [Cycle Time and Lead Time in Jira: Productivity Measurement with Two Critical Parameters](https://community.atlassian.com/t5/Marketplace-Apps-Integrations/Cycle-Time-and-Lead-Time-in-Jira-Productivity-Measurement-with/ba-p/1905845) article and [Status Time Reports How to Videos.](https://www.youtube.com/playlist?list=PLVHoaAkoFPJnG9nLkzcxG0P00ndQgimDs)  

++App Features:++

* This app has a dynamic status grouping feature so that you can generate various valuable reports as **time in status, time in assignee, status entry dates and status counts, cycle time and lead time, resolution time, average/sum reports by any field(e.g. average in progress time by project, average cycle time by issue creation month).**

* You can search issues by Project, Issue Type, Status, Assignee, Issue Creation/Resolution Date(and any other Date field) and JQL Query.
* You can set different duration formats.
* You can export reports in CSV file format and open them in MS Excel.
* You can also add this app as a gadget to your Jira dashboards and reach "Status Time" from Issue Detail page.
* You can enable/disable access to Status Time reports\&gadgets and Issue Detail page per project, users, groups or project role.

If you are looking for a completely **free** solution, you can try the limited version [Status Time Reports Free](https://marketplace.atlassian.com/apps/1222051).

If you have any questions, feel free to [schedule a demo](https://bloompeak.io/schedule-a-call) with us.

Hope it helps.


author: Danut M _StonikByte_
body: Hi [@Vipin Kumar](/t5/user/viewprofilepage/user-id/5575012),

I assume that by TAT you mean Turn Around Time (TAT): *The amount of time it takes to complete a task or process.* I think is the same as Lead Time (or maybe Cycle Time).

If so, be aware that this type of metric cannot be measured by simply using an JQL. You will need a report or gadget that is able to calculate this.

You could try using the **Control Chart report of Jira**. It has an option for excluding non-working days, but unfortunately it only shows a chart not a report with the individual issues.

For something better and more detailed, you could search for an app on Atlassian Marketplace.

If you are open to using an app from Marketplace, be aware that our [Great Gadgets](https://marketplace.atlassian.com/search?query=stonikbyte%20great%20gadgets%20agile) app includes some gadgets that allow you to measure TAT: **Control Chart gadget** , **Cycle Time Trend gadget** and **Histogram Chart gadget**.

All these gadgets have an ++option to exclude the weekends++.

Here are some example for measuring and showing TAT by using these gadgets:

**Cycle Time Trend Gadget**

![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/343621iB0729ADF3F72FEBD/image-size/large?v=v2&px=999 "image.png")

**Cycle Time Trend Gadget**

![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/343620i0EBCA278ABC2A1DC/image-size/large?v=v2&px=999 "image.png")

**Histogram Chart**

**![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/343622i5CC44EED9CD9A815/image-size/large?v=v2&px=999 "image.png")**

These gadgets can show a **Data tab** with TAT for each issue. This report can be exported in CSV format.

![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/343624i7E33CBFCE24FD36F/image-size/large?v=v2&px=999 "image.png")

Danut.


Tags: cloud

jira-cloud