Good Day All.
I have 2 date/time fields(Time Arrived and Time Departed), these are manually populated
Is there a way i can calculate the "time spent" and display it on a particular field?
Your assistance would be highly appreciated.
You can achieve this in multiple ways, either via Jira Automation, or an app such as script runner, JMWE, JSU calculated fields etc.
Prior of doing anything with an app, try creating an automation rule using a smart value to calculate the difference between these two dates:
{{[date1].diff([date2]).[unit]}}
I would strongly suggest to look at the examples on the link I've pasted to become more familiar with this smart value.
Now, the way I see it, I would place the trigger on field value change, right after the user has placed the second date value.
Let me know if that works out for you!
Thank you very much for the above.
I am not quite clued up when it comes to JIRA Automation, would it be possible for you to maybe show me with an example of how you would create this automation?
These are my fields
Date/Time Received, Date/Time Resolved and the results should be displayed in a field called Time Spent
I've gotten as far as creating a trigger for "Field Value Changed" and I pretty much got stuck after that as there are a bunch of components like "New Branch", New Action" and "New condition"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Andile Luvuno try something like the following (but again, it depends on what type of field you want this information and what exactly you want to capture. "Time Spent" as defined by Jira is very specific field and used for a specific reason.
{{PlannedStartDate.diff(Planned end date).BusinessDays}}
Just change the "PlannedStartDate" and "Planned end date" fields to your liking, as well as "Description Field" with your CF "Time Spent" field (hopefully you are talking about a CF).
Let me know if that works.
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.
What came to my mind to achieve this is using Automation for Jira (https://support.atlassian.com/cloud-automation/docs/jira-smart-values-date-and-time/) or Script runner.
Regards,
Seba
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.