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
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.
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 (
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.