Automation rule for remaining estimate

Malavika L P May 3, 2022

I wanted to create an automation rule, if the remaining time of an issue is less than 30% of original estimate

1 answer

0 votes
Bill Sheboy
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.
May 3, 2022

Hi @Malavika L P 

What have you tried thus far to solve this need? 

If you have a rule started and are having problems with it, please post images of your rule and the audit log details, and describe the problem to provide context for the community to offer help.

If you have not started yet, please review this documentation and example rules to help you create rules:

Kind regards,
Bill

Andrea Kunkel May 18, 2023

Hi @Bill Sheboy ,

I'm trying to set up a similar automation (just 20% instead of the 30% mentioned above). Hopefully, you can help me.

Background: When 80% of the time has been spent (=less than 20% left) I want the automation to send an email.

I was hoping that I could use the Advanced Compare Condition but what I've tried doesn't work and I couldn't find any documentation on how to get "20% of the Original estimate". See my screenshot below for what I've tried.

Screenshot 2023-05-19 at 5.03.25 PM.png

To check it, I set up two Log Actions:

1) If condition matches:
"success (Remaining "{{issue.fields.timeestimate}}" less than 20% of original "{{issue.fields.timeoriginalestimate}}")"

2) Else: 
fail (Remaining "{{issue.fields.timeestimate}}" less than 20% of original "{{issue.fields.timeoriginalestimate}}")

 

 

As you can see in the Audit log, it always shows the Else message (fail) although the Time remaining is less than 20% of the Original estimate.

Screenshot 2023-05-19 at 5.09.26 PM.png

 

I think my mistake is with the Second value of the Advanced compare condition but don't know how to change it.

Any help greatly appreciated.

Bill Sheboy
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.
May 19, 2023

Hi @Andrea Kunkel 

Would you please post an image of your entire rule?  That may provide some context for what you are observing.  Thanks!

Kind regards,
Bill

Andrea Kunkel May 22, 2023

@Bill Sheboy Is this what you're looking for?

Screenshot 2023-05-23 at 5.10.14 PM.png

Bill Sheboy
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.
May 23, 2023

Thanks for that information.  The problem is how you are performing the math operation.  The way you are doing it is leading to a text string and not a number.

There are two ways to perform math operations in rules: inline and using a math expression:

{{issue.fields.timeoriginalestimate.multiply(0.2)}}

or

{{#=}}{{issue.fields.timeoriginalestimate}}*0.2{{/}}

Please replace the second part of your advanced compare condition with one of these to see how that helps.

Like Andrea Kunkel likes this
Andrea Kunkel May 23, 2023

@Bill Sheboy Thanks a lot, that's exactly what I've been trying to figure out.

Like Bill Sheboy likes this

Suggest an answer

Log in or Sign up to answer