The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

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

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

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 Champions.
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?

DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events