Clone wiki

JIRA Workflow Toolbox / post-functions / Math and Date-Time Calculator

Mathematical And Date-Time Expression Calculator

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, subtasks, JQL selected, etc). This feature uses JIRA Workflow Toolbox's expressions parser syntax.

Example: Set Field Using Fields on Linked Issues and Subtasks

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 subtasks:

./post-functions/math-time-calculator/conf-1.png

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:

./post-functions/math-time-calculator/conf-2.png

Example: 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:

./post-functions/math-time-calculator/conf-3.png

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:

./post-functions/math-time-calculator/conf-4.png

Examples of Math/Time Expressions

Related Usage Examples

Updated