Forums

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

Se puede calcular automáticamente el tiempo trabajado de una tarea cuando cambia de estado?

Alejandra Ruiz
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 10, 2023

Quisiera saber si en cada tarea, cuando yo Cambio de estado POR HACER a HACIENDO empiece a contar el tiempo, y luego cuando cambio a TERMINADO calcule cuánto tiempo tardó? Hacerlo automático. Y que tenga en cuenta sólo horas hábiles

1 answer

0 votes
Jack Brickey
Community Champion
August 21, 2023

Hi @Alejandra Ruiz ,

Hay soluciones adicionales que podrían ser mejores que la siguiente idea, pero aquí hay una forma nativa de lograr su objetivo utilizando la automatización.

 

  • Crea un campo de fecha/hora personalizado, vamos a llamarlo "hora de inicio"
  • Crear una regla de automatización para registrar el momento en que el problema se transfiere a Doing
    • Disparador - transición de Hacer a Hacer
    • Condición - cualquier condición que restrinja cuándo se ejecutará la acción, o ninguna condición si no es necesaria
    • Acción - edita el problema y establece la hora para ahora

 

  • Crear una regla de automatización para calcular la diferencia entre la "hora de inicio" y la hora de resolución
    • Disparador - transición de Hacer a Hecho
    • Acción - comenta y usa {{issue.started time.diff(issue.resolutiondate).prettyPrint}}

 


For English folks...

There are addon solutions that might be better than the following idea but here is a native way to achieve your goal using Automation.

  • Create a custom date/time field, let's name it "started time"
  • create an automation rule to record the time the issue is transitioned to Doing
    • trigger - transition from To Do to Doing
    • condition - any conditions that will restrict when the action will be executed, or no condition if none needed
    • action - edit the issue and set the time to now
  • create an automation rule to calculate the difference between "started time" and resolution time
    • trigger - transition from Doing to Done
    • action - comment and use {{issue.started time.diff(issue.resolutiondate).prettyPrint}}
emma.deantonio January 30, 2024

Hola @Jack Brickey ! Podrías adjuntar un ejemplo con fotos? No acabo de entender como hacerlo. Muchas Gracias!!

Jack Brickey
Community Champion
January 30, 2024

Hi @emma.deantonio ,No tengo esto creado en mi caso en este momento. Intentaré crearlo cuando tenga la oportunidad. Sin embargo, si necesitas algo más inmediato, podrías considerar abrir una nueva pregunta que llegue a una audiencia más amplia. Dicho esto, ¿ya has jugado con la automatización? Si entiendes los conceptos básicos de automatización, deberías poder usar la información que proporcioné anteriormente para lograr el objetivo. Sin embargo, si la automatización es completamente extraña para usted, puedo ver dónde necesitaría una orientación más explícita.

ricardo.jimenez
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 1, 2024

Hola @Jack Brickey te adjunto como imagen el mensaje que te quería mandar porque no me está dejando como texto:

Screenshot 2024-02-01 at 09.18.21.png

Jack Brickey
Community Champion
February 1, 2024

Unfortunately, I cannot translate in image. 🥺

ricardo.jimenez
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 1, 2024

Sorry mate, I didn't know you spoke English. I address the problem again:

Hi @Jack Brickey !!! Our case is as follows:

We have 2 important dates with the following textual names:
- "Validation Start Date"
- "Validation End Date"

What we want is that when a task leaves the validation state, which is a column, through an automation, Jira makes us the calculation in days of how many days this task has been in that column, and we include it in a custom field that we have in the cards called:

- "Days in validation".

To do this we have created the following rule:

- When: Transition of incidence made from Validation.
- Then: Edit issue fields, Days in Validation: {fissue.Start Date
Validation.diff (issue.Date End Validation).abs.days}}

We have also tested it to be noted in comments, and sometimes it half worked and sometimes it did not. We don't understand where we are going wrong, maybe we are making a mistake with the syntax.

Are we making a mistake with the syntax? could you help us? Thank you very much for your help!

Jack Brickey
Community Champion
February 1, 2024

Hi @Alejandra Ruiz , thank you for the translation.

You mentioned that it's sometime working and sometimes not. When it is not working, what are the details? What does the audit log show? Maybe the rule is not triggering? I would inspect closely the scenarios where it does not work and look at the history of the issue to see if there's something unique being overlooked. Maybe there are multiple transitions going in and out of the validation state. 

Suggest an answer

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

Atlassian Community Events