Hi,
I want to generate a report where i need to calculate the difference between 2 date fields ( created date and updated date that should display the answer in hours . Can you please help how do i achieve that ?
Thanks,
Pradeep
Hi Pradeep - Welcome to the Atlassian Community!
Here is what I use for one of my use cases:
{{issue.customfield_17152.diff(issue.customfield_16921).days}}
You could replace days with hours and see what happens - I have not tried to use hours before. :-)
Sorry - I should have mentioned that I created an Automation For Jira rule that updates a custom number field with the value generated by the DIFF statement.
hi John,
Thanks for your reply , i am newbee to this so apologies if i ask dumb questions, where do i write the above script , we use Jira Service Desk here at home office and how do you create automation for JIRA rule?
No worries!
Now when each issue is created, it will add the desired default label as long as the issue is created in that project. You might need to refresh the page after each issue creation to see it.
You can do this via global rules to apply to all projects also. You'll need to be a Jira Admin/Site Admin, then instead of going to Project Settings, go to Jira Settings (cog icon on left-hand navigation bar) > System > Automation Rules (left-hand menu).
For more on using Automation For Jira see these help pages.
Hello John.. same problem. I am trying to get the difference between 2 custom fields (timestamp) and save them into a 3rd custom field (number) using Automation (jira cloud).
This is for ensuring we meet internal SLOs...
{{issue.customfield_14474.diff(issue.customfield_14475).businessDays}}
The 3rd custom field is on the screen but does not show any number when the automation rule is triggered effectively.
It looks like you're new here. Sign in or register to get started.