Forums

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

Automation to count item days in "blocked" status

hugo_barbara June 4, 2024

I need to create a field that calculates the number of business days that the item was blocked, even though it leaves and returns to the mentioned state, I have already created a custom field to record the number of days, but I believe that the smart value syntax does not This is correct, as it does not return a true value.

I created an automation where its first action is:
When item is transacted from any status to blocked ->
It will edit a custom field called "Blocked Days" which has the following id customfield_10401, with the following syntax:
{{issue.updated.diff(issue.changed).businessDays.abs + issue.customfield_10401}}

It doesn't show any errors when I transition an item to locked, but it doesn't show any number of days.

Are there any errors in the syntax or any ideas on how to make this automation work?

1 answer

0 votes
Kalyan Sattaluri
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 4, 2024

Hello @hugo_barbara 

Please check and confirm customfield_10401 is a number field.

If its text, you have to convert it using customfield_10401.asNumber in your calc.

Hope it helps, Thanks!

hugo_barbara June 7, 2024

Hello, @Kalyan Sattaluri 

Yes, the customfield_10401 field is a numeric field.

Is the logic correct?

Suggest an answer

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

Atlassian Community Events