This function has been renamed with the JWT 3.0 release.
Find the new documentation at:
Purpose
This post-function allows to do almost any math and time calculation you can imagine using any system or custom field values, in current issue or any other related issue (linked issue, sub-tasks, JQL selected, etc). This feature uses the Expression Parser.
Example 1: Set field using fields on linked issues and sub-tasks
In this example we set custom field "Story Points" in our Epic with the sum of values of custom field "Story Points" in related stories and sub-tasks:
Note that:
- {10025} is code numeric value of "Story Points" custom field in the particular Jira instance of this example
Once configured, post-function looks like this:
Example 2: Date-Time Calculation
Time calculations are made based on the fact that Date and Date-Time system or custom fields return the number of milliseconds elapsed since January 1, 1970, 00:00:00 GMT.
Let's see how to calculate the number of whole days elapsed since issue creation:
Note that:
- {00057} is code for numeric value of "Current date and time"
- {00009} if code for numeric value of "Date and time of creation"
Once configured, post-function looks like this:
Examples of Math and Time Expressions
Usage Examples
- 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