Hi All,
I am trying to calculate the Blocked duration of a JIRA ticket from the blocked start day till Blocked end day. I have 3 new custom fields for Blocked Start date, Blocked End date, Blocked Duration.
I have 2 different automation rules written for each custom fields.
1) when Issue transitioned from "any status" to "Blocked" - I am stamping my Blocked Start-Date
2) when Issue transitioned from "Blocked" to "any status" - I am stamping my Blocked End-Date
My question is, How do I calculate my duration?
I tried calculating it in my second rule, but for some reason Blocked End-date doesn't get passed in the calculations. (assuming, we cannot assign and use the same custom_field for calculations in single rule?)
I tried having "field value changed" trigger for Blocked-end-date, but since the value will be empty for first run of blocked end-date, this attempt also doesn't work
P.s, I am using [[{issue.Blocked end-date.diff(issue.blocked date).abs}+1]] calculations to calculate my duration.
can anyone please help me in resolving this?
Hi @Divya S M -- Welcome to the Atlassian Community!
For a question like this, please post an image of your complete automation rule, images of any relevant actions / conditions / branches, an image of the audit log details showing the rule execution, and explain what is not working as expected. Those will provide context for the community to offer ideas. Thanks!
Until we see those...
The smart value expression you show is both missing the units of measure (e.g., days) and has the incorrect syntax. Please look here to learn how to perform a date / time difference:
Next, smart values are name, spacing, and case-sensitive. And, they sometimes do not exactly match the field's display name on the Jira views. When an incorrect smart value is used, it is replaced with null, often leading to unexpected behavior and often no errors in the log.
I recommend confirming you have the correct smart values for your fields using this how-to article. Essentially the steps are:
yourJiraURL/rest/api/2/issue/yourIssueKey?expand=names
https://support.atlassian.com/cloud-automation/docs/find-the-smart-value-for-a-field/
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.