Forums

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

Does not change status for two days in a software project - notification

Petr AST
Contributor
November 15, 2021

Hi colleagues!


Is it possible to notify if the issue does not change status for two days?


I understand that it can be accounted for through "not status changed after -48h", but what if the request is created on Friday? How not to count weekends?

Didn't figure out how this could be done without plugins.


I would be glad for any help! Thanks

1 answer

0 votes
Mikael Sandberg
Community Champion
November 15, 2021

You could do this by comparing the updated date with now() in a smart value and get the diff using the businessDays unit. If the diff is > 48h, send the notification. Take a look at {{[date1].diff([date2]).[unit]}} for more information.

Petr AST
Contributor
November 16, 2021

Hi @Mikael Sandberg 

Thank you for your answer!

I tested this command:{{now.convertToTimeZone("Europe/Moscow").diff(issue."Changed_Status_Date".convertToTimeZone("Europe/Moscow")).businessDays}}

If I change Changed_Status_Date to Today (Tuesday) - 0d

If I change Changed_Status_Date to Yesterday - Monday - -1d

If I change Changed_Status_Date to Sunday - -2d -- Why?)

If I change Changed_Status_Date to Saturday, Friday - -2d same 

If I change Changed_Status_Date to Thursday - -3d

 

The creation time also does not affect, as I understand it, here the calculation is performed by days, not by hours. For example, if the request was created in the evening, it will still be considered.

 

And I also don't understand the counting logic (

Yvan Martin
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 17, 2021

Hi there @Petr AST

Developer from Automation here.

By default businessDays is rounding that date backwards before doing the diff, so in the case of Sunday it is being treated as Friday the previous week. This has been the default for a while and worked for a number of use-cases, but yours in particular would better suit rolling the business days forward.

Using your example you can either use toBusinessDays or toBusinessDaysForwards on each of those dates in a smart value to achieve this:

{{issue.Changed_Status_Date.convertToTimeZone("Europe/Moscow").toBusinessDayForwards.diff(now.convertToTimeZone("Europe/Moscow").toBusinessDayForwards).businessDays}}


In terms of your rule setup you would be best served still using JQL to return issues recently changed, then also applying that smart value in an advanced issue condition. 

If you require further help with your rule you can contact support here: https://support.atlassian.com/contact/#/

Cheers.

Like # people like this
Petr AST
Contributor
November 25, 2021

Hi @Yvan Martin 

Thanks for you interesting answer, well noted, will test. 

I got out from this situation by creating automation a rule with a change in custom_field_date like {{now.plusBusinessDays(2)}}. And schedule rule checks it and sends a notification if custom field more than now() and clear this field.

But I will try your option too, thanks!

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events