Hi,
Due to some backlogs, there is a need for us to input incident start time and end time for the previous incidents. I have created 2 custom fields for this.
Im thinking about adding another custom field (incident duration) and the computation of 2 custom fields (start and end time) would be calculated and appear on that duration field.
Is there a way to do this without installing an app/plugin? I have done the following:
1. Through SLA - cannot choose the custom field to calculate
2. Automation - do not seem to have add calculation / computation on the Action component
Appreciate your help.
Hi @[deleted]
You can use "smart values" to make a calculation and update a field value with it.
Use the "Edit issue" action to set your "duration" custom field to something like this:
{{issue.customfield_13455.diff(now).businessDays}}
The above calculates number of business days between a date in customfield_13455 and "now" (today).
You would need to change "now" in the above to your second customfield (and the first to point to the correct customfield). e.g.
{{issue.customfield_1.diff(issue.customfield_2).businessDays}}
thank you, worked for me. :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi @Peter Youngman I did make it work, however there is one issue. I changed my custom field from date time picker to number field so it would just give whole numbers instead of date time.
The automation rule is successful, but the number field shows 0. Is there a need for me to edit anything?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Peter Youngman - When I write below value its giving difference in days:
{{issue.customfield_1.diff(issue.customfield_2)}}
What value should be written to get difference in 'days, months, years' between two Date fields?
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.