Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Cálculo de Horas Úteis

Vinícius Pereira
Contributor
May 13, 2026

Pessoal, bom dia!

Preciso realizar o cálculo de quanto tempo um item ficou bloqueado (flag). Sendo assim, consigo pegar a data/hora início do flag até a data/hora fim do flag. Porém, esse tempo precisa ser cálculado em "horas úteis".

Minhas horas úteis por dia: de 08:00 am até 05:00 pm

Exemplo de cálculo:

data/hora início = 13/05/2026 03:00 pm

data/hora fim = 14/05/2026 09:00 pm

cálculo de horas úteis:
         13/05/2026 de 03:00 pm até 05:00 pm = 2 horas úteis

         14/05/2026 de 08:00 am até 09:00 am = 1 hora útil

total de horas úteis = 3 horas úteis

Sabem me dizer se o Jira possui alguma variável inteligente que realiza esse cálculo? Em caso negativo, conseguem me sugerir algo?

Obrigado,

Vinícius Pereira

1 answer

0 votes
Trudy Claspill
Community Champion
May 13, 2026

Olá @Vinícius Pereira ,

O Jira possui funções para calcular a diferença, em horas, entre dois registros de data e hora (timestamps).

https://support.atlassian.com/cloud-automation/docs/jira-smart-values-date-and-time/#Date-difference---

No entanto, isso não considera o horário comercial. A ferramenta inclui, sim, uma opção para dias úteis.

Para obter o resultado desejado, seriam necessários vários cálculos. Por exemplo, você começaria calculando a diferença em dias úteis e, em seguida, multiplicaria esse valor pelo número de horas em um dia útil.

Depois, seria preciso verificar a data/hora de início para determinar se ela cai em um dia útil e calcular o número de horas entre esse horário e o horário de encerramento do seu dia útil.

Em seguida, você precisaria verificar a data/hora de término para determinar se ela cai em um dia útil e calcular o número de horas entre esse horário e o horário de início do seu dia útil.

Alternativamente, você pode procurar um aplicativo de terceiros que ofereça esse tipo de cálculo.

O Chrome Gemini sugeriu o Scriptrunner, o Time in Status e o Tempo como aplicativos que poderiam oferecer uma solução.

 

----

Hello,

Jira has functions for calculating the difference between two time stamps in hours.

https://support.atlassian.com/cloud-automation/docs/jira-smart-values-date-and-time/#Date-difference---

However that does not include Business hours. It does include an option for business days.

To get the result you want would require multiple calculations. For instance you would start with calculating the difference in business days, then multiply that by the number of hours in a business day.

You would then need to look at the start date/time to determine if it is a business day, and calculate the number of hours between the time and the ending time of your business day.

You would then need to look at the end date/time to determine if it is a business day, and calculate the number of hours between the time and the starting time of your business day.

Alternately you look for a third party app that would provide that sort of calculation.

Chrome Gemini suggested Scriptrunner, Time in Status, and Tempo as apps that might provide a solution.

 

Calculation of Working Hours

 

Good morning everyone!

I need to calculate how long an item has been flagged. Therefore, I can retrieve the start date/time and the end date/time of the flag. However, this time needs to be calculated in "business hours".

My working hours per day: 8:00 am to 5:00 pm

Example calculation:

Start date/time = 13/05/2026 03:00 pm

end date/time = 14/05/2026 09:00 pm

Calculation of working hours:
         May 13, 2026, from 3:00 pm to 5:00 pm = 2 working hours

         14/05/2026 from 08:00 am to 09:00 am = 1 working hour

Total working hours = 3 working hours

Can you tell me if Jira has any smart variables that perform this calculation? If not, can you suggest something?

Thanks,

Vinicius Pereira

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events