I wonder if you used the customfield ID would it make a difference? Replace the Xs with the field ID number.
{{issue.fields.customfield_xxxx.diff(issue.fields.customfield_xxxx).days}}
Hi @Fenner Matheus - Welcome to the Atlassian Community!
Try this: {{issue.Acceptance date.diff(issue.Lead time start).days}}
Thanks for the help Tim!! Would you be able to help me with where to find the customfield ID?
Thanks for helping me out, John!! I have implemented your suggestion and it let's me publish the automation, but it doesn't update the field =(
Can you share a screenshot of the audit log when you run it?
If you go to settings --> Issues --> Custom Fields. You can search for the custom field. Once you find the custom field you should see 3 dots, click on this then hover over edit and you will see a URL on the bottom of your browser and at the end of the URL you should see the ID. Something like below:
In this automation I also populate a different field with the current date, and this action is working fine...just the date diff that isn't =(
Hello @Fenner Matheus ,
I know this question is focused on configuring automation rules but it looks like you are trying to calculate a Lead Time metric. I can offer another way that is much easier, more flexible, and more powerful.
Our team at OBSS built Timepiece - Time in Status for Jirafor these kinds of reporting. It is available for Jira Server, Cloud, and Data Center.
Time in Status allows you to see how much time each issue spent on each status and on each assignee.
The app has Consolidated Columns feature. This feature allows you to combine the duration for multiple statuses into a single column and exclude unwanted ones. It is perfect to get measurements like Issue Age, Cycle Time, Lead Time, Resolution Time etc.
It is worth noting here that the app calculates its reports using already existing Jira issue histories so when you install the app, you don't need to add anything to your issue workflows or set any automation rules. You can get reports on your past issues as well. It supports both Company Managed and Team Managed projects.
For all numeric report types, you can calculate averages and sums of those durations grouped by the issue fields you select. For example total in-progress time per customer (organization) or average resolution time per week, month, issuetype, request type, etc. The ability to group by parts of dates (year, month, week, day, hour) is particularly useful here since it allows you to compare different time periods or see the trend.
Time in Status reports can be accessed through its own reporting page, dashboard gadgets, and issue view screen tabs. All these options can provide both calculated data tables and charts.
And the app has a REST API so you can get the reports from Jira UI or via REST.
Using Time in Status you can:
Timepiece - Time in Status for Jira
EmreT
I have the same requirement and tried this approach but the value ends up being zero instead of one day. What do I miss?
Thank you for the pointer.
Will look into that.
Thx
It looks like you're new here. Sign in or register to get started.