On this page
Example: Set "Total time spent" to "Current date and time - date and time of last update"
I want calculate time, how much issue was in status "In Progress" and add it to "Time Spent". For this I add this post-function:
Field Total time spent (minutes) will be assigned with the calculation result of the formula: {Current date and time} -{Date and time of last update}
Date and Time fields in Jira Workflow Toolbox contain time values in milliseconds. If you simply subtract to Date-Time fields you get the time difference in milliseconds.To convert it to minutes you should divide by
{MINUTE} = 1000 * 60
. Let's see how to do it in screenshots:
Once configured, transition looks like that:
Other examples of that function
- Automatic work log with start and stop work transitions
- Automatically log work time when the user uses a "Stop Progress" transition
- Calculate the time elapsed between 2 transition executions
- Getting the number of selected values in a custom field of type Multi Select
- Implement a form with a series of questions and calculate a numeric value based on the answers
- Increment a field or set to 1 if it's not set
- Set "Date-Time Picker" custom field with current date-time
- Set "Due date" 6 natural days (or work days) earlier than a "Date Picker" custom field
- Set "Due date" to a specific day of next week no matter of date of creation this week
- Set "Due date" with certain time offset from current date
- Set "Total time spent" to "Current date and time - date and time of last update"
- Set a custom field "Urgency" depending on a combined value of issue's priority and "Impact" custom field
- Sum "Time Spent" in all sub-tasks of issues linked with issue link types "LinkA", "LinkB", "LinkC"
- Triage Jira Service Desk email requests (Move issues)
- Using project properties to calculate custom sequence numbers