Hello Community
My task involves calculating the difference between two dates: one is the issue creation date, and the other is a custom field that automatically populates when the issue transitions to 'Done.' How can I calculate the difference between these dates and, based on the number of days, update the value in a custom field?
We don’t use Add-ons here
Hi @kalaimani
You can utilize automation to achieve this.
Please refer to Date difference {{[date1].diff([date2]).[unit]}}
Example:
{{now.diff(issue.created).days}}
Hope this helps!
Best regards
Sam
Hi @kalaimani
Could you please provide a screenshot that displays the details of your automation? Thank you.
Best regards
Sam
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Samuel Gatica _ServiceRocket_
Test Date 2 is my custom field .
So, in my custom field, the difference in days between issue creation is automatically used to select the dropdown values.
For Example :If the difference between Test Date 2 and the issue creation date is 1, the automation will select dropdown value 1.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @kalaimani
Here is an example of how to update the dropdown field based on the outcome of the date difference calculation.
Hope this helps!
Best regards
Sam
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, it works for me. Great! Thanks for your help.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @kalaimani
{{Test date.diff(issue.created).days.abs}}
Best regards
Sam
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.
Hi, without addons my suggestion is you could use Jira automation with smart values. Look them up here: https://support.atlassian.com/cloud-automation/docs/jira-smart-values-issues/
And for SmartValue regarding date and time: https://support.atlassian.com/cloud-automation/docs/jira-smart-values-date-and-time/
You can cast any field-value as a smartvalue and then add them.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.