Automation to compare Original Estimate with Time Spent and add specific label

dei June 23, 2024

I want to create an Automation that sets

  1. the label "under-estimated" if the Time Spent is greater than the Original Estimate
  2. the label "over-estimated" if the Time Spent is smaller than the Original Estimate

Her are my Screens for Rule 1:
It seems that my approach is not working.

Bildschirmfoto 2024-06-23 um 11.37.43.png

Bildschirmfoto 2024-06-23 um 11.37.58.png

Bildschirmfoto 2024-06-23 um 11.38.25.png

 

1 answer

0 votes
Tommaso Gionfriddo _Teklada_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 23, 2024

Hi @dei ,

The original estimate field should be accessed via {{issue.timetracking.originalEstimate}}. You can double check this by following this how-to by Atlassian.

There is one more complexity you'll need to consider.

The output of originalEstimate and timeSpent is provided in the period format (1d 2h etc.)
These strings do not compare well, for example 1d would be smaller than 2h, so you instead need to compare originalEstimateSeconds with timeSpendSeconds. This will act as you expect.

Screenshot 2024-06-23 at 15.04.56.png

 

dei June 24, 2024

Thanks @Tommaso Gionfriddo _Teklada_ 

You have helped me a lot.
But I still have to integrate that no over-estimated and under-estimated label is assigned if no effort estimation has taken place.

Also I am not sure if my way works if I have an estimate of 5h. After 4h have been logged, the label over-estimated is applied. If I now log 7h again on the same issue and exceed the estimate, I am not allowed to have both labels in the issue. I'll probably have to tinker with it. But thanks to you, I have already learnt something. Thank you!

Tommaso Gionfriddo _Teklada_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 24, 2024

Hi @dei ,

To not apply a label when no estimation has taken place, I would simply recommend adding a condition that checks that the estimation field contains a value. Please see the screenshot below for an example.

Screenshot 2024-06-24 at 15.53.04.png

 

To ensure only the correct label is applied, when you edit the issue to add the new label you can also remove the old label

To do this

  1. Select the ADDREMOVE operation on the label fieldScreenshot 2024-06-24 at 15.55.57.png
  2. Enter "over-estimated" in the Values to add field
  3. Enter "under-estimated" in the Values to remove fieldScreenshot 2024-06-24 at 15.58.38.png

Now when the over-estimated label is added to an issue, if the under-estimated label is already on the issue. it will be removed.
You can then simply repeat these steps for the under-estimated logic, and you should be good to go.

Suggest an answer

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

Atlassian Community Events